From dd786845b74ce6408bcba1d99ae68049c32fd5a8 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 28 Feb 2023 20:32:30 +0000 Subject: [PATCH 001/113] Removed curly bracket from the end of the combined schema --- apps/integrations/src/trigger/sdk/generateService.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 27c0fa7fe88..b42b4b90305 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -207,7 +207,7 @@ async function createFunctionsAndTypesFiles( .filter(Boolean) as JSONSchema[]; const combinedSchema: JSONSchema = makeAnyOf( - `${toFriendlyTypeName(service.service)}Types}`, + `${toFriendlyTypeName(service.service)}Types`, typeSchemas ); @@ -217,11 +217,11 @@ async function createFunctionsAndTypesFiles( const optimizedSchema = reffer.optimize(); //uncomment to write intermediate optimized schema to disk - // await fs.mkdir(basePath, { recursive: true }); - // await fs.writeFile( - // `${basePath}/schema-optimized.json`, - // JSON.stringify(optimizedSchema, null, 2) - // ); + await fs.mkdir(basePath, { recursive: true }); + await fs.writeFile( + `${basePath}/schema-optimized.json`, + JSON.stringify(optimizedSchema, null, 2) + ); let allTypes = await getTypesFromSchema( optimizedSchema, From c6a668a5f60ba40a5d67458e014ac235b8ada5b9 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 28 Feb 2023 20:52:34 +0000 Subject: [PATCH 002/113] Set is constant --- apps/integrations/src/core/schemas/autoReffer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/integrations/src/core/schemas/autoReffer.ts b/apps/integrations/src/core/schemas/autoReffer.ts index 0cf2297178c..d1e4fcd0253 100644 --- a/apps/integrations/src/core/schemas/autoReffer.ts +++ b/apps/integrations/src/core/schemas/autoReffer.ts @@ -91,7 +91,7 @@ export class AutoReffer { ); //now flatten it to an array of pointers with name - let names = new Set(); + const names = new Set(); const pointers = filteredSchemaPaths.flatMap(([hash, pointers]) => { //the name must be unique const name = this.#inventName(pointers, newSchema, names); From fa7ec1243496f8815f020efa16948a34285450d1 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 1 Mar 2023 12:54:52 +0000 Subject: [PATCH 003/113] Added a Product Hunt banner --- apps/webapp/app/assets/images/producthunt.png | Bin 0 -> 5677 bytes .../app/components/ProductHuntBanner.tsx | 23 ++++++++++++++++++ .../app/components/layout/AppLayout.tsx | 6 ++--- apps/webapp/app/routes/__app.tsx | 2 ++ apps/webapp/app/routes/__public.tsx | 2 ++ 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 apps/webapp/app/assets/images/producthunt.png create mode 100644 apps/webapp/app/components/ProductHuntBanner.tsx diff --git a/apps/webapp/app/assets/images/producthunt.png b/apps/webapp/app/assets/images/producthunt.png new file mode 100644 index 0000000000000000000000000000000000000000..e27a96f697651eeb202f8a0372f718c198b7dbb3 GIT binary patch literal 5677 zcmb_g2UL^Uwho~<6h%Nls#FbRp@K)u0H*M0BJ+%@a2mzDfE|M|aNzPRf2te{8;#4BeidO@x1ZIG+a&P8-#t#NX>M^pbEj( zLB)*D1XOT32pAcGK&t5DbdVT;Ov0e3C^A$9g+QU<2qYYdh9OaSlrA2FQThH-<5^@< zsCXxH%kTDhcSdU7Y&HWAhX(}(=>(y5=u9s-5{JXV5hyqc1>+%LtPnpoF&O5@QvadB z9AJ@|GzObS_fy%>NF>n%*hXqRZ~vs>%lN6*kM%uNyr98@i3~VW2eCox8<0Z&iDLvX zeZCo|kl}z2;0yS%Sv)NACzjz&XVY2U^uJO4^YQ;MzzeUf?N1wj>5H%LPZKP*MIevH z_kjE*n&lG00N_pliypuv0~UciH`O=TFz{wffXJpZUFdY5AIWm~;j#(}qk~d`*b>P! zzYP*v|0V*M6WM@~+D6`B2;Lj%f<)qVk$42g{ZEuFokF9A{9hCbuZzJW(LYeUa-k5} z#Q%h&knvPH)0fEONb@Cn0dR(&mzv7Y$l=ZCK6EC}9M2u}H`}(h_@zn~ z=IkQ7}UnyB|f-keSj*huCNc?wS+ zNx`A@(PT0VLFSbhhJ@9H;V5J(j6~JPBFI=heLb@N4|#hgjklnPKL53zjb*k`1$b*3 ziQ~KBW{S(2W zQ`td8CSdBt3)DX-9{AsR&LRf>XTOPPJt`VU!NJH_A_9g%VM#C&j)a8)Xn>4HA@zx5 zJznJh&TkZ+SDNUJy8Q3_{w_xLCi-~+yuA^w_TMx4XEpfuOn$7L|4%0HjlJ;C!h-+r zn)~+b-}X&j3cpS9Hsg)q&y#?6^YbhL{CGiP@=l6a?)Fz8koci}=B6&e=V$Xms(<}e zsm=JkPATLSM>r|^6-VPtcJAKTOIUCxE3@oviVmM|*{O`8OQ}>GMHJ0CfOhPFZj)|~ z+L}S&@QXlpmx^zr1T$90!k&gs=And_!Jyjy5BFUqCNJ!Y{CfW#Ws@rdk|{;IEU% z>fIUJL(m9LqzQvOncXIgHk)zA-Gqger3RV%1DTw_4G zLD+3}UZNj+ge|z5b}AxOJgbFNM!qD_59eIj-J1o)n(R1Y_YL>RDx15ij3_t}@o>NT z`=vLBdHPNZ2v>MU-IkuSQEp7Ap}9c=Y*M;Ek4n#4M9##YcZ12;D3K%yV^Oo(FH;re z_-7nv?Fi7!^*^pe8%60m*XkD0OAQ3Dk_3gtkF{Kp4B(BfM%{GY7p@$){>{WPcab|<-d{Kb zh>x>hx~#t_u6ro}wd?BK2k}e~J1pZ6T6~N(1!&(hxc|FNt%pl8e;Z{s<+KDh0&@H} z`4MnvQRzz9tM!Ztf#5B5${(#_^p56mzMiop0X`x6D#8P8C-2n}HoJ^-?&N4$8*I zWG|O5G9Gn`LbNdXlqEcjOl%#o9k7J;C}5>MkEgs_P-~LCt9@OsL~k^S#WCY}Irra9 z7zb;^bu5o^OLymurX?KXT#W$4(>;&4y}1Er6kVH94F^BY(=^Qc=zr=gRpimu)R;m? z_jgB;l7nH;nx_UaH+7}wTU=#(tl6=5xk|)5r`9BogoGpov9+OXk7d=R5$#ox8VvVG zi{gCB)^5)M{`Y2-adw|`384vx*!nTjx_3a z@vD`0>-?E*6UJ%b0{wZaYhMLkoN{sf+A*za;#EBvQxu3C%y?G+k&sr^?ywwtH=iRm z{MKcYf|R0xVq$Tm@4yOlN}xY~Tflm?X=gRDr^`9D=c<;}G5QhrKfWq+??L*i_^bKf z6%1N%jH0Ac^BZ=^&7a)cQH$3ky7ebcd_+Np7GDa11$5U zFZ8RPY`FNiyWDQJTXf=@L`10|p0BN^;?6dXc=x=l`HN8+#GUU-EOjNJ&AWDSvnhXa zWV>>meA!Ss$JjY{B;55wc%`Kt)R;eY?La}DQSunpIADQzX$-r)c3QG_G0?!IyKAR{>U$Y444eID725^}{m*CdHk0N~co=38l|K3K^h0j4 zdeYP(pXu;7Fd-+@v@;{J|h`>ytYJvZU4uL;|FkDL6l*npfi{gUHrYxxBs zPgeGlkIn6c!TpbytVCQ?NHyqHe05G@V)9hA*tJnY?;VF{C1Ceg)tLxSL+iVps@y=i z-|HXbAVru&!mCfC8OrJq zTCI;am`+T^HT6)DtFMcs+|2=%o3Pfm$Aq6swOF*@9;7c~y3K1Hs!ES3uLLb*`C67~ z@7?Z6%c(6lJ5di(66rmZUp0Di2q+Qr4SeYET+=7|mXS#6cJF~(35;`z7dN*T*FIV0xnilqOL-=NOz!yyD{duXI3lI7qu6cRn!UJf< zZ!#-S_QG$QVv{fBE6ofTIa(}goye=3yi189>}j%n+khL-bo#vT_Wj=W~=q0wmXZ2iPU=}mp zur;sO%WpDI{UJAwT%oPCxpAqs#(+9}BqeSV1tT5D z4Q?A~bC|n${r%$62a!D|Gg|yse|;UB5>Z^yVygGhRt%W^EGURMcJ^0b_b#*4!%i}3 zLb=qpz~$UViN%kl)5ctfcgI;dh?XOB(czTLOK!%-Rl*lOGRmlR&d2xD$CG1atZQ1a zl$BVKnIQGuP4R=SWkYOrEYakAY>xT16vrzEd!v56Wc=wejn+|+STnil{ZP5b#O<@~ zxcSYO?KGDvlJ`rHm`i8W#f*jaEcVe&^eT(86EDrTdf&?RAw%NVNTr&Unu8IywQIDl z-#>%q&#k-HGM@exO}7Inca&YN&?5I2o&%8gz|)Hf6TdWnD2^j%9pi@g)a`L84(z$S zP^PhSsmVORTkwNG@h? zhC`a!Vm|UXWI^-c2*s4G>b8H_FeKHf#3fyIB$?Llqw^$cV5jMb6fQgFQ&NtA_aSrP z>YR47p=p<4xt5$5IZlrQTs$=6s0>h5A)|?|7fdUn**1%(1Rbl%-ds`s=F{RUnwgtb zM(3v!9K0vzM$AH+;n$}ny{&?|ZZC{48=KDYM;>URozCx&*(tPjR;6)^Fyk(_Njf<0 zNK}xFWItSRMt@KuJtnCaTs(i{pn0D9{Ud_~?q?1!bx^Kn( z^CR!VF~j34AC;rm(+(7f2L*o#LckSo9KO-maIH~xAv0N_!OLmhPS9@otaQrp0hKBM zrPT0=%sKc=!j7LeEQ=A($iiq(^s1?M_tuVb4dpe(!?z@6u1Y8d>18^dd;2tX@!~}Z zZ^zV!?S8$YZ_DlPH*yx%9PfIm^v!|NTEgs1)h&*@&l@@J&XI$hJ+O;HWq92imR(Uw zwj_^)^^C7F)$22dFUj3`ExbyAWvU#!au}NjR*arYho@``g#pdFnu3#2n9FjLL56+O z1S!ZxZuw4|?#&+J;Yq#u4`U(@790>D9=NA?w|1*A%K3~PKf~K3EK*inDt+(rQrkMW zV%Nxlx55ye>s}{nO$$2}Qn(8!C8KSTjf27Z1q*v3_PL#kenyOm@T4UbR_LzZe&i9_ zUtDTdt#kEuYuRMsqrJ$jUj>FYF`oRxpjmz{M9g;WaZYLmkq-+NPKG}YQ7 zwi%DfSqwk1Z2Eb}e%jY&NzHnSn|4*2N7}0a1H_eqvs7WHgU#5-YcXPv(z(`k^E(KBSix{)xt8bFe^3iMhl58 zz7VJBRTa})@`K$kwmo$0yd!>TI#BZFl>nXo5b2`rkw%xAVg;)kf2)+hO;LI&8lV?z zH({^AG)bo{dx55tl~bYPj}{a||F~T>kyzb0p@3-PvoqJbvvgrzVmU$gna_Pj+-#>X zE>gGt;%U`It7OtAutvM`a^<>MT$g>rho!>oSqM2*r2;dY^0N6Q=|=C?$S6Vi-Ng?p z>%c`3ORLUU?-E|N* z<~S`REpgK-_(UpHJme|^w-8uMfCik|r^%i=;p0?u{>9VBM%Bv3a`7!`ClK~;0Z7l@ z-V7$}y~b|@UUy^f;@#piKIVMY(7``AZs?5OEdmtS**U~SJDB*^FilS(qk=;Ucpae9 z)*xg@2v>Rhq6$n@9qA><`|%vGKdmp!HNPuP`%!OJU56P_$}Q{5O#<|40_Jhz;rM4p z(M4OdHrYZ1ANlp#KibaofP=UdgH=p&sbW&09w(nYcp=c}+PcVNDZlFqmnj!Lv#;49 zI!w7^)11X1|L;gwUhlTg`VjbWk<@;`AN%NBwQP5MbUoB6q`gG#Zn@!a^*4B4n2&%T z+wkvi?dJ!42INDY&=Z(SSNHDyT|J|C#dg8XxQiELt*@Kv%TZ3h!FEk-{Gq$g!p^*M I?~xP#0(| + + We're live on{" "} + + Product Hunt + + + Vote for us today only! + + + ); +} diff --git a/apps/webapp/app/components/layout/AppLayout.tsx b/apps/webapp/app/components/layout/AppLayout.tsx index 9fcba1d3b69..4477f67fe45 100644 --- a/apps/webapp/app/components/layout/AppLayout.tsx +++ b/apps/webapp/app/components/layout/AppLayout.tsx @@ -10,7 +10,7 @@ export function AppLayout({ }) { if (impersonationId) { return ( -
+
{children}
@@ -18,7 +18,7 @@ export function AppLayout({ } return ( -
+
{children}
); @@ -26,7 +26,7 @@ export function AppLayout({ export function PublicAppLayout({ children }: { children: React.ReactNode }) { return ( -
+
{children}
); diff --git a/apps/webapp/app/routes/__app.tsx b/apps/webapp/app/routes/__app.tsx index 4fd72ddf7f3..14bc6699863 100644 --- a/apps/webapp/app/routes/__app.tsx +++ b/apps/webapp/app/routes/__app.tsx @@ -5,6 +5,7 @@ import { AppBody, AppLayout } from "~/components/layout/AppLayout"; import { Footer } from "~/components/layout/Footer"; import { Header } from "~/components/layout/Header"; import { NoMobileOverlay } from "~/components/NoMobileOverlay"; +import { ProductHuntBanner } from "~/components/ProductHuntBanner"; import { getOrganizations } from "~/models/organization.server"; import { clearCurrentTemplate, @@ -46,6 +47,7 @@ export default function App() { return ( +
diff --git a/apps/webapp/app/routes/__public.tsx b/apps/webapp/app/routes/__public.tsx index 97b9c929b27..38cba51db1e 100644 --- a/apps/webapp/app/routes/__public.tsx +++ b/apps/webapp/app/routes/__public.tsx @@ -9,6 +9,7 @@ import { import { Footer } from "~/components/layout/Footer"; import { Header } from "~/components/layout/Header"; import { MarketingHeader } from "~/components/layout/MarketingHeader"; +import { ProductHuntBanner } from "~/components/ProductHuntBanner"; import { getOrganizations } from "~/models/organization.server"; import { getImpersonationId } from "~/services/impersonation.server"; import { getUserId } from "~/services/session.server"; @@ -41,6 +42,7 @@ export default function Public() { return ( + {loaderData.userId ?
: } From 79f21fd94e6a947e8062b4f94c59be518f687026 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 1 Mar 2023 13:47:04 +0000 Subject: [PATCH 004/113] Fix for bad documentation url in Notion spec --- apps/integrations/src/integrations/notion/endpoints/specs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/integrations/src/integrations/notion/endpoints/specs.ts b/apps/integrations/src/integrations/notion/endpoints/specs.ts index 34f2571d86e..787e29cb4f9 100644 --- a/apps/integrations/src/integrations/notion/endpoints/specs.ts +++ b/apps/integrations/src/integrations/notion/endpoints/specs.ts @@ -145,7 +145,7 @@ export const getBotInfo: EndpointSpec = { }, externalDocs: { description: "API method documentation", - url: "https://developers.notion.com/reference/get-users", + url: "https://developers.notion.com/reference/get-self", }, tags: ["users"], }, From 923d2e72aa68b249e33bc2655029c30fd23fd063 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 1 Mar 2023 13:47:55 +0000 Subject: [PATCH 005/113] Added a todo to throw an error on an edge case when registering a webhook --- .../services/externalSources/registerExternalSource.server.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts index 2496d9e267f..d806eba156c 100644 --- a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts +++ b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts @@ -21,6 +21,7 @@ export class RegisterExternalSource { const externalSource = await this.#findExternalSource(idOrExternalSource); if (!externalSource) { + //todo throw an error here that Sentry can see return true; } From 3de6a9a3debff1b9bf653634776a65a0360dc609 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 10:59:01 +0000 Subject: [PATCH 006/113] Moved HTTPMethod to a shared file --- apps/integrations/src/api/v2/fetch.ts | 2 +- apps/integrations/src/core/action/types.ts | 4 ++-- apps/integrations/src/core/endpoint/types.ts | 21 ++++++------------- .../src/core/fetch/serviceFetch.ts | 3 +-- apps/integrations/src/core/request/types.ts | 16 +++++++++++++- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/apps/integrations/src/api/v2/fetch.ts b/apps/integrations/src/api/v2/fetch.ts index 4a53d0fe7de..1fc002afe97 100644 --- a/apps/integrations/src/api/v2/fetch.ts +++ b/apps/integrations/src/api/v2/fetch.ts @@ -1,6 +1,6 @@ import { AuthCredentials } from "core/authentication/types"; -import { HTTPMethodSchema } from "core/endpoint/types"; import { serviceFetch } from "core/fetch/serviceFetch"; +import { HTTPMethodSchema } from "core/request/types"; import { Request, Response } from "express"; import { catalog } from "integrations/catalog"; import { z } from "zod"; diff --git a/apps/integrations/src/core/action/types.ts b/apps/integrations/src/core/action/types.ts index 747922fde61..3d4d5c0a578 100644 --- a/apps/integrations/src/core/action/types.ts +++ b/apps/integrations/src/core/action/types.ts @@ -1,6 +1,6 @@ import { CacheService } from "core/cache/types"; -import { EndpointSpec, HTTPMethod } from "core/endpoint/types"; -import { RequestData, RequestResponse } from "core/request/types"; +import { EndpointSpec } from "core/endpoint/types"; +import { HTTPMethod, RequestData, RequestResponse } from "core/request/types"; export type InputSpec = { security?: EndpointSpec["security"]; diff --git a/apps/integrations/src/core/endpoint/types.ts b/apps/integrations/src/core/endpoint/types.ts index 8fd8c4bcd3e..0c39be34130 100644 --- a/apps/integrations/src/core/endpoint/types.ts +++ b/apps/integrations/src/core/endpoint/types.ts @@ -1,25 +1,16 @@ -import { RequestData, RequestResponse, RequestSpec } from "core/request/types"; +import { + HTTPMethod, + RequestData, + RequestResponse, + RequestSpec, +} from "core/request/types"; import { JSONSchema } from "core/schemas/types"; -import { z } from "zod"; export type Endpoint = { spec: RequestSpec; request: (data: RequestData) => Promise; }; -export const HTTPMethodSchema = z.union([ - z.literal("GET"), - z.literal("POST"), - z.literal("PUT"), - z.literal("PATCH"), - z.literal("DELETE"), - z.literal("HEAD"), - z.literal("OPTIONS"), - z.literal("TRACE"), -]); - -export type HTTPMethod = z.infer; - export interface EndpointSpec { path: string; method: HTTPMethod; diff --git a/apps/integrations/src/core/fetch/serviceFetch.ts b/apps/integrations/src/core/fetch/serviceFetch.ts index 08702e1153e..769428dcc38 100644 --- a/apps/integrations/src/core/fetch/serviceFetch.ts +++ b/apps/integrations/src/core/fetch/serviceFetch.ts @@ -3,8 +3,7 @@ import { AuthCredentials, IntegrationAuthentication, } from "core/authentication/types"; -import { HTTPMethod } from "core/endpoint/types"; -import { FetchConfig, RequestResponse } from "core/request/types"; +import { FetchConfig, HTTPMethod, RequestResponse } from "core/request/types"; import { getFetch, normalizeHeaders, diff --git a/apps/integrations/src/core/request/types.ts b/apps/integrations/src/core/request/types.ts index 879ee631c34..17c6630bd4f 100644 --- a/apps/integrations/src/core/request/types.ts +++ b/apps/integrations/src/core/request/types.ts @@ -2,7 +2,21 @@ import { IntegrationAuthentication, AuthCredentials, } from "core/authentication/types"; -import { HTTPMethod, EndpointSpec } from "core/endpoint/types"; +import { EndpointSpec } from "core/endpoint/types"; +import { z } from "zod"; + +export const HTTPMethodSchema = z.union([ + z.literal("GET"), + z.literal("POST"), + z.literal("PUT"), + z.literal("PATCH"), + z.literal("DELETE"), + z.literal("HEAD"), + z.literal("OPTIONS"), + z.literal("TRACE"), +]); + +export type HTTPMethod = z.infer; export interface FetchConfig { url: string; From 1296226b0418c8844aae5cba4641e0996e13cfeb Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 11:08:41 +0000 Subject: [PATCH 007/113] Started thinking about Webhook types --- apps/integrations/src/core/webhook/types.ts | 78 +++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 apps/integrations/src/core/webhook/types.ts diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts new file mode 100644 index 00000000000..b891a8ccf5f --- /dev/null +++ b/apps/integrations/src/core/webhook/types.ts @@ -0,0 +1,78 @@ +import { AuthCredentials } from "core/authentication/types"; +import { HTTPMethod } from "core/request/types"; +import { JSONSchema } from "json-schema-to-typescript"; + +export type Webhook = { + id: string; + metadata: WebhookMetadata; + subscribe: WebhookSubscribe; + verify: WebhookVerify; + receive: WebhookReceive; + events: Record; +}; + +export type WebhookMetadata = { + name: string; + description: string; + displayProperties: { + title: string; + }; + externalDocs?: ExternalDocs; + tags: string[]; +}; + +type ExternalDocs = { + description: string; + url: string; +}; + +type WebhookSpecSubscribeManual = { + type: "manual"; +}; + +type WebhookSpecSubscribeAutomatic = { + type: "automatic"; + subscribe: { + /** The action that will be called to register this webhook */ + endpoint: string; + parameters?: Record; + body?: any; + }; + //todo unsubscribe +}; + +export type WebhookSubscribe = + | WebhookSpecSubscribeManual + | WebhookSpecSubscribeAutomatic; + +type WebhookRequestData = { + request: NormalizedRequest; + credentials?: AuthCredentials; + secret?: string; +}; + +type WebhookVerifyResponse = + | { status: "ok"; data: any } + | { status: "ignored"; reason: string } + | { status: "error"; error: string }; + +type WebhookVerify = ( + request: WebhookRequestData +) => Promise; + +//todo this will be called when receiving a request (can be verify or an actual webhook) +//the service will have to decide what to do with it +//need auth credentials +type WebhookReceive = (request: WebhookRequestData) => Promise; + +type NormalizedRequest = { + method: HTTPMethod; + searchParams: URLSearchParams; + headers: Record; + rawBody: Buffer; + body: any; +}; + +type EventData = { + payload: JSONSchema; +}; From 5a1e77046962f7eafce9dbc19a3aca79e39f9148 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 11:49:22 +0000 Subject: [PATCH 008/113] You can have an endpoint parameter that goes in the body --- apps/integrations/src/core/endpoint/types.ts | 22 +++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/apps/integrations/src/core/endpoint/types.ts b/apps/integrations/src/core/endpoint/types.ts index 0c39be34130..c46eb63dc9b 100644 --- a/apps/integrations/src/core/endpoint/types.ts +++ b/apps/integrations/src/core/endpoint/types.ts @@ -21,13 +21,29 @@ export interface EndpointSpec { responses: EndpointSpecResponse[]; } -export interface EndpointSpecParameter { +export type EndpointSpecParameter = { name: string; description: string; - in: "query" | "path" | "header"; required?: boolean; schema: JSONSchema; -} +} & ( + | EndpointSpecParameterUrl + | EndpointSpecParameterHeader + | EndpointSpecParameterBody +); + +type EndpointSpecParameterUrl = { + in: "query" | "path"; +}; + +type EndpointSpecParameterHeader = { + in: "header"; +}; + +type EndpointSpecParameterBody = { + in: "body"; + pointer: string; +}; interface EndpointSpecRequest { headers?: Record; From 30e97148663f541112d3c90a829f5ba9d4d0fd8c Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 11:49:35 +0000 Subject: [PATCH 009/113] WIP on Webhook types --- apps/integrations/src/core/webhook/types.ts | 37 +++++++++++++-------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index b891a8ccf5f..67292294d45 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -1,14 +1,14 @@ import { AuthCredentials } from "core/authentication/types"; -import { HTTPMethod } from "core/request/types"; +import { FetchConfig, HTTPMethod } from "core/request/types"; import { JSONSchema } from "json-schema-to-typescript"; export type Webhook = { id: string; metadata: WebhookMetadata; + events: string[]; subscribe: WebhookSubscribe; verify: WebhookVerify; receive: WebhookReceive; - events: Record; }; export type WebhookMetadata = { @@ -26,24 +26,33 @@ type ExternalDocs = { url: string; }; +export type WebhookSubscribe = + | WebhookSpecSubscribeManual + | WebhookSpecSubscribeAutomatic; + type WebhookSpecSubscribeManual = { type: "manual"; }; -type WebhookSpecSubscribeAutomatic = { - type: "automatic"; - subscribe: { - /** The action that will be called to register this webhook */ - endpoint: string; - parameters?: Record; - body?: any; - }; - //todo unsubscribe +type WebhookSubscriptionResult = { + success: true; + callbackUrl: string; + events: string[]; + data: any; }; -export type WebhookSubscribe = - | WebhookSpecSubscribeManual - | WebhookSpecSubscribeAutomatic; +export interface WebhookSpecSubscribeAutomatic { + type: "automatic"; + create: (data: { + credentials: AuthCredentials; + callbackUrl: string; + events: string[]; + secret?: string; + params: Record; + }) => Promise; + + //todo unsubscribe +} type WebhookRequestData = { request: NormalizedRequest; From a60d6443668a06f0ea8931a967d46f054a97ecdf Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 11:49:48 +0000 Subject: [PATCH 010/113] Experimenting with Typeform webhook data --- .../integrations/typeform/webhooks/webhook.ts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 apps/integrations/src/integrations/typeform/webhooks/webhook.ts diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhook.ts b/apps/integrations/src/integrations/typeform/webhooks/webhook.ts new file mode 100644 index 00000000000..c8de9eff24d --- /dev/null +++ b/apps/integrations/src/integrations/typeform/webhooks/webhook.ts @@ -0,0 +1,34 @@ +import { Webhook } from "core/webhook/types"; + +export const webhook: Webhook = { + id: "form_response", + metadata: { + name: "Form response", + description: "A response to your Typeform", + displayProperties: { + title: "New response to your typeform", + }, + tags: ["form"], + }, + events: ["form_response"], + subscribe: { + type: "automatic", + create: async ({ credentials, callbackUrl, events, secret, params }) => { + return { + method: "POST", + url: `https://api.typeform.com/forms/${params.form_id}/webhooks/${params.tag}`, + headers: { + "Content-Type": "application/json", + //todo credentials + Authorization: `Bearer ${credentials}`, + }, + body: { + enabled: true, + secret, + url: callbackUrl, + verify_ssl: true, + }, + }; + }, + }, +}; From 77482a6061d52248c93bee049e8bb0e6f044e273 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 12:28:01 +0000 Subject: [PATCH 011/113] Updated combine schema tests --- .../src/generators/combineSchemas.test.ts | 55 ++++++++++++------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/apps/integrations/src/generators/combineSchemas.test.ts b/apps/integrations/src/generators/combineSchemas.test.ts index db5c25eba27..25e7e3dcb18 100644 --- a/apps/integrations/src/generators/combineSchemas.test.ts +++ b/apps/integrations/src/generators/combineSchemas.test.ts @@ -28,7 +28,9 @@ test("create input schema when only a body schema", async () => { }; const inputSchema = createInputSchema({ body: schema }); - expect(inputSchema).toEqual(schema); + expect(inputSchema).toEqual({ + allOf: [schema], + }); } catch (e: any) { console.error(JSON.stringify(e.errors, null, 2)); expect(e).toEqual(null); @@ -74,29 +76,40 @@ test("combine input body and parameters into a schema", async () => { const inputSchema = createInputSchema({ body: bodySchema, parameters }); expect(inputSchema).toMatchInlineSnapshot(` { - "properties": { - "as_user": { - "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", - "type": "string", + "allOf": [ + { + "properties": { + "limit": { + "description": "The maximum number of items to return.", + "type": "integer", + }, + }, + "required": [ + "limit", + ], + "type": "object", }, - "attachments": { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "type": "string", + { + "properties": { + "as_user": { + "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", + "type": "string", + }, + "attachments": { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "type": "string", + }, + "channel": { + "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", + "type": "string", + }, + }, + "required": [ + "channel", + ], + "type": "object", }, - "channel": { - "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", - "type": "string", - }, - "limit": { - "description": "The maximum number of items to return.", - "type": "integer", - }, - }, - "required": [ - "channel", - "limit", ], - "type": "object", } `); } catch (e: any) { From 9642d4b6ed873f14bdc440c9adf3c2f12ac2a811 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 12:28:21 +0000 Subject: [PATCH 012/113] Added JSONPointer --- apps/integrations/src/core/common/pointer.ts | 7 +++++++ apps/integrations/src/core/endpoint/types.ts | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 apps/integrations/src/core/common/pointer.ts diff --git a/apps/integrations/src/core/common/pointer.ts b/apps/integrations/src/core/common/pointer.ts new file mode 100644 index 00000000000..5836b1c6250 --- /dev/null +++ b/apps/integrations/src/core/common/pointer.ts @@ -0,0 +1,7 @@ +import JsonPointer from "json-pointer"; + +export type JSONPointer = string; + +export function createJSONPointer(path: string[]): JSONPointer { + return JsonPointer.compile(path); +} diff --git a/apps/integrations/src/core/endpoint/types.ts b/apps/integrations/src/core/endpoint/types.ts index c46eb63dc9b..f26e4ba2de3 100644 --- a/apps/integrations/src/core/endpoint/types.ts +++ b/apps/integrations/src/core/endpoint/types.ts @@ -1,3 +1,4 @@ +import { JSONPointer } from "core/common/pointer"; import { HTTPMethod, RequestData, @@ -42,13 +43,14 @@ type EndpointSpecParameterHeader = { type EndpointSpecParameterBody = { in: "body"; - pointer: string; + pointer: JSONPointer; }; interface EndpointSpecRequest { headers?: Record; body?: { schema: JSONSchema; + static?: Record; }; } From 3c02cf7f49354dd498cce576bc3c083584a31cf4 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 12:28:48 +0000 Subject: [PATCH 013/113] Added the ability for an endpoint to have body params and static body content --- .../src/core/request/requestEndpoint.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index 5b680bd8f65..440e37d92e3 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -13,6 +13,7 @@ import { RequestSpec, } from "./types"; import * as Sentry from "@sentry/node"; +import JsonPointer from "json-pointer"; export async function requestEndpoint( { baseUrl, endpointSpec, authentication }: RequestSpec, @@ -21,7 +22,7 @@ export async function requestEndpoint( const { method, security, request, responses } = endpointSpec; let path = endpointSpec.path; - // validate the request body + // check the request body is there if it's meant to be if (body == null && request.body?.schema != null) { throw { type: "missing_body", @@ -74,6 +75,10 @@ export async function requestEndpoint( [name]: `${element}`, }; break; + case "body": { + JsonPointer.set(body, parameter.pointer, element); + break; + } } } } @@ -89,6 +94,16 @@ export async function requestEndpoint( } } + // add any static body content + if (request.body?.static != null) { + for (const pointer in request.body.static) { + if (Object.prototype.hasOwnProperty.call(request.body.static, pointer)) { + const element = request.body.static[pointer]; + JsonPointer.set(body, pointer, element); + } + } + } + // build the fetch config const url = `${baseUrl}${path}`; let fetchConfig: FetchConfig = { From 470b02457ab4f7952973e64ee24340a1887c17e1 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 13:06:31 +0000 Subject: [PATCH 014/113] Progress on webhook specs and making a webhook --- apps/integrations/src/core/webhook/index.ts | 100 ++++++++++++ apps/integrations/src/core/webhook/types.ts | 109 +++++++------ .../src/core/webhook/webhook.test.ts | 34 ++++ .../integrations/typeform/webhooks/specs.ts | 149 ++++++++++++++++++ .../integrations/typeform/webhooks/webhook.ts | 34 ---- 5 files changed, 347 insertions(+), 79 deletions(-) create mode 100644 apps/integrations/src/core/webhook/index.ts create mode 100644 apps/integrations/src/core/webhook/webhook.test.ts create mode 100644 apps/integrations/src/integrations/typeform/webhooks/specs.ts delete mode 100644 apps/integrations/src/integrations/typeform/webhooks/webhook.ts diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts new file mode 100644 index 00000000000..e09550291ff --- /dev/null +++ b/apps/integrations/src/core/webhook/index.ts @@ -0,0 +1,100 @@ +import { + AuthCredentials, + IntegrationAuthentication, +} from "core/authentication/types"; +import { requestEndpoint } from "core/request/requestEndpoint"; +import { + WebhookSpec, + WebhookSubscriptionRequest, + WebhookSubscriptionResult, +} from "./types"; + +export const makeWebhook = ({ + baseUrl, + spec, + authentication, +}: { + baseUrl: string; + spec: WebhookSpec; + authentication: IntegrationAuthentication; +}) => { + const subscribe = async (config: WebhookSubscriptionRequest) => { + return await subscribeToWebhook({ + baseUrl, + authentication, + webhook: spec, + credentials: config.credentials, + callbackUrl: config.callbackUrl, + events: config.events, + secret: config.secret, + data: config.data, + }); + }; + + return { + spec, + subscribe, + }; +}; + +async function subscribeToWebhook({ + baseUrl, + authentication, + webhook, + credentials, + callbackUrl, + events, + secret, + data, +}: { + baseUrl: string; + authentication: IntegrationAuthentication; + webhook: WebhookSpec; + credentials?: AuthCredentials; + callbackUrl: string; + events: string[]; + secret?: string; + data: Record; +}): Promise { + switch (webhook.subscribe.type) { + case "manual": + return { + success: true, + callbackUrl, + events, + data, + }; + case "automatic": { + const response = await requestEndpoint( + { + baseUrl, + endpointSpec: webhook.subscribe.create, + authentication, + }, + { + credentials, + parameters: { + callbackUrl, + events, + secret, + ...data, + }, + } + ); + + if (response.success) { + return { + success: true, + callbackUrl, + events, + data, + }; + } + + return { + success: false, + error: response.body, + }; + } + } +} diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 67292294d45..cea94e661f2 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -1,14 +1,27 @@ -import { AuthCredentials } from "core/authentication/types"; +import { + AuthCredentials, + IntegrationAuthentication, +} from "core/authentication/types"; +import { EndpointSpec } from "core/endpoint/types"; import { FetchConfig, HTTPMethod } from "core/request/types"; import { JSONSchema } from "json-schema-to-typescript"; -export type Webhook = { +type Webhook = { + baseUrl: string; + spec: WebhookSpec; + authentication: IntegrationAuthentication; + subscribe: ( + data: WebhookSubscriptionRequest + ) => Promise; +}; + +export type WebhookSpec = { id: string; metadata: WebhookMetadata; events: string[]; - subscribe: WebhookSubscribe; - verify: WebhookVerify; - receive: WebhookReceive; + subscribe: WebhookSpecSubscribe; + // verify: WebhookVerify; + // receive: WebhookReceive; }; export type WebhookMetadata = { @@ -26,7 +39,7 @@ type ExternalDocs = { url: string; }; -export type WebhookSubscribe = +export type WebhookSpecSubscribe = | WebhookSpecSubscribeManual | WebhookSpecSubscribeAutomatic; @@ -34,54 +47,60 @@ type WebhookSpecSubscribeManual = { type: "manual"; }; -type WebhookSubscriptionResult = { - success: true; - callbackUrl: string; - events: string[]; - data: any; -}; - export interface WebhookSpecSubscribeAutomatic { type: "automatic"; - create: (data: { - credentials: AuthCredentials; - callbackUrl: string; - events: string[]; - secret?: string; - params: Record; - }) => Promise; - - //todo unsubscribe + create: EndpointSpec; + //todo delete: EndpointSpec; } -type WebhookRequestData = { - request: NormalizedRequest; +export type WebhookSubscriptionRequest = { credentials?: AuthCredentials; + callbackUrl: string; + events: string[]; secret?: string; + data: Record; }; -type WebhookVerifyResponse = - | { status: "ok"; data: any } - | { status: "ignored"; reason: string } - | { status: "error"; error: string }; +export type WebhookSubscriptionResult = + | { + success: true; + callbackUrl: string; + events: string[]; + data: any; + } + | { + success: false; + error: string; + }; -type WebhookVerify = ( - request: WebhookRequestData -) => Promise; +// type WebhookRequestData = { +// request: NormalizedRequest; +// credentials?: AuthCredentials; +// secret?: string; +// }; -//todo this will be called when receiving a request (can be verify or an actual webhook) -//the service will have to decide what to do with it -//need auth credentials -type WebhookReceive = (request: WebhookRequestData) => Promise; +// type WebhookVerifyResponse = +// | { status: "ok"; data: any } +// | { status: "ignored"; reason: string } +// | { status: "error"; error: string }; -type NormalizedRequest = { - method: HTTPMethod; - searchParams: URLSearchParams; - headers: Record; - rawBody: Buffer; - body: any; -}; +// type WebhookVerify = ( +// request: WebhookRequestData +// ) => Promise; -type EventData = { - payload: JSONSchema; -}; +// //todo this will be called when receiving a request (can be verify or an actual webhook) +// //the service will have to decide what to do with it +// //need auth credentials +// type WebhookReceive = (request: WebhookRequestData) => Promise; + +// type NormalizedRequest = { +// method: HTTPMethod; +// searchParams: URLSearchParams; +// headers: Record; +// rawBody: Buffer; +// body: any; +// }; + +// type EventData = { +// payload: JSONSchema; +// }; diff --git a/apps/integrations/src/core/webhook/webhook.test.ts b/apps/integrations/src/core/webhook/webhook.test.ts new file mode 100644 index 00000000000..db83c1a5165 --- /dev/null +++ b/apps/integrations/src/core/webhook/webhook.test.ts @@ -0,0 +1,34 @@ +import { startNock, stopNock } from "testing/nock"; +import { describe, expect, test } from "vitest"; +import { subscribe } from "."; + +const authToken = () => process.env.TYPEFORM_API_KEY ?? ""; + +describe("webhook", async () => { + test("subscribe", async () => { + const accessToken = authToken(); + + const nockDone = await startNock("notion.getUser"); + const result = await subscribe({ + baseUrl: "https://api.notion.com/v1", + }); + + const data = await endpoints.getUser.request({ + parameters: { + user_id: "cc18a80a-973f-42c4-8fed-a055f8ae31f4", + "Notion-Version": notionVersion, + }, + credentials: { + type: "oauth2", + name: "oauth", + accessToken, + scopes: [""], + }, + }); + + expect(data.status).toEqual(200); + expect(data.success).toEqual(true); + expect(data.body).not.toBeNull(); + stopNock(nockDone); + }); +}); diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts new file mode 100644 index 00000000000..9c77f84c668 --- /dev/null +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -0,0 +1,149 @@ +import { createJSONPointer } from "core/common/pointer"; +import { EndpointSpec } from "core/endpoint/types"; +import { WebhookSpec } from "core/webhook/types"; + +const createEndpoint: EndpointSpec = { + method: "PUT", + path: "/forms/{form_id}/webhooks/{tag}", + metadata: { + name: "Create webhook", + description: "Create a webhook for a form", + displayProperties: { + title: "Create webhook", + }, + tags: ["form"], + }, + security: { + accessToken: ["webhooks:write"], + }, + parameters: [ + { + name: "form_id", + description: "The form ID", + required: true, + schema: { + type: "string", + }, + in: "path", + }, + { + name: "tag", + description: "The webhook tag", + required: true, + schema: { + type: "string", + }, + in: "path", + }, + { + name: "secret", + description: "The webhook secret", + required: true, + schema: { + type: "string", + }, + in: "body", + pointer: createJSONPointer(["secret"]), + }, + { + name: "callbackUrl", + description: "The webhook url", + required: true, + schema: { + type: "string", + }, + in: "body", + pointer: createJSONPointer(["url"]), + }, + ], + request: { + headers: { + "Content-Type": "application/json", + }, + body: { + schema: { + type: "object", + properties: { + enabled: { + type: "boolean", + }, + secret: { + type: "string", + }, + url: { + type: "string", + }, + verify_ssl: { + type: "boolean", + }, + }, + }, + static: { + "/enabled": true, + "/verify_ssl": true, + }, + }, + }, + responses: [ + { + success: true, + name: "Success", + matches: ({ statusCode }) => statusCode >= 200 && statusCode < 300, + schema: { + type: "object", + properties: { + created_at: { + type: "string", + }, + enabled: { + type: "boolean", + }, + form_id: { + type: "string", + }, + id: { + type: "string", + }, + tag: { + type: "string", + }, + updated_at: { + type: "string", + }, + url: { + type: "string", + }, + verify_ssl: { + type: "boolean", + }, + }, + }, + }, + { + success: false, + name: "Error", + matches: ({ statusCode }) => statusCode < 200 || statusCode >= 300, + schema: { + type: "object", + additionalProperties: true, + }, + }, + ], +}; + +export const webhook: WebhookSpec = { + id: "form_response", + metadata: { + name: "Form response", + description: "A response to your Typeform", + displayProperties: { + title: "New response to your typeform", + }, + tags: ["form"], + }, + events: ["form_response"], + subscribe: { + type: "automatic", + create: createEndpoint, + }, +}; diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhook.ts b/apps/integrations/src/integrations/typeform/webhooks/webhook.ts deleted file mode 100644 index c8de9eff24d..00000000000 --- a/apps/integrations/src/integrations/typeform/webhooks/webhook.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Webhook } from "core/webhook/types"; - -export const webhook: Webhook = { - id: "form_response", - metadata: { - name: "Form response", - description: "A response to your Typeform", - displayProperties: { - title: "New response to your typeform", - }, - tags: ["form"], - }, - events: ["form_response"], - subscribe: { - type: "automatic", - create: async ({ credentials, callbackUrl, events, secret, params }) => { - return { - method: "POST", - url: `https://api.typeform.com/forms/${params.form_id}/webhooks/${params.tag}`, - headers: { - "Content-Type": "application/json", - //todo credentials - Authorization: `Bearer ${credentials}`, - }, - body: { - enabled: true, - secret, - url: callbackUrl, - verify_ssl: true, - }, - }; - }, - }, -}; From 746e655febf4781a38077892b73128fcea2a9dea Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 13:35:06 +0000 Subject: [PATCH 015/113] Subscribing to webhook working --- .../src/core/request/requestEndpoint.ts | 8 +++- .../src/core/webhook/webhook.test.ts | 34 ----------------- .../integrations/typeform/authentication.ts | 33 ++++++++++++++++ .../src/integrations/typeform/index.ts | 13 +++++++ .../typeform/tests/webhooks.test.ts | 38 +++++++++++++++++++ .../integrations/typeform/webhooks/specs.ts | 2 +- .../typeform/webhooks/webhooks.ts | 15 ++++++++ 7 files changed, 107 insertions(+), 36 deletions(-) delete mode 100644 apps/integrations/src/core/webhook/webhook.test.ts create mode 100644 apps/integrations/src/integrations/typeform/authentication.ts create mode 100644 apps/integrations/src/integrations/typeform/index.ts create mode 100644 apps/integrations/src/integrations/typeform/tests/webhooks.test.ts create mode 100644 apps/integrations/src/integrations/typeform/webhooks/webhooks.ts diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index 440e37d92e3..ee2f7eeeb12 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -23,7 +23,8 @@ export async function requestEndpoint( let path = endpointSpec.path; // check the request body is there if it's meant to be - if (body == null && request.body?.schema != null) { + const requiresBody = request.body?.schema != null; + if (body == null && requiresBody && request.body?.static === undefined) { throw { type: "missing_body", }; @@ -31,6 +32,11 @@ export async function requestEndpoint( let headers: Record = {}; + //if the body doesn't exist but is required, create it + if (requiresBody && body == null) { + body = {}; + } + // validate and add the parameters if (endpointSpec.parameters != null) { for (const parameter of endpointSpec.parameters) { diff --git a/apps/integrations/src/core/webhook/webhook.test.ts b/apps/integrations/src/core/webhook/webhook.test.ts deleted file mode 100644 index db83c1a5165..00000000000 --- a/apps/integrations/src/core/webhook/webhook.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { startNock, stopNock } from "testing/nock"; -import { describe, expect, test } from "vitest"; -import { subscribe } from "."; - -const authToken = () => process.env.TYPEFORM_API_KEY ?? ""; - -describe("webhook", async () => { - test("subscribe", async () => { - const accessToken = authToken(); - - const nockDone = await startNock("notion.getUser"); - const result = await subscribe({ - baseUrl: "https://api.notion.com/v1", - }); - - const data = await endpoints.getUser.request({ - parameters: { - user_id: "cc18a80a-973f-42c4-8fed-a055f8ae31f4", - "Notion-Version": notionVersion, - }, - credentials: { - type: "oauth2", - name: "oauth", - accessToken, - scopes: [""], - }, - }); - - expect(data.status).toEqual(200); - expect(data.success).toEqual(true); - expect(data.body).not.toBeNull(); - stopNock(nockDone); - }); -}); diff --git a/apps/integrations/src/integrations/typeform/authentication.ts b/apps/integrations/src/integrations/typeform/authentication.ts new file mode 100644 index 00000000000..1da2b2ff567 --- /dev/null +++ b/apps/integrations/src/integrations/typeform/authentication.ts @@ -0,0 +1,33 @@ +import { IntegrationAuthentication } from "core/authentication/types"; + +export const authentication: IntegrationAuthentication = { + accessToken: { + type: "api_key", + placement: { + in: "header", + type: "bearer", + key: "Authorization", + }, + documentation: `1. [Log in to the personal access token page](https://admin.typeform.com/user/tokens) at Typeform. +2. Click Generate a new token. +3. In the Token name field, type a name for the token to help you identify it. +4. Select the scopes you want, you will need the webhook ones if you wish to subscribe to events. +5. Click Generate token. +6. Copy the token and paste it into the field below.`, + scopes: { + "accounts:read": "accounts:read", + "forms:write": "forms:write", + "forms:read": "forms:read", + "images:write": "images:write", + "images:read": "images:read", + "themes:write": "themes:write", + "themes:read": "themes:read", + "responses:read": "responses:read", + "responses:write": "responses:write", + "webhooks:read": "webhooks:read", + "webhooks:write": "webhooks:write", + "workspaces:read": "workspaces:read", + "workspaces:write": "workspaces:write", + }, + }, +}; diff --git a/apps/integrations/src/integrations/typeform/index.ts b/apps/integrations/src/integrations/typeform/index.ts new file mode 100644 index 00000000000..979a4f56341 --- /dev/null +++ b/apps/integrations/src/integrations/typeform/index.ts @@ -0,0 +1,13 @@ +import { Service } from "core/service/types"; +import { authentication } from "./authentication"; + +export const typeform: Service = { + name: "Typeform", + service: "typeform", + version: "0.1.21", + baseUrl: "https://api.typeform.com", + live: true, + authentication, + actions: {}, + retryableStatusCodes: [408, 429, 500, 502, 503, 504], +}; diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts new file mode 100644 index 00000000000..22623734d01 --- /dev/null +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -0,0 +1,38 @@ +import { startNock, stopNock } from "testing/nock"; +import { describe, expect, test } from "vitest"; +import webhooks from "../webhooks/webhooks"; + +const authToken = () => process.env.TYPEFORM_ACCESS_TOKEN ?? ""; + +describe("typeform.webhooks", async () => { + test("subscribe", async () => { + const accessToken = authToken(); + + // const nockDone = await startNock("typeform.webhook.subscribe"); + + try { + const result = await webhooks.formResponse.subscribe({ + callbackUrl: "https://example.com", + events: ["form_response"], + secret: "secret", + data: { + form_id: "NclFXN1d", + tag: "myTag", + }, + credentials: { + type: "api_key", + name: "accessToken", + api_key: accessToken, + scopes: ["webhooks:write"], + }, + }); + + console.log(result); + expect(result.success).toEqual(true); + // stopNock(nockDone); + } catch (e) { + console.error(e); + expect(true).toBe(false); + } + }); +}); diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index 9c77f84c668..fed5b58ecdb 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -131,7 +131,7 @@ const createEndpoint: EndpointSpec = { ], }; -export const webhook: WebhookSpec = { +export const formResponse: WebhookSpec = { id: "form_response", metadata: { name: "Form response", diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts new file mode 100644 index 00000000000..241d15d35fc --- /dev/null +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -0,0 +1,15 @@ +import { makeWebhook } from "core/webhook"; +import { authentication } from "../authentication"; +import { formResponse } from "./specs"; + +const baseUrl = "https://api.typeform.com"; + +const webhook = makeWebhook({ + baseUrl, + spec: formResponse, + authentication, +}); + +export default { + formResponse: webhook, +}; From bdfff2cd8c345c629fbd33ca02ee9376ef2723c5 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 15:12:32 +0000 Subject: [PATCH 016/113] Subscribing to webhooks now allows manipulating the data after the request, so you can add secrets from the response --- apps/integrations/src/core/webhook/index.ts | 38 +++++++------- apps/integrations/src/core/webhook/types.ts | 3 ++ .../fixtures/typeform.webhook.subscribe.json | 52 +++++++++++++++++++ .../typeform/tests/webhooks.test.ts | 42 +++++++++++++-- .../typeform/webhooks/webhooks.ts | 16 ++++-- 5 files changed, 124 insertions(+), 27 deletions(-) create mode 100644 apps/integrations/src/fixtures/typeform.webhook.subscribe.json diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index e09550291ff..dd9147f029d 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -9,17 +9,19 @@ import { WebhookSubscriptionResult, } from "./types"; -export const makeWebhook = ({ - baseUrl, - spec, - authentication, -}: { - baseUrl: string; - spec: WebhookSpec; - authentication: IntegrationAuthentication; -}) => { +export const makeWebhook = ( + data: { + baseUrl: string; + spec: WebhookSpec; + authentication: IntegrationAuthentication; + }, + postSubscribe?: ( + result: WebhookSubscriptionResult + ) => WebhookSubscriptionResult +) => { const subscribe = async (config: WebhookSubscriptionRequest) => { - return await subscribeToWebhook({ + const { baseUrl, spec, authentication } = data; + const result = await subscribeToWebhook({ baseUrl, authentication, webhook: spec, @@ -29,10 +31,12 @@ export const makeWebhook = ({ secret: config.secret, data: config.data, }); + if (!postSubscribe) return result; + return postSubscribe(result); }; return { - spec, + spec: data.spec, subscribe, }; }; @@ -58,12 +62,7 @@ async function subscribeToWebhook({ }): Promise { switch (webhook.subscribe.type) { case "manual": - return { - success: true, - callbackUrl, - events, - data, - }; + throw new Error("Manual webhooks shouldn't call subscribe"); case "automatic": { const response = await requestEndpoint( { @@ -87,7 +86,10 @@ async function subscribeToWebhook({ success: true, callbackUrl, events, - data, + secret, + status: response.status, + headers: response.headers, + data: response.body, }; } diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index cea94e661f2..2b98f195ed8 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -66,6 +66,9 @@ export type WebhookSubscriptionResult = success: true; callbackUrl: string; events: string[]; + secret?: string; + status: number; + headers?: Record; data: any; } | { diff --git a/apps/integrations/src/fixtures/typeform.webhook.subscribe.json b/apps/integrations/src/fixtures/typeform.webhook.subscribe.json new file mode 100644 index 00000000000..26d3498b02c --- /dev/null +++ b/apps/integrations/src/fixtures/typeform.webhook.subscribe.json @@ -0,0 +1,52 @@ +[ + { + "scope": "https://api.typeform.com:443", + "method": "PUT", + "path": "/forms/NclFXN1d/webhooks/myTag", + "body": { + "secret": "123456", + "url": "https://example.com", + "enabled": true, + "verify_ssl": true + }, + "status": 200, + "response": { + "id": "01GTH8BG8S4KK1XW38SNDN1SRV", + "form_id": "NclFXN1d", + "tag": "myTag", + "url": "https://example.com", + "enabled": true, + "verify_ssl": true, + "secret": "123456", + "created_at": "2023-03-02T13:32:00.154368Z", + "updated_at": "2023-03-02T15:08:01.697884Z" + }, + "rawHeaders": [ + "Date", + "Thu, 02 Mar 2023 15:08:01 GMT", + "Content-Type", + "application/json; charset=UTF-8", + "Content-Length", + "236", + "Connection", + "close", + "Set-Cookie", + "AWSALBTG=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/", + "Set-Cookie", + "AWSALBTGCORS=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/; SameSite=None; Secure", + "server", + "istio-envoy", + "x-envoy-upstream-service-time", + "14", + "access-control-allow-methods", + "GET, OPTIONS, POST, PUT, PATCH, DELETE", + "access-control-allow-headers", + "X-Typeform-Key, Content-Type, Authorization, Typeform-Version, typeform-app", + "access-control-expose-headers", + "Location, X-Request-Id", + "strict-transport-security", + "max-age=63072000; includeSubDomains" + ], + "responseIsBinary": false + } +] \ No newline at end of file diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index 22623734d01..75bfaea108e 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -8,13 +8,12 @@ describe("typeform.webhooks", async () => { test("subscribe", async () => { const accessToken = authToken(); - // const nockDone = await startNock("typeform.webhook.subscribe"); - + const nockDone = await startNock("typeform.webhook.subscribe"); try { const result = await webhooks.formResponse.subscribe({ callbackUrl: "https://example.com", events: ["form_response"], - secret: "secret", + secret: "123456", data: { form_id: "NclFXN1d", tag: "myTag", @@ -29,7 +28,42 @@ describe("typeform.webhooks", async () => { console.log(result); expect(result.success).toEqual(true); - // stopNock(nockDone); + expect(result).toMatchInlineSnapshot(` + { + "callbackUrl": "https://example.com", + "data": { + "created_at": "2023-03-02T13:32:00.154368Z", + "enabled": true, + "form_id": "NclFXN1d", + "id": "01GTH8BG8S4KK1XW38SNDN1SRV", + "secret": "123456", + "tag": "myTag", + "updated_at": "2023-03-02T15:08:01.697884Z", + "url": "https://example.com", + "verify_ssl": true, + }, + "events": [ + "form_response", + ], + "headers": { + "access-control-allow-headers": "X-Typeform-Key, Content-Type, Authorization, Typeform-Version, typeform-app", + "access-control-allow-methods": "GET, OPTIONS, POST, PUT, PATCH, DELETE", + "access-control-expose-headers": "Location, X-Request-Id", + "connection": "close", + "content-length": "236", + "content-type": "application/json; charset=UTF-8", + "date": "Thu, 02 Mar 2023 15:08:01 GMT", + "server": "istio-envoy", + "set-cookie": "AWSALBTG=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/, AWSALBTGCORS=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/; SameSite=None; Secure", + "strict-transport-security": "max-age=63072000; includeSubDomains", + "x-envoy-upstream-service-time": "14", + }, + "secret": "super-secret", + "status": 200, + "success": true, + } + `); + stopNock(nockDone); } catch (e) { console.error(e); expect(true).toBe(false); diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 241d15d35fc..de3209a9b6f 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -4,11 +4,17 @@ import { formResponse } from "./specs"; const baseUrl = "https://api.typeform.com"; -const webhook = makeWebhook({ - baseUrl, - spec: formResponse, - authentication, -}); +const webhook = makeWebhook( + { + baseUrl, + spec: formResponse, + authentication, + }, + (result) => ({ + ...result, + secret: "super-secret", + }) +); export default { formResponse: webhook, From 8ac8042a22ffb958b79352bf35057facfccf26c5 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 18:40:32 +0000 Subject: [PATCH 017/113] Lots more progress on webhook and event types/functions --- .../core/authentication/credentials.test.ts | 4 +- .../src/core/authentication/credentials.ts | 8 +- .../src/core/fetch/serviceFetch.ts | 4 +- .../src/core/request/requestEndpoint.ts | 4 +- apps/integrations/src/core/request/types.ts | 8 +- apps/integrations/src/core/webhook/index.ts | 74 ++++++++++++++++--- apps/integrations/src/core/webhook/types.ts | 66 ++++++++--------- .../typeform/tests/webhooks.test.ts | 3 +- 8 files changed, 114 insertions(+), 57 deletions(-) diff --git a/apps/integrations/src/core/authentication/credentials.test.ts b/apps/integrations/src/core/authentication/credentials.test.ts index 0d00cc45d1e..b266ea75580 100644 --- a/apps/integrations/src/core/authentication/credentials.test.ts +++ b/apps/integrations/src/core/authentication/credentials.test.ts @@ -1,5 +1,5 @@ import { EndpointSpec } from "core/endpoint/types"; -import { FetchConfig } from "core/request/types"; +import { HTTPRequest } from "core/request/types"; import { expect, test } from "vitest"; import { checkRequiredScopes, applyCredentials } from "./credentials"; import { AuthCredentials, IntegrationAuthentication } from "./types"; @@ -63,7 +63,7 @@ test("Applied credentials", async () => { }, }; - const existingFetch: FetchConfig = { + const existingFetch: HTTPRequest = { url: "https://example.com", method: "GET", headers: { diff --git a/apps/integrations/src/core/authentication/credentials.ts b/apps/integrations/src/core/authentication/credentials.ts index 760bb1c5457..4a53989da2d 100644 --- a/apps/integrations/src/core/authentication/credentials.ts +++ b/apps/integrations/src/core/authentication/credentials.ts @@ -1,11 +1,11 @@ import { EndpointSpec } from "core/endpoint/types"; import { InsufficientScopesError } from "core/request/errors"; -import { FetchConfig } from "core/request/types"; +import { HTTPRequest } from "core/request/types"; import { IntegrationAuthentication, AuthCredentials } from "./types"; /** Apply the given credentials to the given fetch config */ export function applyCredentials( - fetch: FetchConfig, + fetch: HTTPRequest, { endpointSecurity, authentication, @@ -15,7 +15,7 @@ export function applyCredentials( authentication: IntegrationAuthentication; credentials: AuthCredentials; } -): FetchConfig { +): HTTPRequest { if (endpointSecurity === undefined) return fetch; // check if the credentials have the required scopes const requiredScopes = endpointSecurity[credentials.name] ?? []; @@ -32,7 +32,7 @@ export function applyCredentials( } export function addCredentialsToConfig( - fetch: FetchConfig, + fetch: HTTPRequest, { authentication, credentials, diff --git a/apps/integrations/src/core/fetch/serviceFetch.ts b/apps/integrations/src/core/fetch/serviceFetch.ts index 769428dcc38..7e27c1e3e67 100644 --- a/apps/integrations/src/core/fetch/serviceFetch.ts +++ b/apps/integrations/src/core/fetch/serviceFetch.ts @@ -3,7 +3,7 @@ import { AuthCredentials, IntegrationAuthentication, } from "core/authentication/types"; -import { FetchConfig, HTTPMethod, RequestResponse } from "core/request/types"; +import { HTTPRequest, HTTPMethod, RequestResponse } from "core/request/types"; import { getFetch, normalizeHeaders, @@ -28,7 +28,7 @@ export async function serviceFetch({ credentials, authentication, }: ServiceFetchOptions): Promise { - let fetchConfig: FetchConfig = { + let fetchConfig: HTTPRequest = { url, method, headers: { diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index ee2f7eeeb12..668b6f532c1 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -7,7 +7,7 @@ import { } from "core/fetch/fetchUtilities"; import { JSONSchemaError } from "core/schemas/types"; import { - FetchConfig, + HTTPRequest, RequestData, RequestResponse, RequestSpec, @@ -112,7 +112,7 @@ export async function requestEndpoint( // build the fetch config const url = `${baseUrl}${path}`; - let fetchConfig: FetchConfig = { + let fetchConfig: HTTPRequest = { url, method, headers: { diff --git a/apps/integrations/src/core/request/types.ts b/apps/integrations/src/core/request/types.ts index 17c6630bd4f..8809e80d0f8 100644 --- a/apps/integrations/src/core/request/types.ts +++ b/apps/integrations/src/core/request/types.ts @@ -18,13 +18,19 @@ export const HTTPMethodSchema = z.union([ export type HTTPMethod = z.infer; -export interface FetchConfig { +export interface HTTPRequest { url: string; method: HTTPMethod; headers: Record; body?: any; } +export interface HTTPResponse { + status: number; + headers: Record; + body?: any; +} + export interface RequestSpec { baseUrl: string; endpointSpec: EndpointSpec; diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index dd9147f029d..3e1e032eb39 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -3,24 +3,37 @@ import { IntegrationAuthentication, } from "core/authentication/types"; import { requestEndpoint } from "core/request/requestEndpoint"; +import { HTTPResponse } from "core/request/types"; import { + Webhook, + WebhookEvent, + WebhookReceiveRequest, WebhookSpec, WebhookSubscriptionRequest, WebhookSubscriptionResult, } from "./types"; -export const makeWebhook = ( +export function makeWebhook(input: { data: { baseUrl: string; spec: WebhookSpec; authentication: IntegrationAuthentication; - }, + }; + /** the events that belong to this webhook */ + events: WebhookEvent[]; + /** after a subscription you might want to alter the result, e.g. add secret from response */ postSubscribe?: ( result: WebhookSubscriptionResult - ) => WebhookSubscriptionResult -) => { + ) => WebhookSubscriptionResult; + /** You can verify the payload, or if they do a subscription verification you can respond */ + preEvent?: (data: WebhookReceiveRequest) => Promise<{ + processEvents: boolean; + response: HTTPResponse; + }>; +}): Webhook { + const { baseUrl, spec, authentication } = input.data; + const subscribe = async (config: WebhookSubscriptionRequest) => { - const { baseUrl, spec, authentication } = data; const result = await subscribeToWebhook({ baseUrl, authentication, @@ -29,17 +42,58 @@ export const makeWebhook = ( callbackUrl: config.callbackUrl, events: config.events, secret: config.secret, - data: config.data, + data: config.inputData, }); - if (!postSubscribe) return result; - return postSubscribe(result); + if (!input.postSubscribe) return result; + return input.postSubscribe(result); + }; + + const receive = async (receiveRequest: WebhookReceiveRequest) => { + //verification and early response can happen here + const preEventResult = await input.preEvent?.(receiveRequest); + let response: HTTPResponse | undefined = undefined; + if (preEventResult) { + if (!preEventResult.processEvents) return preEventResult; + response = preEventResult.response; + } + + if (!response) { + response = { + status: 200, + headers: {}, + }; + } + + const matchingEvents = input.events.filter((event) => + event.matches({ + subscriptionData: receiveRequest.subscriptionData, + request: receiveRequest.request, + }) + ); + + //todo process relevant events + + const promises = matchingEvents.map((event) => + event.process(receiveRequest) + ); + + const results = await Promise.all(promises); + + return { + response, + eventResults: results.flat(), + }; }; return { - spec: data.spec, + baseUrl: baseUrl, + spec: spec, + authentication: authentication, + events: input.events, subscribe, + receive, }; -}; +} async function subscribeToWebhook({ baseUrl, diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 2b98f195ed8..c701afb5e25 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -3,16 +3,19 @@ import { IntegrationAuthentication, } from "core/authentication/types"; import { EndpointSpec } from "core/endpoint/types"; -import { FetchConfig, HTTPMethod } from "core/request/types"; -import { JSONSchema } from "json-schema-to-typescript"; +import { HTTPMethod, HTTPResponse } from "core/request/types"; -type Webhook = { +export type Webhook = { baseUrl: string; spec: WebhookSpec; authentication: IntegrationAuthentication; + events: WebhookEvent[]; subscribe: ( data: WebhookSubscriptionRequest ) => Promise; + receive: ( + data: WebhookReceiveRequest + ) => Promise<{ eventResults?: WebhookEventResult[]; response: HTTPResponse }>; }; export type WebhookSpec = { @@ -20,8 +23,6 @@ export type WebhookSpec = { metadata: WebhookMetadata; events: string[]; subscribe: WebhookSpecSubscribe; - // verify: WebhookVerify; - // receive: WebhookReceive; }; export type WebhookMetadata = { @@ -58,7 +59,7 @@ export type WebhookSubscriptionRequest = { callbackUrl: string; events: string[]; secret?: string; - data: Record; + inputData: Record; }; export type WebhookSubscriptionResult = @@ -76,34 +77,31 @@ export type WebhookSubscriptionResult = error: string; }; -// type WebhookRequestData = { -// request: NormalizedRequest; -// credentials?: AuthCredentials; -// secret?: string; -// }; - -// type WebhookVerifyResponse = -// | { status: "ok"; data: any } -// | { status: "ignored"; reason: string } -// | { status: "error"; error: string }; - -// type WebhookVerify = ( -// request: WebhookRequestData -// ) => Promise; +export type WebhookReceiveRequest = { + credentials?: AuthCredentials; + secret?: string; + subscriptionData: Record; + request: WebhookIncomingRequest; +}; -// //todo this will be called when receiving a request (can be verify or an actual webhook) -// //the service will have to decide what to do with it -// //need auth credentials -// type WebhookReceive = (request: WebhookRequestData) => Promise; +export type WebhookIncomingRequest = { + method: HTTPMethod; + searchParams: URLSearchParams; + headers: Record; + body: any; + rawBody: Buffer; +}; -// type NormalizedRequest = { -// method: HTTPMethod; -// searchParams: URLSearchParams; -// headers: Record; -// rawBody: Buffer; -// body: any; -// }; +export type WebhookEvent = { + name: string; + matches: (data: { + subscriptionData: Record; + request: WebhookIncomingRequest; + }) => boolean; + process: (data: WebhookReceiveRequest) => Promise; +}; -// type EventData = { -// payload: JSONSchema; -// }; +export type WebhookEventResult = { + event: string; + payload: any; +}; diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index 75bfaea108e..3ac848943d5 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -14,7 +14,7 @@ describe("typeform.webhooks", async () => { callbackUrl: "https://example.com", events: ["form_response"], secret: "123456", - data: { + inputData: { form_id: "NclFXN1d", tag: "myTag", }, @@ -26,7 +26,6 @@ describe("typeform.webhooks", async () => { }, }); - console.log(result); expect(result.success).toEqual(true); expect(result).toMatchInlineSnapshot(` { From 3d1adfdae3292357fbc70ce79d7bb217022c37a1 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 18:45:29 +0000 Subject: [PATCH 018/113] Fixed the typeform webhook so the test passes again --- .../src/integrations/typeform/webhooks/webhooks.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index de3209a9b6f..e895c0cc3ed 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -4,17 +4,18 @@ import { formResponse } from "./specs"; const baseUrl = "https://api.typeform.com"; -const webhook = makeWebhook( - { +const webhook = makeWebhook({ + data: { baseUrl, spec: formResponse, authentication, }, - (result) => ({ + events: [], + postSubscribe: (result) => ({ ...result, secret: "super-secret", - }) -); + }), +}); export default { formResponse: webhook, From 392307b65234bb893c78184ef03c0041540618ad Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 2 Mar 2023 19:16:29 +0000 Subject: [PATCH 019/113] Started fleshing out the first event --- apps/integrations/src/core/webhook/types.ts | 16 +++++++++---- .../integrations/typeform/webhooks/specs.ts | 4 ---- .../typeform/webhooks/webhooks.ts | 23 +++++++++++++++++++ 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index c701afb5e25..e6d133f034a 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -1,9 +1,11 @@ +import { DisplayProperties } from "core/action/types"; import { AuthCredentials, IntegrationAuthentication, } from "core/authentication/types"; import { EndpointSpec } from "core/endpoint/types"; import { HTTPMethod, HTTPResponse } from "core/request/types"; +import { JSONSchema } from "core/schemas/types"; export type Webhook = { baseUrl: string; @@ -21,16 +23,13 @@ export type Webhook = { export type WebhookSpec = { id: string; metadata: WebhookMetadata; - events: string[]; subscribe: WebhookSpecSubscribe; }; export type WebhookMetadata = { name: string; description: string; - displayProperties: { - title: string; - }; + displayProperties: DisplayProperties; externalDocs?: ExternalDocs; tags: string[]; }; @@ -94,6 +93,8 @@ export type WebhookIncomingRequest = { export type WebhookEvent = { name: string; + metadata: WebhookEventMetadata; + schema: JSONSchema; matches: (data: { subscriptionData: Record; request: WebhookIncomingRequest; @@ -101,7 +102,14 @@ export type WebhookEvent = { process: (data: WebhookReceiveRequest) => Promise; }; +export type WebhookEventMetadata = { + description: string; + displayProperties: DisplayProperties; + tags: string[]; +}; + export type WebhookEventResult = { event: string; + displayProperties: DisplayProperties; payload: any; }; diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index fed5b58ecdb..fa195cb214e 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -136,12 +136,8 @@ export const formResponse: WebhookSpec = { metadata: { name: "Form response", description: "A response to your Typeform", - displayProperties: { - title: "New response to your typeform", - }, tags: ["form"], }, - events: ["form_response"], subscribe: { type: "automatic", create: createEndpoint, diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index e895c0cc3ed..b2ba852608d 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -1,9 +1,32 @@ import { makeWebhook } from "core/webhook"; +import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; import { authentication } from "../authentication"; import { formResponse } from "./specs"; const baseUrl = "https://api.typeform.com"; +const formResponseEvent: WebhookEvent = { + name: "form_response", + metadata: { + description: "A form response was submitted", + displayProperties: { + title: "New response", + }, + tags: ["form"], + }, + schema: {}, + matches: () => true, + process: async (data: WebhookReceiveRequest) => [ + { + event: "form_response", + displayProperties: { + title: "New response", + }, + payload: data.request.body, + }, + ], +}; + const webhook = makeWebhook({ data: { baseUrl, From 9f9e8166e7a701687ec7efffeb068e9ad1e864c2 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 10:43:21 +0000 Subject: [PATCH 020/113] =?UTF-8?q?Webhooks=20don=E2=80=99t=20need=20displ?= =?UTF-8?q?ayProperties,=20they=E2=80=99re=20never=20going=20to=20be=20dis?= =?UTF-8?q?played=20(events=20are)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/integrations/src/core/webhook/types.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index e6d133f034a..777f610b61f 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -29,7 +29,6 @@ export type WebhookSpec = { export type WebhookMetadata = { name: string; description: string; - displayProperties: DisplayProperties; externalDocs?: ExternalDocs; tags: string[]; }; From de1508fa87fb5da5aa644cb91c0575aff8b6074a Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 11:01:49 +0000 Subject: [PATCH 021/113] Typeform schema and receiving test working --- apps/integrations/src/core/webhook/types.ts | 1 + .../typeform/tests/webhooks.test.ts | 326 +++++++++++++++++- .../typeform/webhooks/examples.ts | 274 +++++++++++++++ .../integrations/typeform/webhooks/schemas.ts | 309 +++++++++++++++++ .../typeform/webhooks/webhooks.ts | 14 +- 5 files changed, 917 insertions(+), 7 deletions(-) create mode 100644 apps/integrations/src/integrations/typeform/webhooks/examples.ts create mode 100644 apps/integrations/src/integrations/typeform/webhooks/schemas.ts diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 777f610b61f..11197200ab3 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -94,6 +94,7 @@ export type WebhookEvent = { name: string; metadata: WebhookEventMetadata; schema: JSONSchema; + examples: any[]; matches: (data: { subscriptionData: Record; request: WebhookIncomingRequest; diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index 3ac848943d5..cfeff12ed5e 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -1,6 +1,6 @@ import { startNock, stopNock } from "testing/nock"; import { describe, expect, test } from "vitest"; -import webhooks from "../webhooks/webhooks"; +import { webhooks, events } from "../webhooks/webhooks"; const authToken = () => process.env.TYPEFORM_ACCESS_TOKEN ?? ""; @@ -68,4 +68,328 @@ describe("typeform.webhooks", async () => { expect(true).toBe(false); } }); + + test("receiving", async () => { + const accessToken = authToken(); + + //explicitly pass in a payload (this is hardcoded, not from a request) + try { + const result = await webhooks.formResponse.receive({ + credentials: { + type: "api_key", + name: "accessToken", + api_key: accessToken, + scopes: ["webhooks:write"], + }, + secret: "123456", + subscriptionData: { + id: "01GTH8BG8S4KK1XW38SNDN1SRV", + form_id: "NclFXN1d", + tag: "myTag", + url: "https://example.com", + enabled: true, + verify_ssl: true, + secret: "123456", + created_at: "2023-03-02T13:32:00.154368Z", + updated_at: "2023-03-02T15:08:01.697884Z", + }, + request: { + method: "POST", + searchParams: new URLSearchParams(), + headers: {}, + body: events.formResponse.examples[0], + rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), + }, + }); + + expect(result).toMatchInlineSnapshot(` + { + "eventResults": [ + { + "displayProperties": { + "title": "New response", + }, + "event": "form_response", + "payload": { + "event_id": "LtWXD3crgy", + "event_type": "form_response", + "form_response": { + "answers": [ + { + "field": { + "id": "DlXFaesGBpoF", + "type": "long_text", + }, + "text": "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", + "type": "text", + }, + { + "email": "laura@example.com", + "field": { + "id": "SMEUb7VJz92Q", + "type": "email", + }, + "type": "email", + }, + { + "field": { + "id": "JwWggjAKtOkA", + "type": "short_text", + }, + "text": "Laura", + "type": "text", + }, + { + "date": "2005-10-15", + "field": { + "id": "KoJxDM3c6x8h", + "type": "date", + }, + "type": "date", + }, + { + "choices": { + "labels": [ + "London", + "Sydney", + ], + }, + "field": { + "id": "PNe8ZKBK8C2Q", + "type": "picture_choice", + }, + "type": "choices", + }, + { + "field": { + "id": "Q7M2XAwY04dW", + "type": "number", + }, + "number": 5, + "type": "number", + }, + { + "boolean": true, + "field": { + "id": "gFFf3xAkJKsr", + "type": "legal", + }, + "type": "boolean", + }, + { + "choice": { + "label": "London", + }, + "field": { + "id": "k6TP9oLGgHjl", + "type": "multiple_choice", + }, + "type": "choice", + }, + { + "boolean": false, + "field": { + "id": "RUqkXSeXBXSd", + "type": "yes_no", + }, + "type": "boolean", + }, + { + "field": { + "id": "NRsxU591jIW9", + "type": "opinion_scale", + }, + "number": 2, + "type": "number", + }, + { + "field": { + "id": "WOTdC00F8A3h", + "type": "rating", + }, + "number": 3, + "type": "number", + }, + { + "field": { + "id": "pn48RmPazVdM", + "type": "number", + }, + "number": 4, + "type": "number", + }, + { + "field": { + "id": "M5tXK5kG7IeA", + "ref": "readable_ref_calendly", + "type": "calendly", + }, + "type": "url", + "url": "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", + }, + ], + "calculated": { + "score": 9, + }, + "definition": { + "endings": [ + { + "id": "dN5FLyFpCMFo", + "properties": { + "button_mode": "default_redirect", + "button_text": "Create a typeform", + "share_icons": true, + "show_button": true, + }, + "ref": "01GRC8GR2017M6WW347T86VV39", + "title": "Bye!", + "type": "thankyou_screen", + }, + ], + "fields": [ + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "DlXFaesGBpoF", + "ref": "readable_ref_long_text", + "title": "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", + "type": "long_text", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "SMEUb7VJz92Q", + "ref": "readable_ref_email", + "title": "If you're OK with our city management following up if they have further questions, please give us your email address.", + "type": "email", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "JwWggjAKtOkA", + "ref": "readable_ref_short_text", + "title": "What is your first name?", + "type": "short_text", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "KoJxDM3c6x8h", + "ref": "readable_ref_date", + "title": "When did you move to the place where you live?", + "type": "date", + }, + { + "allow_multiple_selections": true, + "allow_other_choice": false, + "id": "PNe8ZKBK8C2Q", + "ref": "readable_ref_picture_choice", + "title": "Which pictures do you like? You can choose as many as you like.", + "type": "picture_choice", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "Q7M2XAwY04dW", + "ref": "readable_ref_number1", + "title": "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", + "type": "number", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "gFFf3xAkJKsr", + "ref": "readable_ref_legal", + "title": "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", + "type": "legal", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "k6TP9oLGgHjl", + "ref": "readable_ref_multiple_choice", + "title": "Which of these cities is your favorite?", + "type": "multiple_choice", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "RUqkXSeXBXSd", + "ref": "readable_ref_yes_no", + "title": "Do you have a favorite city we haven't listed?", + "type": "yes_no", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "NRsxU591jIW9", + "ref": "readable_ref_opinion_scale", + "title": "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", + "type": "opinion_scale", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "WOTdC00F8A3h", + "ref": "readable_ref_rating", + "title": "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", + "type": "rating", + }, + { + "allow_multiple_selections": false, + "allow_other_choice": false, + "id": "pn48RmPazVdM", + "ref": "readable_ref_number2", + "title": "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", + "type": "number", + }, + { + "id": "M5tXK5kG7IeA", + "properties": {}, + "ref": "readable_ref_calendly", + "title": "Book a time with me", + "type": "calendly", + }, + ], + "id": "lT4Z3j", + "title": "Webhooks example", + }, + "ending": { + "id": "dN5FLyFpCMFo", + "ref": "01GRC8GR2017M6WW347T86VV39", + }, + "form_id": "lT4Z3j", + "hidden": { + "user_id": "abc123456", + }, + "landed_at": "2018-01-18T18:07:02Z", + "submitted_at": "2018-01-18T18:17:02Z", + "token": "a3a12ec67a1365927098a606107fac15", + "variables": [ + { + "key": "score", + "number": 4, + "type": "number", + }, + { + "key": "name", + "text": "typeform", + "type": "text", + }, + ], + }, + }, + }, + ], + "response": { + "headers": {}, + "status": 200, + }, + } + `); + } catch (e) { + console.error(e); + expect(true).toBe(false); + } + }); }); diff --git a/apps/integrations/src/integrations/typeform/webhooks/examples.ts b/apps/integrations/src/integrations/typeform/webhooks/examples.ts new file mode 100644 index 00000000000..4cc995ca143 --- /dev/null +++ b/apps/integrations/src/integrations/typeform/webhooks/examples.ts @@ -0,0 +1,274 @@ +export const example = { + event_id: "LtWXD3crgy", + event_type: "form_response", + form_response: { + form_id: "lT4Z3j", + token: "a3a12ec67a1365927098a606107fac15", + submitted_at: "2018-01-18T18:17:02Z", + landed_at: "2018-01-18T18:07:02Z", + calculated: { + score: 9, + }, + variables: [ + { + key: "score", + type: "number", + number: 4, + }, + { + key: "name", + type: "text", + text: "typeform", + }, + ], + hidden: { + user_id: "abc123456", + }, + definition: { + id: "lT4Z3j", + title: "Webhooks example", + fields: [ + { + id: "DlXFaesGBpoF", + title: + "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", + type: "long_text", + ref: "readable_ref_long_text", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "SMEUb7VJz92Q", + title: + "If you're OK with our city management following up if they have further questions, please give us your email address.", + type: "email", + ref: "readable_ref_email", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "JwWggjAKtOkA", + title: "What is your first name?", + type: "short_text", + ref: "readable_ref_short_text", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "KoJxDM3c6x8h", + title: "When did you move to the place where you live?", + type: "date", + ref: "readable_ref_date", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "PNe8ZKBK8C2Q", + title: + "Which pictures do you like? You can choose as many as you like.", + type: "picture_choice", + ref: "readable_ref_picture_choice", + allow_multiple_selections: true, + allow_other_choice: false, + }, + { + id: "Q7M2XAwY04dW", + title: + "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", + type: "number", + ref: "readable_ref_number1", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "gFFf3xAkJKsr", + title: + "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", + type: "legal", + ref: "readable_ref_legal", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "k6TP9oLGgHjl", + title: "Which of these cities is your favorite?", + type: "multiple_choice", + ref: "readable_ref_multiple_choice", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "RUqkXSeXBXSd", + title: "Do you have a favorite city we haven't listed?", + type: "yes_no", + ref: "readable_ref_yes_no", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "NRsxU591jIW9", + title: + "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", + type: "opinion_scale", + ref: "readable_ref_opinion_scale", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "WOTdC00F8A3h", + title: + "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", + type: "rating", + ref: "readable_ref_rating", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "pn48RmPazVdM", + title: + "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", + type: "number", + ref: "readable_ref_number2", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "M5tXK5kG7IeA", + title: "Book a time with me", + type: "calendly", + ref: "readable_ref_calendly", + properties: {}, + }, + ], + endings: [ + { + id: "dN5FLyFpCMFo", + ref: "01GRC8GR2017M6WW347T86VV39", + title: "Bye!", + type: "thankyou_screen", + properties: { + button_text: "Create a typeform", + show_button: true, + share_icons: true, + button_mode: "default_redirect", + }, + }, + ], + }, + answers: [ + { + type: "text", + text: "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", + field: { + id: "DlXFaesGBpoF", + type: "long_text", + }, + }, + { + type: "email", + email: "laura@example.com", + field: { + id: "SMEUb7VJz92Q", + type: "email", + }, + }, + { + type: "text", + text: "Laura", + field: { + id: "JwWggjAKtOkA", + type: "short_text", + }, + }, + { + type: "date", + date: "2005-10-15", + field: { + id: "KoJxDM3c6x8h", + type: "date", + }, + }, + { + type: "choices", + choices: { + labels: ["London", "Sydney"], + }, + field: { + id: "PNe8ZKBK8C2Q", + type: "picture_choice", + }, + }, + { + type: "number", + number: 5, + field: { + id: "Q7M2XAwY04dW", + type: "number", + }, + }, + { + type: "boolean", + boolean: true, + field: { + id: "gFFf3xAkJKsr", + type: "legal", + }, + }, + { + type: "choice", + choice: { + label: "London", + }, + field: { + id: "k6TP9oLGgHjl", + type: "multiple_choice", + }, + }, + { + type: "boolean", + boolean: false, + field: { + id: "RUqkXSeXBXSd", + type: "yes_no", + }, + }, + { + type: "number", + number: 2, + field: { + id: "NRsxU591jIW9", + type: "opinion_scale", + }, + }, + { + type: "number", + number: 3, + field: { + id: "WOTdC00F8A3h", + type: "rating", + }, + }, + { + type: "number", + number: 4, + field: { + id: "pn48RmPazVdM", + type: "number", + }, + }, + { + type: "url", + url: "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", + field: { + id: "M5tXK5kG7IeA", + type: "calendly", + ref: "readable_ref_calendly", + }, + }, + ], + ending: { + id: "dN5FLyFpCMFo", + ref: "01GRC8GR2017M6WW347T86VV39", + }, + }, +}; diff --git a/apps/integrations/src/integrations/typeform/webhooks/schemas.ts b/apps/integrations/src/integrations/typeform/webhooks/schemas.ts new file mode 100644 index 00000000000..1ecc9458996 --- /dev/null +++ b/apps/integrations/src/integrations/typeform/webhooks/schemas.ts @@ -0,0 +1,309 @@ +import { + makeArraySchema, + makeBooleanSchema, + makeNumberSchema, + makeObjectSchema, + makeOneOf, + makeStringSchema, +} from "core/schemas/makeSchema"; + +//Payload reference here +//https://www.typeform.com/developers/webhooks/example-payload/ + +function makeAnswerField(types: string[]) { + let typeField = makeStringSchema("type", `The type of the field`, { + const: types[0], + }); + + if (types.length > 1) { + typeField = makeStringSchema("type", `The type of the field`, { + enum: types, + }); + } + + return makeObjectSchema("field", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the field`), + type: typeField, + }, + optionalProperties: { + ref: makeStringSchema("ref", `The ref of the field`), + }, + }); +} + +const TextAnswer = makeObjectSchema("text answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "text", + }), + text: makeStringSchema("text", `The value of the answer`), + field: makeAnswerField(["short_text", "long_text"]), + }, +}); + +const EmailAnswer = makeObjectSchema("email answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "email", + }), + email: makeStringSchema("email", `The value of the answer`), + field: makeAnswerField(["email"]), + }, +}); + +const DateAnswer = makeObjectSchema("date answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "date", + }), + date: makeStringSchema("date", `The value of the answer`), + field: makeAnswerField(["date"]), + }, +}); + +const ChoicesAnswer = makeObjectSchema("choices answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "choices", + }), + choices: makeObjectSchema("choices", { + requiredProperties: { + labels: makeArraySchema( + "labels", + makeStringSchema("label", `The label of the choice`) + ), + }, + optionalProperties: { + other: makeStringSchema( + "label", + `What the user typed in to the "other" field` + ), + }, + }), + field: makeAnswerField(["picture_choice", "dropdown", "multiple_choice"]), + }, +}); + +const ChoiceAnswer = makeObjectSchema("choice answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "choice", + }), + choice: makeObjectSchema("choice", { + optionalProperties: { + label: makeStringSchema("label", `The label of the choice`), + other: makeStringSchema( + "label", + `What the user typed in to the "other" field` + ), + }, + }), + field: makeAnswerField(["picture_choice", "dropdown", "multiple_choice"]), + }, +}); + +const BooleanAnswer = makeObjectSchema("boolean answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "boolean", + }), + boolean: makeBooleanSchema("boolean", `The value of the answer`), + field: makeAnswerField(["legal", "yes_no"]), + }, +}); + +const UrlAnswer = makeObjectSchema("url answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "url", + }), + url: makeStringSchema("url", `The value of the answer`), + field: makeAnswerField(["website", "calendly"]), + }, +}); + +const NumberAnswer = makeObjectSchema("number answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "number", + }), + number: makeNumberSchema("number", `The value of the answer`), + field: makeAnswerField(["rating", "opinion_scale", "number"]), + }, +}); + +const FileUrlAnswer = makeObjectSchema("file url answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "file_url", + }), + file_url: makeStringSchema("file_url", `The value of the answer`), + field: makeAnswerField(["file_upload"]), + }, +}); + +const PaymentAnswer = makeObjectSchema("payment answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "payment", + }), + payment: makeObjectSchema("payment", { + requiredProperties: { + amount: makeNumberSchema("amount", `The amount of the payment`), + last4: makeStringSchema("last4", `The last 4 digits of the card`), + name: makeStringSchema("name", `The name of the credit card`), + success: makeBooleanSchema("success", `Whether the payment succeeded`), + }, + }), + field: makeAnswerField(["payment"]), + }, +}); + +const Answers = [ + TextAnswer, + ChoiceAnswer, + ChoicesAnswer, + EmailAnswer, + DateAnswer, + BooleanAnswer, + UrlAnswer, + NumberAnswer, + FileUrlAnswer, + PaymentAnswer, +]; + +export const formEventSchema = makeObjectSchema("form_response", { + requiredProperties: { + event_id: makeStringSchema( + "event_id", + `The ID of the event that triggered this webhook` + ), + event_type: makeStringSchema( + "event_type", + `The type of event, always "form_response"`, + { const: "form_response" } + ), + form_response: makeObjectSchema("form_response", { + requiredProperties: { + form_id: makeStringSchema( + "form_id", + `The ID of the form that was submitted` + ), + token: makeStringSchema("token", `The unique token for this response`), + submitted_at: makeStringSchema( + "submitted_at", + `The date and time the response was submitted` + ), + landed_at: makeStringSchema( + "landed_at", + `The date and time the respondent landed on the form` + ), + definition: makeObjectSchema("definition", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the form`), + title: makeStringSchema("title", `The title of the form`), + fields: makeArraySchema( + "fields", + makeObjectSchema("field", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the field`), + title: makeStringSchema("title", `The title of the field`), + type: makeStringSchema("type", `The type of the field`), + ref: makeStringSchema( + "ref", + "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + ), + allow_multiple_selectiors: makeBooleanSchema( + "allow_multiple_selectiors", + "Whether or not the field allows multiple selections" + ), + allow_other_choice: makeBooleanSchema( + "allow_other_choice", + "Whether or not the field allows an 'other' choice" + ), + choices: makeArraySchema( + "choices", + makeObjectSchema("choice", { + requiredProperties: { + label: makeStringSchema( + "label", + "The label of the choice" + ), + id: makeStringSchema("id", "The ID of the choice"), + }, + }) + ), + }, + }) + ), + }, + optionalProperties: { + endings: makeArraySchema( + "endings", + makeObjectSchema("ending", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the ending`), + ref: makeStringSchema( + "ref", + "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + ), + title: makeStringSchema("title", `The title of the ending`), + type: makeStringSchema("type", `The type of the ending`), + }, + additionalProperties: true, + }) + ), + }, + }), + answers: makeArraySchema("answers", makeOneOf("answer", [Answers])), + ending: makeObjectSchema("ending", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the ending`), + ref: makeStringSchema( + "ref", + "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + ), + }, + additionalProperties: true, + }), + }, + optionalProperties: { + calculated: makeObjectSchema("calculated", { + requiredProperties: { + score: makeNumberSchema( + "score", + `The score of the response, if the form has a score field` + ), + }, + }), + variables: makeArraySchema( + "variables", + makeOneOf("variable", [ + makeObjectSchema("number variable", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the variable`), + type: makeStringSchema("type", `The type of the variable`, { + const: "text", + }), + text: makeStringSchema("text", `The value of the variable`), + }, + }), + makeObjectSchema("number variable", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the variable`), + type: makeStringSchema("type", `The type of the variable`, { + const: "number", + }), + number: makeNumberSchema("number", `The value of the variable`), + }, + }), + ]) + ), + hidden: makeObjectSchema("hidden", { + additionalProperties: true, + }), + }, + }), + }, +}); diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index b2ba852608d..8429fde4c56 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -1,11 +1,13 @@ import { makeWebhook } from "core/webhook"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; import { authentication } from "../authentication"; +import { example } from "./examples"; +import { formEventSchema } from "./schemas"; import { formResponse } from "./specs"; const baseUrl = "https://api.typeform.com"; -const formResponseEvent: WebhookEvent = { +export const formResponseEvent: WebhookEvent = { name: "form_response", metadata: { description: "A form response was submitted", @@ -14,7 +16,8 @@ const formResponseEvent: WebhookEvent = { }, tags: ["form"], }, - schema: {}, + schema: formEventSchema, + examples: [example], matches: () => true, process: async (data: WebhookReceiveRequest) => [ { @@ -33,13 +36,12 @@ const webhook = makeWebhook({ spec: formResponse, authentication, }, - events: [], + events: [formResponseEvent], postSubscribe: (result) => ({ ...result, secret: "super-secret", }), }); -export default { - formResponse: webhook, -}; +export const webhooks = { formResponse: webhook }; +export const events = { formResponse: formResponseEvent }; From df7d6a792bb2eb725d1a16cae98a84d323457a2a Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 12:28:01 +0000 Subject: [PATCH 022/113] Deal with signed webhook --- apps/integrations/src/core/webhook/index.ts | 41 +++++++++--- apps/integrations/src/core/webhook/types.ts | 16 ++++- .../typeform/tests/webhooks.test.ts | 62 ++++++++++++++++++- .../typeform/webhooks/webhooks.ts | 31 ++++++++++ 4 files changed, 137 insertions(+), 13 deletions(-) diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 3e1e032eb39..1c4b3b7a4d8 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -26,10 +26,19 @@ export function makeWebhook(input: { result: WebhookSubscriptionResult ) => WebhookSubscriptionResult; /** You can verify the payload, or if they do a subscription verification you can respond */ - preEvent?: (data: WebhookReceiveRequest) => Promise<{ - processEvents: boolean; - response: HTTPResponse; - }>; + preEvent?: (data: WebhookReceiveRequest) => Promise< + | { + success: true; + processEvents: boolean; + response: HTTPResponse; + } + | { + success: false; + error: string; + processEvents: boolean; + response: HTTPResponse; + } + >; }): Webhook { const { baseUrl, spec, authentication } = input.data; @@ -53,7 +62,24 @@ export function makeWebhook(input: { const preEventResult = await input.preEvent?.(receiveRequest); let response: HTTPResponse | undefined = undefined; if (preEventResult) { - if (!preEventResult.processEvents) return preEventResult; + //fail so we return an error + if (!preEventResult.success) { + return { + success: false as const, + error: preEventResult.error, + response: preEventResult.response, + }; + } + + //we don't want to process any events + if (!preEventResult.processEvents) { + return { + success: true as const, + eventResults: [], + response: preEventResult.response, + }; + } + response = preEventResult.response; } @@ -71,8 +97,6 @@ export function makeWebhook(input: { }) ); - //todo process relevant events - const promises = matchingEvents.map((event) => event.process(receiveRequest) ); @@ -80,8 +104,9 @@ export function makeWebhook(input: { const results = await Promise.all(promises); return { - response, + success: true as const, eventResults: results.flat(), + response, }; }; diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 11197200ab3..b622a21099d 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -7,6 +7,18 @@ import { EndpointSpec } from "core/endpoint/types"; import { HTTPMethod, HTTPResponse } from "core/request/types"; import { JSONSchema } from "core/schemas/types"; +export type WebhookResult = + | { + success: true; + eventResults: WebhookEventResult[]; + response: HTTPResponse; + } + | { + success: false; + error: string; + response: HTTPResponse; + }; + export type Webhook = { baseUrl: string; spec: WebhookSpec; @@ -15,9 +27,7 @@ export type Webhook = { subscribe: ( data: WebhookSubscriptionRequest ) => Promise; - receive: ( - data: WebhookReceiveRequest - ) => Promise<{ eventResults?: WebhookEventResult[]; response: HTTPResponse }>; + receive: (data: WebhookReceiveRequest) => Promise; }; export type WebhookSpec = { diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index cfeff12ed5e..16b36e977c4 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -69,7 +69,7 @@ describe("typeform.webhooks", async () => { } }); - test("receiving", async () => { + test("receiving (correct signature)", async () => { const accessToken = authToken(); //explicitly pass in a payload (this is hardcoded, not from a request) @@ -96,7 +96,11 @@ describe("typeform.webhooks", async () => { request: { method: "POST", searchParams: new URLSearchParams(), - headers: {}, + headers: { + "content-type": "application/json", + "typeform-signature": + "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", + }, body: events.formResponse.examples[0], rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), }, @@ -385,6 +389,60 @@ describe("typeform.webhooks", async () => { "headers": {}, "status": 200, }, + "success": true, + } + `); + } catch (e) { + console.error(e); + expect(true).toBe(false); + } + }); + + test("receiving (bad signature)", async () => { + const accessToken = authToken(); + + //explicitly pass in a payload (this is hardcoded, not from a request) + try { + const result = await webhooks.formResponse.receive({ + credentials: { + type: "api_key", + name: "accessToken", + api_key: accessToken, + scopes: ["webhooks:write"], + }, + secret: "123", + subscriptionData: { + id: "01GTH8BG8S4KK1XW38SNDN1SRV", + form_id: "NclFXN1d", + tag: "myTag", + url: "https://example.com", + enabled: true, + verify_ssl: true, + secret: "123456", + created_at: "2023-03-02T13:32:00.154368Z", + updated_at: "2023-03-02T15:08:01.697884Z", + }, + request: { + method: "POST", + searchParams: new URLSearchParams(), + headers: { + "content-type": "application/json", + "typeform-signature": + "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", + }, + body: events.formResponse.examples[0], + rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), + }, + }); + + expect(result).toMatchInlineSnapshot(` + { + "error": "Invalid signature", + "response": { + "headers": {}, + "status": 401, + }, + "success": false, } `); } catch (e) { diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 8429fde4c56..30181c2014f 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -4,6 +4,7 @@ import { authentication } from "../authentication"; import { example } from "./examples"; import { formEventSchema } from "./schemas"; import { formResponse } from "./specs"; +import crypto from "node:crypto"; const baseUrl = "https://api.typeform.com"; @@ -41,6 +42,36 @@ const webhook = makeWebhook({ ...result, secret: "super-secret", }), + preEvent: async (data) => { + if (data.secret) { + const signatureHeader = data.request.headers["typeform-signature"]; + const hash = crypto + .createHmac("sha256", data.secret) + .update(data.request.rawBody) + .digest("base64"); + + if (signatureHeader !== `sha256=${hash}`) { + return { + success: false, + processEvents: false, + error: "Invalid signature", + response: { + status: 401, + headers: {}, + }, + }; + } + } + + return { + success: true, + processEvents: true, + response: { + status: 200, + headers: {}, + }, + }; + }, }); export const webhooks = { formResponse: webhook }; From bdaa09023f1ca43e8ee7a1d81ae7fea0032eb638 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:19:40 +0000 Subject: [PATCH 023/113] =?UTF-8?q?Don=E2=80=99t=20mess=20with=20the=20sec?= =?UTF-8?q?ret=20for=20Typeform=20as=20it=20doesn=E2=80=99t=20need=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/integrations/typeform/tests/webhooks.test.ts | 2 +- .../src/integrations/typeform/webhooks/webhooks.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index 16b36e977c4..bdf5d8bdad2 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -57,7 +57,7 @@ describe("typeform.webhooks", async () => { "strict-transport-security": "max-age=63072000; includeSubDomains", "x-envoy-upstream-service-time": "14", }, - "secret": "super-secret", + "secret": "123456", "status": 200, "success": true, } diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 30181c2014f..ea0354ea613 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -38,11 +38,7 @@ const webhook = makeWebhook({ authentication, }, events: [formResponseEvent], - postSubscribe: (result) => ({ - ...result, - secret: "super-secret", - }), - preEvent: async (data) => { + preProcess: async (data) => { if (data.secret) { const signatureHeader = data.request.headers["typeform-signature"]; const hash = crypto From cb5128c279d09a70524c0de61ec60b038641d11b Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:21:01 +0000 Subject: [PATCH 024/113] Moved the db.server.ts file so it can be used outside of the cache --- apps/integrations/src/cache/postgresCache.ts | 3 +-- apps/integrations/src/{cache => db}/db.server.ts | 0 2 files changed, 1 insertion(+), 2 deletions(-) rename apps/integrations/src/{cache => db}/db.server.ts (100%) diff --git a/apps/integrations/src/cache/postgresCache.ts b/apps/integrations/src/cache/postgresCache.ts index 8bb596dce75..dfd23acd6c3 100644 --- a/apps/integrations/src/cache/postgresCache.ts +++ b/apps/integrations/src/cache/postgresCache.ts @@ -1,6 +1,5 @@ -import type { Prisma, Cache } from ".prisma/client"; -import { prisma } from "./db.server"; import { CacheService } from "core/cache/types"; +import { prisma } from "../db/db.server"; export class PostgresCacheService implements CacheService { constructor(private readonly namespace: string) {} diff --git a/apps/integrations/src/cache/db.server.ts b/apps/integrations/src/db/db.server.ts similarity index 100% rename from apps/integrations/src/cache/db.server.ts rename to apps/integrations/src/db/db.server.ts From d09b5fe124a619ae254a4bf8b1c243d188960496 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:21:17 +0000 Subject: [PATCH 025/113] Renamed preEvent to preProcess --- apps/integrations/src/core/webhook/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 1c4b3b7a4d8..3dd56edd2a7 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -26,7 +26,7 @@ export function makeWebhook(input: { result: WebhookSubscriptionResult ) => WebhookSubscriptionResult; /** You can verify the payload, or if they do a subscription verification you can respond */ - preEvent?: (data: WebhookReceiveRequest) => Promise< + preProcess?: (data: WebhookReceiveRequest) => Promise< | { success: true; processEvents: boolean; @@ -59,7 +59,7 @@ export function makeWebhook(input: { const receive = async (receiveRequest: WebhookReceiveRequest) => { //verification and early response can happen here - const preEventResult = await input.preEvent?.(receiveRequest); + const preEventResult = await input.preProcess?.(receiveRequest); let response: HTTPResponse | undefined = undefined; if (preEventResult) { //fail so we return an error From f47462156d2d9a0662c4d2bf557e9c10189d4adf Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:28:05 +0000 Subject: [PATCH 026/113] Setup objects ready to subscribe to webhooks --- .../src/api/v2/webhooks/create.ts | 33 +++++++++++ .../src/core/webhook/subscribe/index.ts | 14 +++++ .../src/core/webhook/subscribe/types.ts | 56 +++++++++++++++++++ apps/integrations/src/index.ts | 9 +++ 4 files changed, 112 insertions(+) create mode 100644 apps/integrations/src/api/v2/webhooks/create.ts create mode 100644 apps/integrations/src/core/webhook/subscribe/index.ts create mode 100644 apps/integrations/src/core/webhook/subscribe/types.ts diff --git a/apps/integrations/src/api/v2/webhooks/create.ts b/apps/integrations/src/api/v2/webhooks/create.ts new file mode 100644 index 00000000000..55011f8d63a --- /dev/null +++ b/apps/integrations/src/api/v2/webhooks/create.ts @@ -0,0 +1,33 @@ +import { Request, Response } from "express"; +import { + SubscribeInputSchema, + SubscribeResult, +} from "core/webhook/subscribe/types"; +import { SubscribeToWebhook } from "core/webhook/subscribe"; + +export async function handleCreateWebhook(req: Request, res: Response) { + const parsedBody = SubscribeInputSchema.safeParse(req.body); + + if (!parsedBody.success) { + const badBodyResponse: SubscribeResult = { + success: false, + error: { + code: "bad_body", + message: parsedBody.error.message, + }, + }; + res.status(400).json(badBodyResponse); + return; + } + + const subscribeToWebhook = new SubscribeToWebhook(); + const result = await subscribeToWebhook.call(parsedBody.data); + + if (result.success) { + res.status(201).json(result); + return; + } + + res.status(400).send(result); + return; +} diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts new file mode 100644 index 00000000000..61f8a891283 --- /dev/null +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -0,0 +1,14 @@ +import { SubscribeInput, SubscribeResult } from "core/webhook/subscribe/types"; +import { prisma, PrismaClient } from "db/db.server"; + +export class SubscribeToWebhook { + #prismaClient: PrismaClient; + + constructor(prismaClient: PrismaClient = prisma) { + this.#prismaClient = prismaClient; + } + + public async call(input: SubscribeInput): Promise { + return; + } +} diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts new file mode 100644 index 00000000000..1c67c534c1c --- /dev/null +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -0,0 +1,56 @@ +import { z } from "zod"; + +const ServiceSchema = z.object({ + type: z.literal("service"), + consumerId: z.string(), + callbackUrl: z.string().url(), + service: z.string(), + authentication: z.object({ + type: z.literal("oauth"), + connectionId: z.string(), + }), + data: z.record(z.any()), + events: z.array(z.string()), +}); + +const GenericSchema = z.object({ + type: z.literal("generic"), + consumerId: z.string(), + callbackUrl: z.string().url(), + eventName: z.string(), + schema: z.any(), + verifyPayload: z.object({ + enabled: z.boolean(), + header: z.string().optional(), + }), +}); + +export const SubscribeInputSchema = z.discriminatedUnion("type", [ + ServiceSchema, + GenericSchema, +]); + +export type SubscribeInput = z.infer; + +export type SubscribeResult = + | { + success: false; + error: { + code: string; + message: string; + }; + } + | { + success: true; + result: + | { + type: "service"; + webhookId: string; + } + | { + type: "generic"; + webhookId: string; + url: string; + secret?: string; + }; + }; diff --git a/apps/integrations/src/index.ts b/apps/integrations/src/index.ts index 02b136e1fb3..06483e30b6d 100644 --- a/apps/integrations/src/index.ts +++ b/apps/integrations/src/index.ts @@ -5,6 +5,7 @@ import * as Sentry from "@sentry/node"; import dotenv from "dotenv"; import express, { Express, NextFunction, Request, Response } from "express"; import morgan from "morgan"; +import { handleCreateWebhook } from "api/v2/webhooks/create"; dotenv.config(); const app: Express = express(); @@ -59,10 +60,18 @@ app.get("/", (req: Request, res: Response) => { app.get("/healthcheck", (req: Request, res: Response) => { res.send("OK"); }); + +//services app.get("/api/v2/services", handleServices); + +//requests app.post("/api/v2/:service/action/:action/display", handleActionDisplay); app.post("/api/v2/:service/action/:action", handleAction); +//webhooks +app.post("/api/v2/webhooks", handleCreateWebhook); + +//errors app.get("/debug-sentry", function mainHandler(req, res) { throw new Error("My first Sentry error!"); }); From dc805e1910d43e349cf1ba2921ad2fefaf3cabdf Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:32:54 +0000 Subject: [PATCH 027/113] service.actions is now optional --- apps/integrations/src/api/v2/action/validation.ts | 12 ++++++++++++ apps/integrations/src/core/service/types.ts | 2 +- apps/integrations/src/integrations/typeform/index.ts | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/integrations/src/api/v2/action/validation.ts b/apps/integrations/src/api/v2/action/validation.ts index 81d0ad885e1..685fc0247c5 100644 --- a/apps/integrations/src/api/v2/action/validation.ts +++ b/apps/integrations/src/api/v2/action/validation.ts @@ -30,6 +30,18 @@ export function getServiceAction( }; } + if (!matchingService.actions) { + return { + success: false, + error: { + type: "missing_action", + message: "Action not found", + service, + action, + }, + }; + } + const matchingAction = Object.values(matchingService.actions).find( (a) => a.name === action ); diff --git a/apps/integrations/src/core/service/types.ts b/apps/integrations/src/core/service/types.ts index 4c2d3706b09..00a552d6fbe 100644 --- a/apps/integrations/src/core/service/types.ts +++ b/apps/integrations/src/core/service/types.ts @@ -8,6 +8,6 @@ export type Service = { baseUrl: string; live: boolean; authentication: IntegrationAuthentication; - actions: Record; + actions?: Record; retryableStatusCodes: number[]; }; diff --git a/apps/integrations/src/integrations/typeform/index.ts b/apps/integrations/src/integrations/typeform/index.ts index 979a4f56341..70294d89fa6 100644 --- a/apps/integrations/src/integrations/typeform/index.ts +++ b/apps/integrations/src/integrations/typeform/index.ts @@ -8,6 +8,5 @@ export const typeform: Service = { baseUrl: "https://api.typeform.com", live: true, authentication, - actions: {}, retryableStatusCodes: [408, 429, 500, 502, 503, 504], }; From 91632bcdb788d76ec1c72bebab7db4663c3ccda1 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:56:46 +0000 Subject: [PATCH 028/113] Added webhooks to service --- apps/integrations/src/core/service/types.ts | 2 ++ apps/integrations/src/integrations/typeform/index.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/integrations/src/core/service/types.ts b/apps/integrations/src/core/service/types.ts index 00a552d6fbe..1efaef80580 100644 --- a/apps/integrations/src/core/service/types.ts +++ b/apps/integrations/src/core/service/types.ts @@ -1,5 +1,6 @@ import { Action } from "core/action/types"; import { IntegrationAuthentication } from "core/authentication/types"; +import { Webhook } from "core/webhook/types"; export type Service = { name: string; @@ -9,5 +10,6 @@ export type Service = { live: boolean; authentication: IntegrationAuthentication; actions?: Record; + webhooks?: Record; retryableStatusCodes: number[]; }; diff --git a/apps/integrations/src/integrations/typeform/index.ts b/apps/integrations/src/integrations/typeform/index.ts index 70294d89fa6..1659d52f5c4 100644 --- a/apps/integrations/src/integrations/typeform/index.ts +++ b/apps/integrations/src/integrations/typeform/index.ts @@ -1,5 +1,6 @@ import { Service } from "core/service/types"; import { authentication } from "./authentication"; +import { webhooks } from "./webhooks/webhooks"; export const typeform: Service = { name: "Typeform", @@ -8,5 +9,6 @@ export const typeform: Service = { baseUrl: "https://api.typeform.com", live: true, authentication, + webhooks, retryableStatusCodes: [408, 429, 500, 502, 503, 504], }; From a8fbdb1465fc20833975f451b05afd8a7de83726 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 14:56:58 +0000 Subject: [PATCH 029/113] Started work on subscribing from an input --- .../src/core/webhook/subscribe/index.ts | 62 ++++++++++++++++++- .../src/core/webhook/subscribe/types.ts | 5 +- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 61f8a891283..51ff8f4853e 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -1,5 +1,11 @@ -import { SubscribeInput, SubscribeResult } from "core/webhook/subscribe/types"; +import { + SubscribeGenericInput, + SubscribeInput, + SubscribeResult, + SubscribeServiceInput, +} from "core/webhook/subscribe/types"; import { prisma, PrismaClient } from "db/db.server"; +import { catalog } from "integrations/catalog"; export class SubscribeToWebhook { #prismaClient: PrismaClient; @@ -9,6 +15,58 @@ export class SubscribeToWebhook { } public async call(input: SubscribeInput): Promise { - return; + switch (input.type) { + case "service": + return this.#subscribeToService(input); + case "generic": + return this.#subscribeToGeneric(input); + } + } + + async #subscribeToService( + input: SubscribeServiceInput + ): Promise { + const service = catalog.services[input.service]; + if (!service) { + return { + success: false, + error: { + code: "service_not_found", + message: `Service ${input.service} not found`, + }, + }; + } + + if (!service.webhooks) { + return { + success: false, + error: { + code: "service_does_not_support_webhooks", + message: `Service ${input.service} does not support webhooks`, + }, + }; + } + + const webhook = Object.values(service.webhooks).find((w) => + w.events.map((e) => e.name).includes(input.eventName) + ); + + if (!webhook) { + return { + success: false, + error: { + code: "event_not_found", + message: `Event ${input.eventName} not found in service ${input.service}`, + }, + }; + } + + //todo determine if it's automatic or manual + } + + async #subscribeToGeneric( + input: SubscribeGenericInput + ): Promise { + throw new Error("Not implemented"); } } diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index 1c67c534c1c..566186d5e79 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -10,7 +10,7 @@ const ServiceSchema = z.object({ connectionId: z.string(), }), data: z.record(z.any()), - events: z.array(z.string()), + eventName: z.string(), }); const GenericSchema = z.object({ @@ -30,6 +30,9 @@ export const SubscribeInputSchema = z.discriminatedUnion("type", [ GenericSchema, ]); +export type SubscribeServiceInput = z.infer; +export type SubscribeGenericInput = z.infer; + export type SubscribeInput = z.infer; export type SubscribeResult = From 92c3409c90f2ee48022888ff849250f7a3c1cf92 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 15:40:03 +0000 Subject: [PATCH 030/113] Service webhooks now support manual and automatic subscription types --- apps/integrations/src/core/webhook/index.ts | 66 +++++++++++++------ apps/integrations/src/core/webhook/types.ts | 15 ++++- .../typeform/tests/webhooks.test.ts | 7 +- .../typeform/webhooks/webhooks.ts | 3 + 4 files changed, 70 insertions(+), 21 deletions(-) diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 3dd56edd2a7..ee778f79891 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -9,6 +9,7 @@ import { WebhookEvent, WebhookReceiveRequest, WebhookSpec, + WebhookSubscription, WebhookSubscriptionRequest, WebhookSubscriptionResult, } from "./types"; @@ -21,10 +22,17 @@ export function makeWebhook(input: { }; /** the events that belong to this webhook */ events: WebhookEvent[]; - /** after a subscription you might want to alter the result, e.g. add secret from response */ - postSubscribe?: ( - result: WebhookSubscriptionResult - ) => WebhookSubscriptionResult; + subscription: + | { + type: "automatic"; + /** after a subscription you might want to alter the result, e.g. add secret from response */ + postSubscribe?: ( + result: WebhookSubscriptionResult + ) => WebhookSubscriptionResult; + } + | { + type: "manual"; + }; /** You can verify the payload, or if they do a subscription verification you can respond */ preProcess?: (data: WebhookReceiveRequest) => Promise< | { @@ -42,20 +50,40 @@ export function makeWebhook(input: { }): Webhook { const { baseUrl, spec, authentication } = input.data; - const subscribe = async (config: WebhookSubscriptionRequest) => { - const result = await subscribeToWebhook({ - baseUrl, - authentication, - webhook: spec, - credentials: config.credentials, - callbackUrl: config.callbackUrl, - events: config.events, - secret: config.secret, - data: config.inputData, - }); - if (!input.postSubscribe) return result; - return input.postSubscribe(result); - }; + let subscription: WebhookSubscription; + switch (input.subscription.type) { + case "automatic": { + const subscribe = async (config: WebhookSubscriptionRequest) => { + const result = await subscribeToWebhook({ + baseUrl, + authentication, + webhook: spec, + credentials: config.credentials, + callbackUrl: config.callbackUrl, + events: config.events, + secret: config.secret, + data: config.inputData, + }); + //have to do this because TS is dumb because this in a closure + if (!("postSubscribe" in input.subscription)) return result; + + if (!input.subscription.postSubscribe) return result; + return input.subscription.postSubscribe(result); + }; + + subscription = { + type: "automatic", + subscribe: subscribe, + }; + break; + } + case "manual": { + subscription = { + type: "manual", + }; + break; + } + } const receive = async (receiveRequest: WebhookReceiveRequest) => { //verification and early response can happen here @@ -115,7 +143,7 @@ export function makeWebhook(input: { spec: spec, authentication: authentication, events: input.events, - subscribe, + subscription, receive, }; } diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index b622a21099d..4dfc3be29b3 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -24,10 +24,23 @@ export type Webhook = { spec: WebhookSpec; authentication: IntegrationAuthentication; events: WebhookEvent[]; + subscription: WebhookSubscription; + receive: (data: WebhookReceiveRequest) => Promise; +}; + +export type WebhookSubscription = + | WebhookSubscriptionAutomatic + | WebhookSubscriptionManual; + +export type WebhookSubscriptionAutomatic = { + type: "automatic"; subscribe: ( data: WebhookSubscriptionRequest ) => Promise; - receive: (data: WebhookReceiveRequest) => Promise; +}; + +export type WebhookSubscriptionManual = { + type: "manual"; }; export type WebhookSpec = { diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index bdf5d8bdad2..9be87df9af5 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -8,9 +8,14 @@ describe("typeform.webhooks", async () => { test("subscribe", async () => { const accessToken = authToken(); + const subscription = webhooks.formResponse.subscription; + expect(subscription.type).toEqual("automatic"); + if (subscription.type !== "automatic") + throw new Error("Invalid subscription type"); + const nockDone = await startNock("typeform.webhook.subscribe"); try { - const result = await webhooks.formResponse.subscribe({ + const result = await subscription.subscribe({ callbackUrl: "https://example.com", events: ["form_response"], secret: "123456", diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index ea0354ea613..1fcb81505f8 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -38,6 +38,9 @@ const webhook = makeWebhook({ authentication, }, events: [formResponseEvent], + subscription: { + type: "automatic", + }, preProcess: async (data) => { if (data.secret) { const signatureHeader = data.request.headers["typeform-signature"]; From d6dcb4a31f92c384befb8007758f85c7349ef3db Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 16:45:01 +0000 Subject: [PATCH 031/113] Pass the webhookId into subscribe so it can be used in the subscription if needed --- apps/integrations/src/core/webhook/index.ts | 4 + apps/integrations/src/core/webhook/types.ts | 1 + .../fixtures/typeform.webhook.subscribe.json | 20 ++-- .../typeform/tests/webhooks.test.ts | 109 +++++++++--------- .../integrations/typeform/webhooks/specs.ts | 4 +- 5 files changed, 70 insertions(+), 68 deletions(-) diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index ee778f79891..dd9780830a0 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -55,6 +55,7 @@ export function makeWebhook(input: { case "automatic": { const subscribe = async (config: WebhookSubscriptionRequest) => { const result = await subscribeToWebhook({ + id: config.webhookId, baseUrl, authentication, webhook: spec, @@ -149,6 +150,7 @@ export function makeWebhook(input: { } async function subscribeToWebhook({ + id, baseUrl, authentication, webhook, @@ -158,6 +160,7 @@ async function subscribeToWebhook({ secret, data, }: { + id: string; baseUrl: string; authentication: IntegrationAuthentication; webhook: WebhookSpec; @@ -180,6 +183,7 @@ async function subscribeToWebhook({ { credentials, parameters: { + webhookId: id, callbackUrl, events, secret, diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 4dfc3be29b3..af089c0cdb6 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -76,6 +76,7 @@ export interface WebhookSpecSubscribeAutomatic { } export type WebhookSubscriptionRequest = { + webhookId: string; credentials?: AuthCredentials; callbackUrl: string; events: string[]; diff --git a/apps/integrations/src/fixtures/typeform.webhook.subscribe.json b/apps/integrations/src/fixtures/typeform.webhook.subscribe.json index 26d3498b02c..bb2e02cd82c 100644 --- a/apps/integrations/src/fixtures/typeform.webhook.subscribe.json +++ b/apps/integrations/src/fixtures/typeform.webhook.subscribe.json @@ -2,7 +2,7 @@ { "scope": "https://api.typeform.com:443", "method": "PUT", - "path": "/forms/NclFXN1d/webhooks/myTag", + "path": "/forms/NclFXN1d/webhooks/abcdefghijklmnopqrstuvwxyz", "body": { "secret": "123456", "url": "https://example.com", @@ -11,33 +11,33 @@ }, "status": 200, "response": { - "id": "01GTH8BG8S4KK1XW38SNDN1SRV", + "id": "01GTM5P9SHVPWH626RX1HZ2ZRR", "form_id": "NclFXN1d", - "tag": "myTag", + "tag": "abcdefghijklmnopqrstuvwxyz", "url": "https://example.com", "enabled": true, "verify_ssl": true, "secret": "123456", - "created_at": "2023-03-02T13:32:00.154368Z", - "updated_at": "2023-03-02T15:08:01.697884Z" + "created_at": "2023-03-03T16:43:11.537925Z", + "updated_at": "2023-03-03T16:43:11.537925Z" }, "rawHeaders": [ "Date", - "Thu, 02 Mar 2023 15:08:01 GMT", + "Fri, 03 Mar 2023 16:43:11 GMT", "Content-Type", "application/json; charset=UTF-8", "Content-Length", - "236", + "257", "Connection", "close", "Set-Cookie", - "AWSALBTG=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/", + "AWSALBTG=Y11vNY5M69UbXGI3Morm47RBczox072FvVPkuZwkeF3R/wN2w5GHZG76HnQeb9WAwNjzFZAcEn8PfOtDaNysQXS59YP1aCwW3mmsEfP84BTbD5YY6ud89VOIsc+ycvhCA44kyU8BjscMCdRLGjhOCETiAJ92LAABl3wohYQ/XWM+; Expires=Fri, 10 Mar 2023 16:43:11 GMT; Path=/", "Set-Cookie", - "AWSALBTGCORS=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/; SameSite=None; Secure", + "AWSALBTGCORS=Y11vNY5M69UbXGI3Morm47RBczox072FvVPkuZwkeF3R/wN2w5GHZG76HnQeb9WAwNjzFZAcEn8PfOtDaNysQXS59YP1aCwW3mmsEfP84BTbD5YY6ud89VOIsc+ycvhCA44kyU8BjscMCdRLGjhOCETiAJ92LAABl3wohYQ/XWM+; Expires=Fri, 10 Mar 2023 16:43:11 GMT; Path=/; SameSite=None; Secure", "server", "istio-envoy", "x-envoy-upstream-service-time", - "14", + "15", "access-control-allow-methods", "GET, OPTIONS, POST, PUT, PATCH, DELETE", "access-control-allow-headers", diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index 9be87df9af5..c0ff9c7211c 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -14,64 +14,61 @@ describe("typeform.webhooks", async () => { throw new Error("Invalid subscription type"); const nockDone = await startNock("typeform.webhook.subscribe"); - try { - const result = await subscription.subscribe({ - callbackUrl: "https://example.com", - events: ["form_response"], - secret: "123456", - inputData: { - form_id: "NclFXN1d", - tag: "myTag", - }, - credentials: { - type: "api_key", - name: "accessToken", - api_key: accessToken, - scopes: ["webhooks:write"], - }, - }); + const result = await subscription.subscribe({ + webhookId: "abcdefghijklmnopqrstuvwxyz", + callbackUrl: "https://example.com", + events: ["form_response"], + secret: "123456", + inputData: { + form_id: "NclFXN1d", + }, + credentials: { + type: "api_key", + name: "accessToken", + api_key: accessToken, + scopes: ["webhooks:write"], + }, + }); - expect(result.success).toEqual(true); - expect(result).toMatchInlineSnapshot(` - { - "callbackUrl": "https://example.com", - "data": { - "created_at": "2023-03-02T13:32:00.154368Z", - "enabled": true, - "form_id": "NclFXN1d", - "id": "01GTH8BG8S4KK1XW38SNDN1SRV", - "secret": "123456", - "tag": "myTag", - "updated_at": "2023-03-02T15:08:01.697884Z", - "url": "https://example.com", - "verify_ssl": true, - }, - "events": [ - "form_response", - ], - "headers": { - "access-control-allow-headers": "X-Typeform-Key, Content-Type, Authorization, Typeform-Version, typeform-app", - "access-control-allow-methods": "GET, OPTIONS, POST, PUT, PATCH, DELETE", - "access-control-expose-headers": "Location, X-Request-Id", - "connection": "close", - "content-length": "236", - "content-type": "application/json; charset=UTF-8", - "date": "Thu, 02 Mar 2023 15:08:01 GMT", - "server": "istio-envoy", - "set-cookie": "AWSALBTG=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/, AWSALBTGCORS=XZsaxHEp0o9b5mG9n0A3X/wO9cNOtnbHMjapJIb1hdKGJ8qN0ifzSuUQKngIMOP77n/x5dT/3Q7pq0zThx8UEAFbt3ViEgrPGAHfvrC1BgSfUZSTPgKF12cM8jkrY7TN9VYzbo2XYq6rO6fUdVmbmaODWu22sXeAXENcKFLf1Vxk; Expires=Thu, 09 Mar 2023 15:08:01 GMT; Path=/; SameSite=None; Secure", - "strict-transport-security": "max-age=63072000; includeSubDomains", - "x-envoy-upstream-service-time": "14", - }, + console.log(result); + + expect(result.success).toEqual(true); + expect(result).toMatchInlineSnapshot(` + { + "callbackUrl": "https://example.com", + "data": { + "created_at": "2023-03-03T16:43:11.537925Z", + "enabled": true, + "form_id": "NclFXN1d", + "id": "01GTM5P9SHVPWH626RX1HZ2ZRR", "secret": "123456", - "status": 200, - "success": true, - } - `); - stopNock(nockDone); - } catch (e) { - console.error(e); - expect(true).toBe(false); - } + "tag": "abcdefghijklmnopqrstuvwxyz", + "updated_at": "2023-03-03T16:43:11.537925Z", + "url": "https://example.com", + "verify_ssl": true, + }, + "events": [ + "form_response", + ], + "headers": { + "access-control-allow-headers": "X-Typeform-Key, Content-Type, Authorization, Typeform-Version, typeform-app", + "access-control-allow-methods": "GET, OPTIONS, POST, PUT, PATCH, DELETE", + "access-control-expose-headers": "Location, X-Request-Id", + "connection": "close", + "content-length": "257", + "content-type": "application/json; charset=UTF-8", + "date": "Fri, 03 Mar 2023 16:43:11 GMT", + "server": "istio-envoy", + "set-cookie": "AWSALBTG=Y11vNY5M69UbXGI3Morm47RBczox072FvVPkuZwkeF3R/wN2w5GHZG76HnQeb9WAwNjzFZAcEn8PfOtDaNysQXS59YP1aCwW3mmsEfP84BTbD5YY6ud89VOIsc+ycvhCA44kyU8BjscMCdRLGjhOCETiAJ92LAABl3wohYQ/XWM+; Expires=Fri, 10 Mar 2023 16:43:11 GMT; Path=/, AWSALBTGCORS=Y11vNY5M69UbXGI3Morm47RBczox072FvVPkuZwkeF3R/wN2w5GHZG76HnQeb9WAwNjzFZAcEn8PfOtDaNysQXS59YP1aCwW3mmsEfP84BTbD5YY6ud89VOIsc+ycvhCA44kyU8BjscMCdRLGjhOCETiAJ92LAABl3wohYQ/XWM+; Expires=Fri, 10 Mar 2023 16:43:11 GMT; Path=/; SameSite=None; Secure", + "strict-transport-security": "max-age=63072000; includeSubDomains", + "x-envoy-upstream-service-time": "15", + }, + "secret": "123456", + "status": 200, + "success": true, + } + `); + stopNock(nockDone); }); test("receiving (correct signature)", async () => { diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index fa195cb214e..a2e1f1a3887 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -4,7 +4,7 @@ import { WebhookSpec } from "core/webhook/types"; const createEndpoint: EndpointSpec = { method: "PUT", - path: "/forms/{form_id}/webhooks/{tag}", + path: "/forms/{form_id}/webhooks/{webhookId}", metadata: { name: "Create webhook", description: "Create a webhook for a form", @@ -27,7 +27,7 @@ const createEndpoint: EndpointSpec = { in: "path", }, { - name: "tag", + name: "webhookId", description: "The webhook tag", required: true, schema: { From e1edccd37085cc5ed9c5f5a9bd8479b12018c4d2 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 16:46:47 +0000 Subject: [PATCH 032/113] Defined the webhook table schema --- apps/integrations/prisma/schema.prisma | 38 +++++++++++++++++++ .../src/core/webhook/subscribe/index.ts | 11 +++++- apps/integrations/src/core/webhook/types.ts | 1 + .../typeform/tests/webhooks.test.ts | 2 - .../typeform/webhooks/webhooks.ts | 1 + 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/apps/integrations/prisma/schema.prisma b/apps/integrations/prisma/schema.prisma index e67c296c8d9..77ce0a0417f 100644 --- a/apps/integrations/prisma/schema.prisma +++ b/apps/integrations/prisma/schema.prisma @@ -19,4 +19,42 @@ model Cache { createdAt DateTime @default(now()) @@unique([namespace, key]) +} + +model Webhook { + id String @id @default(cuid()) + type WebhookType + status WebhookStatus + consumerId String + key String + secret String? + subscriptionType WebhookSubscriptionType + /// automatic subscriptions responses are stored here + externalData Json? + + //service + service String? + webhookName String? + authenticationData Json? + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@unique([consumerId, key]) +} + +enum WebhookType { + SERVICE + GENERIC +} + +enum WebhookStatus { + CREATED + READY + CANCELLED +} + +enum WebhookSubscriptionType { + AUTOMATIC + MANUAL } \ No newline at end of file diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 51ff8f4853e..48dc150ac52 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -50,8 +50,8 @@ export class SubscribeToWebhook { const webhook = Object.values(service.webhooks).find((w) => w.events.map((e) => e.name).includes(input.eventName) ); - - if (!webhook) { + const event = webhook?.events.find((e) => e.name === input.eventName); + if (!webhook || !event) { return { success: false, error: { @@ -61,6 +61,13 @@ export class SubscribeToWebhook { }; } + //the key and consumerId are used to identify the webhook + const key = event.createKey(input.data); + + //is there an existing webhook? + + //todo create webhook in db + //todo determine if it's automatic or manual } diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index af089c0cdb6..09b46d993a5 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -119,6 +119,7 @@ export type WebhookEvent = { metadata: WebhookEventMetadata; schema: JSONSchema; examples: any[]; + createKey: (data: Record) => string; matches: (data: { subscriptionData: Record; request: WebhookIncomingRequest; diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index c0ff9c7211c..e1eca0a7aa0 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -30,8 +30,6 @@ describe("typeform.webhooks", async () => { }, }); - console.log(result); - expect(result.success).toEqual(true); expect(result).toMatchInlineSnapshot(` { diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 1fcb81505f8..9196c578e16 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -19,6 +19,7 @@ export const formResponseEvent: WebhookEvent = { }, schema: formEventSchema, examples: [example], + createKey: (data) => `${data.form_id}`, matches: () => true, process: async (data: WebhookReceiveRequest) => [ { From 08abe073c9cc2a3121d41fb9b30a7c2fc849c561 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 17:55:43 +0000 Subject: [PATCH 033/113] WIP on registration endpoint --- .../migration.sql | 30 +++++ .../migration.sql | 19 +++ .../migration.sql | 8 ++ .../migration.sql | 8 ++ apps/integrations/prisma/schema.prisma | 17 +++ apps/integrations/src/core/webhook/index.ts | 2 + .../src/core/webhook/subscribe/destination.ts | 0 .../src/core/webhook/subscribe/index.ts | 125 +++++++++++++++++- .../src/core/webhook/subscribe/types.ts | 29 +++- .../src/core/webhook/subscribe/webhooks.db.ts | 3 + apps/integrations/src/core/webhook/types.ts | 1 + 11 files changed, 236 insertions(+), 6 deletions(-) create mode 100644 apps/integrations/prisma/migrations/20230303164722_webhook_table/migration.sql create mode 100644 apps/integrations/prisma/migrations/20230303170626_destiantion_table/migration.sql create mode 100644 apps/integrations/prisma/migrations/20230303174056_added_url_webhook/migration.sql create mode 100644 apps/integrations/prisma/migrations/20230303174800_removed_webhook_url/migration.sql create mode 100644 apps/integrations/src/core/webhook/subscribe/destination.ts create mode 100644 apps/integrations/src/core/webhook/subscribe/webhooks.db.ts diff --git a/apps/integrations/prisma/migrations/20230303164722_webhook_table/migration.sql b/apps/integrations/prisma/migrations/20230303164722_webhook_table/migration.sql new file mode 100644 index 00000000000..e1f3c5679cd --- /dev/null +++ b/apps/integrations/prisma/migrations/20230303164722_webhook_table/migration.sql @@ -0,0 +1,30 @@ +-- CreateEnum +CREATE TYPE "WebhookType" AS ENUM ('SERVICE', 'GENERIC'); + +-- CreateEnum +CREATE TYPE "WebhookStatus" AS ENUM ('CREATED', 'READY', 'CANCELLED'); + +-- CreateEnum +CREATE TYPE "WebhookSubscriptionType" AS ENUM ('AUTOMATIC', 'MANUAL'); + +-- CreateTable +CREATE TABLE "Webhook" ( + "id" TEXT NOT NULL, + "type" "WebhookType" NOT NULL, + "status" "WebhookStatus" NOT NULL, + "consumerId" TEXT NOT NULL, + "key" TEXT NOT NULL, + "secret" TEXT, + "subscriptionType" "WebhookSubscriptionType" NOT NULL, + "externalData" JSONB, + "service" TEXT, + "webhookName" TEXT, + "authenticationData" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "Webhook_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Webhook_consumerId_key_key" ON "Webhook"("consumerId", "key"); diff --git a/apps/integrations/prisma/migrations/20230303170626_destiantion_table/migration.sql b/apps/integrations/prisma/migrations/20230303170626_destiantion_table/migration.sql new file mode 100644 index 00000000000..3c45c407c62 --- /dev/null +++ b/apps/integrations/prisma/migrations/20230303170626_destiantion_table/migration.sql @@ -0,0 +1,19 @@ +-- CreateTable +CREATE TABLE "Destination" ( + "id" TEXT NOT NULL, + "webhookId" TEXT NOT NULL, + "destinationUrl" TEXT NOT NULL, + "destinationSecret" TEXT NOT NULL, + "destinationData" JSONB, + "destinationEvent" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "Destination_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Destination_destinationUrl_key" ON "Destination"("destinationUrl"); + +-- AddForeignKey +ALTER TABLE "Destination" ADD CONSTRAINT "Destination_webhookId_fkey" FOREIGN KEY ("webhookId") REFERENCES "Webhook"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/integrations/prisma/migrations/20230303174056_added_url_webhook/migration.sql b/apps/integrations/prisma/migrations/20230303174056_added_url_webhook/migration.sql new file mode 100644 index 00000000000..3f4eb2f8d72 --- /dev/null +++ b/apps/integrations/prisma/migrations/20230303174056_added_url_webhook/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - Added the required column `url` to the `Webhook` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "Webhook" ADD COLUMN "url" TEXT NOT NULL; diff --git a/apps/integrations/prisma/migrations/20230303174800_removed_webhook_url/migration.sql b/apps/integrations/prisma/migrations/20230303174800_removed_webhook_url/migration.sql new file mode 100644 index 00000000000..cb0dbc581bf --- /dev/null +++ b/apps/integrations/prisma/migrations/20230303174800_removed_webhook_url/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - You are about to drop the column `url` on the `Webhook` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE "Webhook" DROP COLUMN "url"; diff --git a/apps/integrations/prisma/schema.prisma b/apps/integrations/prisma/schema.prisma index 77ce0a0417f..9162e9bdab0 100644 --- a/apps/integrations/prisma/schema.prisma +++ b/apps/integrations/prisma/schema.prisma @@ -40,6 +40,8 @@ model Webhook { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + destinations Destination[] + @@unique([consumerId, key]) } @@ -57,4 +59,19 @@ enum WebhookStatus { enum WebhookSubscriptionType { AUTOMATIC MANUAL +} + +model Destination { + id String @id @default(cuid()) + + webhook Webhook @relation(fields: [webhookId], references: [id], onDelete: Cascade, onUpdate: Cascade) + webhookId String + + destinationUrl String @unique + destinationSecret String + destinationData Json? + destinationEvent String + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt } \ No newline at end of file diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index dd9780830a0..0b29e8af6ac 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -32,6 +32,7 @@ export function makeWebhook(input: { } | { type: "manual"; + requiresSecret: boolean; }; /** You can verify the payload, or if they do a subscription verification you can respond */ preProcess?: (data: WebhookReceiveRequest) => Promise< @@ -81,6 +82,7 @@ export function makeWebhook(input: { case "manual": { subscription = { type: "manual", + requiresSecret: input.subscription.requiresSecret, }; break; } diff --git a/apps/integrations/src/core/webhook/subscribe/destination.ts b/apps/integrations/src/core/webhook/subscribe/destination.ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 48dc150ac52..900c2f96f53 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -6,6 +6,8 @@ import { } from "core/webhook/subscribe/types"; import { prisma, PrismaClient } from "db/db.server"; import { catalog } from "integrations/catalog"; +import crypto from "node:crypto"; +import { webhookUrl } from "./webhooks.db"; export class SubscribeToWebhook { #prismaClient: PrismaClient; @@ -62,11 +64,92 @@ export class SubscribeToWebhook { } //the key and consumerId are used to identify the webhook - const key = event.createKey(input.data); + const key = `${service}-${event.name}-${event.createKey(input.data)}`; //is there an existing webhook? + const existingWebhookRow = await this.#getWebhookRow({ + consumerId: input.consumerId, + key, + }); - //todo create webhook in db + if (existingWebhookRow) { + try { + const destination = await this.#createDestination({ + webhookId: existingWebhookRow.id, + callbackUrl: input.callbackUrl, + data: input.data, + eventName: event.name, + }); + + const url = webhookUrl(existingWebhookRow.id); + + return { + success: true, + result: { + type: "service", + webhookId: existingWebhookRow.id, + subscription: + existingWebhookRow.subscriptionType === "MANUAL" + ? { + type: "manual", + url, + secret: existingWebhookRow.secret ?? undefined, + } + : { + type: "automatic", + }, + }, + }; + } catch (e) { + return { + success: false, + error: { + code: "destination_already_exists", + message: `Destination already exists`, + }, + }; + } + } + + switch (webhook.subscription.type) { + case "manual": { + const secret = webhook.subscription.requiresSecret + ? crypto.randomBytes(32).toString("hex") + : undefined; + const newWebhookRow = await this.#prismaClient.webhook.create({ + data: { + type: "SERVICE", + status: "READY", + consumerId: input.consumerId, + key, + secret, + subscriptionType: "MANUAL", + service: input.service, + webhookName: webhook.spec.id, + authenticationData: input.authentication, + }, + }); + + const destination = await this.#prismaClient.destination.create({ + data: { + webhook: { + connect: { + id: newWebhookRow.id, + }, + }, + destinationUrl: input.callbackUrl, + destinationEvent: event.name, + destinationData: input.data, + }, + }); + break; + } + case "automatic": { + break; + } + } + + //todo create destination in db //todo determine if it's automatic or manual } @@ -76,4 +159,42 @@ export class SubscribeToWebhook { ): Promise { throw new Error("Not implemented"); } + + #getWebhookRow({ consumerId, key }: { consumerId: string; key: string }) { + return this.#prismaClient.webhook.findUnique({ + where: { + consumerId_key: { + consumerId, + key, + }, + }, + }); + } + + #createDestination({ + webhookId, + callbackUrl, + eventName, + data, + }: { + webhookId: string; + callbackUrl: string; + eventName: string; + data: any; + }) { + const destinationSecret = crypto.randomBytes(32).toString("hex"); + return this.#prismaClient.destination.create({ + data: { + webhook: { + connect: { + id: webhookId, + }, + }, + destinationUrl: callbackUrl, + destinationSecret, + destinationEvent: eventName, + destinationData: data, + }, + }); + } } diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index 566186d5e79..6dd1b2c638b 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -1,14 +1,26 @@ import { z } from "zod"; +const OAuthSchema = z.object({ + type: z.literal("oauth"), + connectionId: z.string(), +}); + +const APIKeySchema = z.object({ + type: z.literal("api-key"), + api_key: z.string(), +}); + +const AuthenticationSchema = z.discriminatedUnion("type", [ + OAuthSchema, + APIKeySchema, +]); + const ServiceSchema = z.object({ type: z.literal("service"), consumerId: z.string(), callbackUrl: z.string().url(), service: z.string(), - authentication: z.object({ - type: z.literal("oauth"), - connectionId: z.string(), - }), + authentication: AuthenticationSchema, data: z.record(z.any()), eventName: z.string(), }); @@ -49,6 +61,15 @@ export type SubscribeResult = | { type: "service"; webhookId: string; + subscription: + | { + type: "automatic"; + } + | { + type: "manual"; + url: string; + secret?: string; + }; } | { type: "generic"; diff --git a/apps/integrations/src/core/webhook/subscribe/webhooks.db.ts b/apps/integrations/src/core/webhook/subscribe/webhooks.db.ts new file mode 100644 index 00000000000..16a16ec1e77 --- /dev/null +++ b/apps/integrations/src/core/webhook/subscribe/webhooks.db.ts @@ -0,0 +1,3 @@ +export function webhookUrl(id: string): string { + return `${process.env.INTEGRATIONS_ORIGIN}/api/v1/webhooks/${id}/receive`; +} diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 09b46d993a5..c8818808f96 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -41,6 +41,7 @@ export type WebhookSubscriptionAutomatic = { export type WebhookSubscriptionManual = { type: "manual"; + requiresSecret: boolean; }; export type WebhookSpec = { From b6164548e610b46d5abb53a9a7454d2eec2f1b29 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 18:02:57 +0000 Subject: [PATCH 034/113] Manual webhook subscription progress --- .../src/core/webhook/subscribe/index.ts | 83 +++++++++++++------ .../src/core/webhook/subscribe/types.ts | 2 + 2 files changed, 59 insertions(+), 26 deletions(-) diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 900c2f96f53..626496f3150 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -3,6 +3,7 @@ import { SubscribeInput, SubscribeResult, SubscribeServiceInput, + WebhookAuthentication, } from "core/webhook/subscribe/types"; import { prisma, PrismaClient } from "db/db.server"; import { catalog } from "integrations/catalog"; @@ -113,36 +114,33 @@ export class SubscribeToWebhook { switch (webhook.subscription.type) { case "manual": { - const secret = webhook.subscription.requiresSecret - ? crypto.randomBytes(32).toString("hex") - : undefined; - const newWebhookRow = await this.#prismaClient.webhook.create({ - data: { - type: "SERVICE", - status: "READY", - consumerId: input.consumerId, - key, - secret, - subscriptionType: "MANUAL", - service: input.service, - webhookName: webhook.spec.id, - authenticationData: input.authentication, - }, + const newWebhookRow = await this.#createManualWebhook({ + requiresSecret: webhook.subscription.requiresSecret, + consumerId: input.consumerId, + key, + service: input.service, + webhookName: webhook.spec.id, + authenticationData: input.authentication, + }); + const destination = await this.#createDestination({ + webhookId: newWebhookRow.id, + callbackUrl: input.callbackUrl, + data: input.data, + eventName: event.name, }); - const destination = await this.#prismaClient.destination.create({ - data: { - webhook: { - connect: { - id: newWebhookRow.id, - }, + return { + success: true, + result: { + type: "service", + webhookId: newWebhookRow.id, + subscription: { + type: "manual", + url: webhookUrl(newWebhookRow.id), + secret: newWebhookRow.secret ?? undefined, }, - destinationUrl: input.callbackUrl, - destinationEvent: event.name, - destinationData: input.data, }, - }); - break; + }; } case "automatic": { break; @@ -171,6 +169,39 @@ export class SubscribeToWebhook { }); } + #createManualWebhook({ + requiresSecret, + consumerId, + key, + service, + webhookName, + authenticationData, + }: { + requiresSecret: boolean; + consumerId: string; + key: string; + service: string; + webhookName: string; + authenticationData: WebhookAuthentication; + }) { + const secret = requiresSecret + ? crypto.randomBytes(32).toString("hex") + : undefined; + return this.#prismaClient.webhook.create({ + data: { + type: "SERVICE", + status: "READY", + consumerId, + key, + secret, + subscriptionType: "MANUAL", + service, + webhookName, + authenticationData, + }, + }); + } + #createDestination({ webhookId, callbackUrl, diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index 6dd1b2c638b..4092b397da8 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -15,6 +15,8 @@ const AuthenticationSchema = z.discriminatedUnion("type", [ APIKeySchema, ]); +export type WebhookAuthentication = z.infer; + const ServiceSchema = z.object({ type: z.literal("service"), consumerId: z.string(), From ab208466510c0b8edd3778b342f46e1f5b440764 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 18:38:09 +0000 Subject: [PATCH 035/113] Credentials, automatic webhooks, a lot --- apps/integrations/package.json | 1 + .../src/core/webhook/credentials.ts | 74 +++++++++++++ apps/integrations/src/core/webhook/index.ts | 1 + .../src/core/webhook/subscribe/index.ts | 103 +++++++++++++++++- .../{webhooks.db.ts => utilities.ts} | 0 apps/integrations/src/core/webhook/types.ts | 2 + .../integrations/typeform/webhooks/specs.ts | 1 + .../typeform/webhooks/webhooks.ts | 1 + pnpm-lock.yaml | 2 + 9 files changed, 179 insertions(+), 6 deletions(-) create mode 100644 apps/integrations/src/core/webhook/credentials.ts rename apps/integrations/src/core/webhook/subscribe/{webhooks.db.ts => utilities.ts} (100%) diff --git a/apps/integrations/package.json b/apps/integrations/package.json index f92a533ef3d..2f7715b849a 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@cfworker/json-schema": "^1.12.5", + "@nangohq/node": "^0.8.4", "@prisma/client": "^4.3.0", "@sentry/node": "^7.38.0", "ajv": "^8.12.0", diff --git a/apps/integrations/src/core/webhook/credentials.ts b/apps/integrations/src/core/webhook/credentials.ts new file mode 100644 index 00000000000..4bf3590c095 --- /dev/null +++ b/apps/integrations/src/core/webhook/credentials.ts @@ -0,0 +1,74 @@ +import { AuthCredentials } from "core/authentication/types"; +import { WebhookAuthentication } from "./subscribe/types"; +import { Nango } from "@nangohq/node"; +import { Service } from "core/service/types"; + +const nango = new Nango({ + host: process.env.NANGO_HOST, + secretKey: process.env.NANGO_SECRET_KEY, +}); + +export async function getCredentials({ + service, + authentication, +}: { + service: Service; + authentication: WebhookAuthentication; +}): Promise { + switch (authentication.type) { + case "oauth": { + try { + const accessToken = await nango.getToken( + service.service, + authentication.connectionId + ); + if (accessToken == null) { + return undefined; + } + + const serviceAuthentication = Object.entries( + service.authentication + ).find(([name, info]) => info.type === "oauth2"); + if (!serviceAuthentication) { + console.error("Service does not support oauth2"); + return undefined; + } + + const [authName, authInfo] = serviceAuthentication; + + //todo if it's an OAuth1 API then this will fail, as Pizzly returns an object + return { + type: "oauth2", + accessToken, + name: authName, + scopes: Object.keys(authInfo.scopes), + }; + } catch (e) { + console.log("PIZZLY_ACCESS_TOKEN_FAILED"); + console.error(e); + return undefined; + } + } + case "api-key": { + const serviceAuthentication = Object.entries(service.authentication).find( + ([name, info]) => info.type === "oauth2" + ); + if (!serviceAuthentication) { + console.error("Service does not support oauth2"); + return undefined; + } + + const [authName, authInfo] = serviceAuthentication; + + return { + type: "api_key", + api_key: authentication.api_key, + name: authName, + scopes: Object.keys(authInfo.scopes), + }; + } + default: { + throw new Error("Unsupported authentication method"); + } + } +} diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 0b29e8af6ac..457c9908eb9 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -25,6 +25,7 @@ export function makeWebhook(input: { subscription: | { type: "automatic"; + requiresSecret: boolean; /** after a subscription you might want to alter the result, e.g. add secret from response */ postSubscribe?: ( result: WebhookSubscriptionResult diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 626496f3150..4bbe063f623 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -8,7 +8,8 @@ import { import { prisma, PrismaClient } from "db/db.server"; import { catalog } from "integrations/catalog"; import crypto from "node:crypto"; -import { webhookUrl } from "./webhooks.db"; +import { getCredentials } from "../credentials"; +import { webhookUrl } from "./utilities"; export class SubscribeToWebhook { #prismaClient: PrismaClient; @@ -143,13 +144,70 @@ export class SubscribeToWebhook { }; } case "automatic": { - break; - } - } + const newWebhookRow = await this.#createAutomaticWebhook({ + requiresSecret: webhook.subscription.requiresSecret, + consumerId: input.consumerId, + key, + service: input.service, + webhookName: webhook.spec.id, + authenticationData: input.authentication, + }); + + const credentials = await getCredentials({ + service, + authentication: input.authentication, + }); + + const subscriptionResult = await webhook.subscription.subscribe({ + webhookId: newWebhookRow.id, + callbackUrl: webhookUrl(newWebhookRow.id), + events: [event.name], + secret: newWebhookRow.secret ?? undefined, + inputData: input.data, + credentials, + }); + + if (!subscriptionResult.success) { + return { + success: false, + error: { + code: "subscription_failed", + message: subscriptionResult.error, + }, + }; + } + + //update status of the webhook to READY + await this.#prismaClient.webhook.update({ + where: { + id: newWebhookRow.id, + }, + data: { + status: "READY", + secret: subscriptionResult.secret, + }, + }); - //todo create destination in db + //create destination + const destination = await this.#createDestination({ + webhookId: newWebhookRow.id, + callbackUrl: input.callbackUrl, + data: input.data, + eventName: event.name, + }); - //todo determine if it's automatic or manual + return { + success: true, + result: { + type: "service", + webhookId: newWebhookRow.id, + subscription: { + type: "automatic", + }, + }, + }; + } + } } async #subscribeToGeneric( @@ -202,6 +260,39 @@ export class SubscribeToWebhook { }); } + #createAutomaticWebhook({ + requiresSecret, + consumerId, + key, + service, + webhookName, + authenticationData, + }: { + requiresSecret: boolean; + consumerId: string; + key: string; + service: string; + webhookName: string; + authenticationData: WebhookAuthentication; + }) { + const secret = requiresSecret + ? crypto.randomBytes(32).toString("hex") + : undefined; + return this.#prismaClient.webhook.create({ + data: { + type: "SERVICE", + status: "CREATED", + consumerId, + key, + secret, + subscriptionType: "AUTOMATIC", + service, + webhookName, + authenticationData, + }, + }); + } + #createDestination({ webhookId, callbackUrl, diff --git a/apps/integrations/src/core/webhook/subscribe/webhooks.db.ts b/apps/integrations/src/core/webhook/subscribe/utilities.ts similarity index 100% rename from apps/integrations/src/core/webhook/subscribe/webhooks.db.ts rename to apps/integrations/src/core/webhook/subscribe/utilities.ts diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index c8818808f96..47eaba2d2da 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -34,6 +34,7 @@ export type WebhookSubscription = export type WebhookSubscriptionAutomatic = { type: "automatic"; + requiresSecret: boolean; subscribe: ( data: WebhookSubscriptionRequest ) => Promise; @@ -72,6 +73,7 @@ type WebhookSpecSubscribeManual = { export interface WebhookSpecSubscribeAutomatic { type: "automatic"; + requiresSecret: boolean; create: EndpointSpec; //todo delete: EndpointSpec; } diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index a2e1f1a3887..d726ed8e3b3 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -140,6 +140,7 @@ export const formResponse: WebhookSpec = { }, subscribe: { type: "automatic", + requiresSecret: true, create: createEndpoint, }, }; diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 9196c578e16..5c200151b20 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -40,6 +40,7 @@ const webhook = makeWebhook({ }, events: [formResponseEvent], subscription: { + requiresSecret: true, type: "automatic", }, preProcess: async (data) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 227cfed9f1d..7c93640b4a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,7 @@ importers: specifiers: '@apidevtools/json-schema-ref-parser': ^10.1.0 '@cfworker/json-schema': ^1.12.5 + '@nangohq/node': ^0.8.4 '@prisma/client': ^4.3.0 '@sentry/node': ^7.38.0 '@types/eslint': ^8.4.6 @@ -82,6 +83,7 @@ importers: zod: ^3.20.2 dependencies: '@cfworker/json-schema': 1.12.5 + '@nangohq/node': 0.8.4 '@prisma/client': 4.8.1_prisma@4.8.1 '@sentry/node': 7.39.0 ajv: 8.12.0 From c064fb9fc92b6b68ad0e84d3d88216d7758fae8f Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 19:18:53 +0000 Subject: [PATCH 036/113] Delete unused file --- apps/integrations/src/core/webhook/subscribe/destination.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 apps/integrations/src/core/webhook/subscribe/destination.ts diff --git a/apps/integrations/src/core/webhook/subscribe/destination.ts b/apps/integrations/src/core/webhook/subscribe/destination.ts deleted file mode 100644 index e69de29bb2d..00000000000 From ace099994d9f56a65c9f7028b629512e8be9f058 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 19:41:21 +0000 Subject: [PATCH 037/113] Added Typeform to the catalog --- apps/integrations/src/integrations/catalog.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/integrations/src/integrations/catalog.ts b/apps/integrations/src/integrations/catalog.ts index 4a3d73bff3a..662f25e53a1 100644 --- a/apps/integrations/src/integrations/catalog.ts +++ b/apps/integrations/src/integrations/catalog.ts @@ -2,11 +2,13 @@ import { Catalog } from "core/catalog"; import { airtable } from "./airtable"; import { notion } from "./notion"; import { sendgrid } from "./sendgrid"; +import { typeform } from "./typeform"; export const catalog: Catalog = { services: { airtable, notion, sendgrid, + typeform, }, }; From 087156d0c362d537ab94b54c3ccbf0c88e62bebf Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 19:41:37 +0000 Subject: [PATCH 038/113] Nango is now imported dynamically --- .../src/core/webhook/credentials.ts | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/apps/integrations/src/core/webhook/credentials.ts b/apps/integrations/src/core/webhook/credentials.ts index 4bf3590c095..5b53c2c7836 100644 --- a/apps/integrations/src/core/webhook/credentials.ts +++ b/apps/integrations/src/core/webhook/credentials.ts @@ -1,12 +1,21 @@ import { AuthCredentials } from "core/authentication/types"; import { WebhookAuthentication } from "./subscribe/types"; -import { Nango } from "@nangohq/node"; import { Service } from "core/service/types"; -const nango = new Nango({ - host: process.env.NANGO_HOST, - secretKey: process.env.NANGO_SECRET_KEY, -}); +let cachedClient: any; +async function getNangoClient() { + const Nango = (await import("@nangohq/node")).Nango; + + if (cachedClient) { + return cachedClient as InstanceType; + } + + cachedClient = new Nango({ + host: process.env.NANGO_HOST, + secretKey: process.env.NANGO_SECRET_KEY, + }); + return cachedClient as InstanceType; +} export async function getCredentials({ service, @@ -18,7 +27,8 @@ export async function getCredentials({ switch (authentication.type) { case "oauth": { try { - const accessToken = await nango.getToken( + const nangoClient = await getNangoClient(); + const accessToken = await nangoClient.getToken( service.service, authentication.connectionId ); From f2ced197aa2da782338de05f4de90fd1d2960ba0 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 19:41:49 +0000 Subject: [PATCH 039/113] Removed webhooks from the services API endpoint return --- apps/integrations/src/api/v2/services.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/integrations/src/api/v2/services.ts b/apps/integrations/src/api/v2/services.ts index 32430dd40b5..1fa6540d8ae 100644 --- a/apps/integrations/src/api/v2/services.ts +++ b/apps/integrations/src/api/v2/services.ts @@ -32,7 +32,7 @@ export async function handleServices(_req: Request, res: Response) { function omitExtraInfo( service: Service -): Omit { - const { actions, retryableStatusCodes, ...rest } = service; +): Omit { + const { actions, retryableStatusCodes, webhooks, ...rest } = service; return rest; } From 57bbbba3bc37546c3240548b0c575041dd68dcc3 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 20:05:11 +0000 Subject: [PATCH 040/113] Registering a webhook is working and almost creating all correct db entries --- .../src/api/v2/webhooks/create.ts | 20 +++++++++++-------- apps/integrations/src/core/webhook/index.ts | 8 ++++++++ .../src/core/webhook/subscribe/index.ts | 4 +++- .../typeform/webhooks/webhooks.ts | 2 +- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/apps/integrations/src/api/v2/webhooks/create.ts b/apps/integrations/src/api/v2/webhooks/create.ts index 55011f8d63a..508ef8e416e 100644 --- a/apps/integrations/src/api/v2/webhooks/create.ts +++ b/apps/integrations/src/api/v2/webhooks/create.ts @@ -13,21 +13,25 @@ export async function handleCreateWebhook(req: Request, res: Response) { success: false, error: { code: "bad_body", - message: parsedBody.error.message, + message: parsedBody.error.toString(), }, }; res.status(400).json(badBodyResponse); return; } - const subscribeToWebhook = new SubscribeToWebhook(); - const result = await subscribeToWebhook.call(parsedBody.data); + try { + const subscribeToWebhook = new SubscribeToWebhook(); + const result = await subscribeToWebhook.call(parsedBody.data); - if (result.success) { - res.status(201).json(result); + if (result.success) { + res.status(201).json(result); + return; + } + + res.status(400).send(result); return; + } catch (error) { + res.status(500).json(error); } - - res.status(400).send(result); - return; } diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 457c9908eb9..3767bf8148e 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -56,6 +56,13 @@ export function makeWebhook(input: { switch (input.subscription.type) { case "automatic": { const subscribe = async (config: WebhookSubscriptionRequest) => { + if (input.subscription.requiresSecret && !config.secret) { + return { + success: false as const, + error: "Secret is required", + }; + } + const result = await subscribeToWebhook({ id: config.webhookId, baseUrl, @@ -76,6 +83,7 @@ export function makeWebhook(input: { subscription = { type: "automatic", + requiresSecret: input.subscription.requiresSecret, subscribe: subscribe, }; break; diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 4bbe063f623..ef0522b4a5a 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -66,7 +66,9 @@ export class SubscribeToWebhook { } //the key and consumerId are used to identify the webhook - const key = `${service}-${event.name}-${event.createKey(input.data)}`; + const key = `${service.service}-${event.name}-${event.createKey( + input.data + )}`; //is there an existing webhook? const existingWebhookRow = await this.#getWebhookRow({ diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 5c200151b20..2634dba15e6 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -40,8 +40,8 @@ const webhook = makeWebhook({ }, events: [formResponseEvent], subscription: { - requiresSecret: true, type: "automatic", + requiresSecret: true, }, preProcess: async (data) => { if (data.secret) { From 06b63e6c2130b8f2685c71d75cf914a47faa099b Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 3 Mar 2023 20:12:48 +0000 Subject: [PATCH 041/113] API key webhook is registering correctly --- apps/integrations/src/core/webhook/credentials.ts | 9 +++++---- apps/integrations/src/core/webhook/subscribe/index.ts | 10 ++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/integrations/src/core/webhook/credentials.ts b/apps/integrations/src/core/webhook/credentials.ts index 5b53c2c7836..89b17d654c9 100644 --- a/apps/integrations/src/core/webhook/credentials.ts +++ b/apps/integrations/src/core/webhook/credentials.ts @@ -2,11 +2,11 @@ import { AuthCredentials } from "core/authentication/types"; import { WebhookAuthentication } from "./subscribe/types"; import { Service } from "core/service/types"; -let cachedClient: any; +let cachedClient: any = undefined; async function getNangoClient() { const Nango = (await import("@nangohq/node")).Nango; - if (cachedClient) { + if (cachedClient !== undefined) { return cachedClient as InstanceType; } @@ -16,6 +16,7 @@ async function getNangoClient() { }); return cachedClient as InstanceType; } +getNangoClient(); export async function getCredentials({ service, @@ -61,10 +62,10 @@ export async function getCredentials({ } case "api-key": { const serviceAuthentication = Object.entries(service.authentication).find( - ([name, info]) => info.type === "oauth2" + ([name, info]) => info.type === "api_key" ); if (!serviceAuthentication) { - console.error("Service does not support oauth2"); + console.error("Service does not support api_key"); return undefined; } diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index ef0522b4a5a..8b8d7adc8ff 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -160,6 +160,16 @@ export class SubscribeToWebhook { authentication: input.authentication, }); + if (!credentials) { + return { + success: false, + error: { + code: "credentials_not_found", + message: `Credentials not found`, + }, + }; + } + const subscriptionResult = await webhook.subscription.subscribe({ webhookId: newWebhookRow.id, callbackUrl: webhookUrl(newWebhookRow.id), From a04ceb4a4769b045ddb1d19a0d7dedfc471f05e9 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 11:38:42 +0000 Subject: [PATCH 042/113] Added support for rawBody --- apps/integrations/package.json | 2 ++ apps/integrations/src/http.d.ts | 5 +++++ apps/integrations/src/index.ts | 10 ++++++++- apps/integrations/tsconfig.json | 1 + pnpm-lock.yaml | 39 +++++++++++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 apps/integrations/src/http.d.ts diff --git a/apps/integrations/package.json b/apps/integrations/package.json index 2f7715b849a..08cca4cbf79 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -24,6 +24,7 @@ "@prisma/client": "^4.3.0", "@sentry/node": "^7.38.0", "ajv": "^8.12.0", + "body-parser": "^1.20.2", "express": "^4.18.1", "express-async-errors": "^3.1.1", "json-pointer": "^0.6.2", @@ -37,6 +38,7 @@ }, "devDependencies": { "@apidevtools/json-schema-ref-parser": "^10.1.0", + "@types/body-parser": "^1.19.2", "@types/eslint": "^8.4.6", "@types/express": "^4.17.13", "@types/json-pointer": "^1.0.31", diff --git a/apps/integrations/src/http.d.ts b/apps/integrations/src/http.d.ts new file mode 100644 index 00000000000..434ee2e1783 --- /dev/null +++ b/apps/integrations/src/http.d.ts @@ -0,0 +1,5 @@ +declare module "http" { + interface IncomingMessage { + rawBody: Buffer; + } +} diff --git a/apps/integrations/src/index.ts b/apps/integrations/src/index.ts index 06483e30b6d..2c6b52cfaf1 100644 --- a/apps/integrations/src/index.ts +++ b/apps/integrations/src/index.ts @@ -3,6 +3,7 @@ import { handleActionDisplay } from "api/v2/action/display"; import { handleServices } from "api/v2/services"; import * as Sentry from "@sentry/node"; import dotenv from "dotenv"; +import bodyParser from "body-parser"; import express, { Express, NextFunction, Request, Response } from "express"; import morgan from "morgan"; import { handleCreateWebhook } from "api/v2/webhooks/create"; @@ -17,7 +18,14 @@ Sentry.init({ }); app.use(Sentry.Handlers.requestHandler()); -app.use(express.json()); +app.use( + bodyParser.json({ + verify: (req, res, buf) => { + req.rawBody = buf; + }, + }) +); + app.use(morgan("combined")); const checkAuthentication = function ( diff --git a/apps/integrations/tsconfig.json b/apps/integrations/tsconfig.json index 0cdba6b3d22..11cefb26c9d 100644 --- a/apps/integrations/tsconfig.json +++ b/apps/integrations/tsconfig.json @@ -15,6 +15,7 @@ "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, + "files": ["src/http.d.ts"], "include": ["./src/**/*.ts", "./src/**/*.d.ts"], "exclude": ["node_modules"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c93640b4a3..b7d793b00b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ importers: '@nangohq/node': ^0.8.4 '@prisma/client': ^4.3.0 '@sentry/node': ^7.38.0 + '@types/body-parser': ^1.19.2 '@types/eslint': ^8.4.6 '@types/express': ^4.17.13 '@types/json-pointer': ^1.0.31 @@ -49,6 +50,7 @@ importers: '@types/node': ^18.13.0 '@typescript-eslint/eslint-plugin': ^5.51.0 ajv: ^8.12.0 + body-parser: ^1.20.2 commander: ^9.4.1 concurrently: ^7.6.0 dotenv: ^16.0.3 @@ -87,6 +89,7 @@ importers: '@prisma/client': 4.8.1_prisma@4.8.1 '@sentry/node': 7.39.0 ajv: 8.12.0 + body-parser: 1.20.2 express: 4.18.2 express-async-errors: 3.1.1_express@4.18.2 json-pointer: 0.6.2 @@ -99,6 +102,7 @@ importers: zod: 3.20.2 devDependencies: '@apidevtools/json-schema-ref-parser': 10.1.0 + '@types/body-parser': 1.19.2 '@types/eslint': 8.4.10 '@types/express': 4.17.15 '@types/json-pointer': 1.0.31 @@ -7986,6 +7990,26 @@ packages: transitivePeerDependencies: - supports-color + /body-parser/1.20.2: + resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.2 + type-is: 1.6.18 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + dev: false + /bowser/2.11.0: resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} @@ -8775,6 +8799,11 @@ packages: resolution: {integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==} engines: {node: '>= 0.6'} + /content-type/1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + dev: false + /convert-source-map/1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true @@ -15319,6 +15348,16 @@ packages: iconv-lite: 0.4.24 unpipe: 1.0.0 + /raw-body/2.5.2: + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: false + /rc/1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true From fc504ea0f5009aee2e289485fd017cbc0426ff11 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 11:39:06 +0000 Subject: [PATCH 043/113] Changed the env var to WEBHOOKS_ORIGIN to make it less confusing --- apps/integrations/src/core/webhook/subscribe/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/integrations/src/core/webhook/subscribe/utilities.ts b/apps/integrations/src/core/webhook/subscribe/utilities.ts index 16a16ec1e77..1358eeea74d 100644 --- a/apps/integrations/src/core/webhook/subscribe/utilities.ts +++ b/apps/integrations/src/core/webhook/subscribe/utilities.ts @@ -1,3 +1,3 @@ export function webhookUrl(id: string): string { - return `${process.env.INTEGRATIONS_ORIGIN}/api/v1/webhooks/${id}/receive`; + return `${process.env.WEBHOOKS_ORIGIN}/api/v1/webhooks/${id}/receive`; } From d06a1ea7fdd256087474a8f488aa2733bcecc39f Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 11:39:19 +0000 Subject: [PATCH 044/113] Stub for receiving webhook --- .../src/api/v2/webhooks/receive.ts | 21 +++++++++++++++++++ .../src/core/webhook/receive/index.ts | 14 +++++++++++++ .../src/core/webhook/receive/types.ts | 0 apps/integrations/src/index.ts | 2 ++ 4 files changed, 37 insertions(+) create mode 100644 apps/integrations/src/api/v2/webhooks/receive.ts create mode 100644 apps/integrations/src/core/webhook/receive/index.ts create mode 100644 apps/integrations/src/core/webhook/receive/types.ts diff --git a/apps/integrations/src/api/v2/webhooks/receive.ts b/apps/integrations/src/api/v2/webhooks/receive.ts new file mode 100644 index 00000000000..c7629d7fe3a --- /dev/null +++ b/apps/integrations/src/api/v2/webhooks/receive.ts @@ -0,0 +1,21 @@ +import { Request, Response } from "express"; +import { + SubscribeInputSchema, + SubscribeResult, +} from "core/webhook/subscribe/types"; + +export async function handleReceivingWebhook(req: Request, res: Response) { + const parsedBody = SubscribeInputSchema.safeParse(req.body); + + if (!parsedBody.success) { + const badBodyResponse: SubscribeResult = { + success: false, + error: { + code: "bad_body", + message: parsedBody.error.toString(), + }, + }; + res.status(400).json(badBodyResponse); + return; + } +} diff --git a/apps/integrations/src/core/webhook/receive/index.ts b/apps/integrations/src/core/webhook/receive/index.ts new file mode 100644 index 00000000000..214f69e77b6 --- /dev/null +++ b/apps/integrations/src/core/webhook/receive/index.ts @@ -0,0 +1,14 @@ +import { prisma, PrismaClient } from "db/db.server"; +import { WebhookReceiveRequest, WebhookResult } from "../types"; + +export class ReceiveWebhook { + #prismaClient: PrismaClient; + + constructor(prismaClient: PrismaClient = prisma) { + this.#prismaClient = prismaClient; + } + + public async call(input: WebhookReceiveRequest): Promise { + throw new Error("Not implemented"); + } +} diff --git a/apps/integrations/src/core/webhook/receive/types.ts b/apps/integrations/src/core/webhook/receive/types.ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/apps/integrations/src/index.ts b/apps/integrations/src/index.ts index 2c6b52cfaf1..5d0ab0cefa6 100644 --- a/apps/integrations/src/index.ts +++ b/apps/integrations/src/index.ts @@ -7,6 +7,7 @@ import bodyParser from "body-parser"; import express, { Express, NextFunction, Request, Response } from "express"; import morgan from "morgan"; import { handleCreateWebhook } from "api/v2/webhooks/create"; +import { handleReceivingWebhook } from "api/v2/webhooks/receive"; dotenv.config(); const app: Express = express(); @@ -78,6 +79,7 @@ app.post("/api/v2/:service/action/:action", handleAction); //webhooks app.post("/api/v2/webhooks", handleCreateWebhook); +app.all("/api/v2/webhooks/:webhookId/receive", handleReceivingWebhook); //errors app.get("/debug-sentry", function mainHandler(req, res) { From 04ad24211e6b450305b231b9ec7f61789a36a35c Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 12:03:41 +0000 Subject: [PATCH 045/113] Started receiving webhooks endpoint --- .../src/api/v2/webhooks/create.ts | 2 +- .../src/api/v2/webhooks/receive.ts | 51 ++++++++++++++----- .../src/core/webhook/receive/index.ts | 22 +++++++- apps/integrations/src/index.ts | 4 +- 4 files changed, 61 insertions(+), 18 deletions(-) diff --git a/apps/integrations/src/api/v2/webhooks/create.ts b/apps/integrations/src/api/v2/webhooks/create.ts index 508ef8e416e..4640cc2aea0 100644 --- a/apps/integrations/src/api/v2/webhooks/create.ts +++ b/apps/integrations/src/api/v2/webhooks/create.ts @@ -29,7 +29,7 @@ export async function handleCreateWebhook(req: Request, res: Response) { return; } - res.status(400).send(result); + res.status(400).json(result); return; } catch (error) { res.status(500).json(error); diff --git a/apps/integrations/src/api/v2/webhooks/receive.ts b/apps/integrations/src/api/v2/webhooks/receive.ts index c7629d7fe3a..181febea028 100644 --- a/apps/integrations/src/api/v2/webhooks/receive.ts +++ b/apps/integrations/src/api/v2/webhooks/receive.ts @@ -1,21 +1,44 @@ -import { Request, Response } from "express"; +import { HTTPMethod } from "core/request/types"; +import { ReceiveWebhook } from "core/webhook/receive"; import { - SubscribeInputSchema, - SubscribeResult, -} from "core/webhook/subscribe/types"; + WebhookIncomingRequest, + WebhookReceiveRequest, +} from "core/webhook/types"; +import { Request, Response } from "express"; export async function handleReceivingWebhook(req: Request, res: Response) { - const parsedBody = SubscribeInputSchema.safeParse(req.body); + const { webhookId } = req.params; - if (!parsedBody.success) { - const badBodyResponse: SubscribeResult = { - success: false, - error: { - code: "bad_body", - message: parsedBody.error.toString(), - }, - }; - res.status(400).json(badBodyResponse); + if (!webhookId) { + res.status(400).json({ success: false, error: "Missing webhook ID" }); return; } + + const headers = Object.entries(req.headers) + .filter(([key, value]) => value !== undefined) + .reduce((acc, [key, value]) => { + acc[key] = + typeof value === "string" ? (value as string) : value?.join(", ") ?? ""; + return acc; + }, {} as Record); + + const request: WebhookIncomingRequest = { + method: req.method as HTTPMethod, + searchParams: new URLSearchParams(req.url), + headers, + body: req.body, + rawBody: req.rawBody, + }; + + try { + const receiver = new ReceiveWebhook(); + const result = await receiver.call({ request, webhookId }); + + res + .writeHead(result.response.status, result.response.headers) + .json(result.response.body); + } catch (error) { + console.error(error); + res.status(500).json({ success: false, error: "Internal server error" }); + } } diff --git a/apps/integrations/src/core/webhook/receive/index.ts b/apps/integrations/src/core/webhook/receive/index.ts index 214f69e77b6..292f83fa918 100644 --- a/apps/integrations/src/core/webhook/receive/index.ts +++ b/apps/integrations/src/core/webhook/receive/index.ts @@ -1,5 +1,9 @@ import { prisma, PrismaClient } from "db/db.server"; -import { WebhookReceiveRequest, WebhookResult } from "../types"; +import { + WebhookIncomingRequest, + WebhookReceiveRequest, + WebhookResult, +} from "../types"; export class ReceiveWebhook { #prismaClient: PrismaClient; @@ -8,7 +12,21 @@ export class ReceiveWebhook { this.#prismaClient = prismaClient; } - public async call(input: WebhookReceiveRequest): Promise { + public async call({ + webhookId, + request, + }: { + webhookId: string; + request: WebhookIncomingRequest; + }): Promise { + //todo get webhook + //todo get destination + + //if service webhook then collect together objects + //call receive and get events + //create deliveries and jobs in Graphile Worker + //return response + throw new Error("Not implemented"); } } diff --git a/apps/integrations/src/index.ts b/apps/integrations/src/index.ts index 5d0ab0cefa6..9999a48c593 100644 --- a/apps/integrations/src/index.ts +++ b/apps/integrations/src/index.ts @@ -29,6 +29,9 @@ app.use( app.use(morgan("combined")); +//receive webhooks, doesn't require authentication +app.all("/api/v2/webhooks/:webhookId/receive", handleReceivingWebhook); + const checkAuthentication = function ( req: Request, res: Response, @@ -79,7 +82,6 @@ app.post("/api/v2/:service/action/:action", handleAction); //webhooks app.post("/api/v2/webhooks", handleCreateWebhook); -app.all("/api/v2/webhooks/:webhookId/receive", handleReceivingWebhook); //errors app.get("/debug-sentry", function mainHandler(req, res) { From 3c5a38858bd8f21d12c78eafc10df03d7a454019 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 12:36:35 +0000 Subject: [PATCH 046/113] Lots of receiving webhook work --- .../src/api/v2/webhooks/receive.ts | 8 +- .../src/core/webhook/receive/index.ts | 168 +++++++++++++++++- .../src/core/webhook/receive/types.ts | 0 .../src/core/webhook/subscribe/types.ts | 2 +- 4 files changed, 165 insertions(+), 13 deletions(-) delete mode 100644 apps/integrations/src/core/webhook/receive/types.ts diff --git a/apps/integrations/src/api/v2/webhooks/receive.ts b/apps/integrations/src/api/v2/webhooks/receive.ts index 181febea028..82a0b097596 100644 --- a/apps/integrations/src/api/v2/webhooks/receive.ts +++ b/apps/integrations/src/api/v2/webhooks/receive.ts @@ -34,9 +34,11 @@ export async function handleReceivingWebhook(req: Request, res: Response) { const receiver = new ReceiveWebhook(); const result = await receiver.call({ request, webhookId }); - res - .writeHead(result.response.status, result.response.headers) - .json(result.response.body); + const response = res.status(result.response.status); + Object.entries(result.response.headers).forEach(([key, value]) => { + response.header(key, value); + }); + response.json(result.response.body); } catch (error) { console.error(error); res.status(500).json({ success: false, error: "Internal server error" }); diff --git a/apps/integrations/src/core/webhook/receive/index.ts b/apps/integrations/src/core/webhook/receive/index.ts index 292f83fa918..3ace7ba8e39 100644 --- a/apps/integrations/src/core/webhook/receive/index.ts +++ b/apps/integrations/src/core/webhook/receive/index.ts @@ -1,9 +1,16 @@ -import { prisma, PrismaClient } from "db/db.server"; import { - WebhookIncomingRequest, - WebhookReceiveRequest, - WebhookResult, -} from "../types"; + Destination as DestinationRow, + Webhook as WebhookRow, +} from ".prisma/client"; +import { prisma, PrismaClient } from "db/db.server"; +import { catalog } from "integrations/catalog"; +import { getCredentials } from "../credentials"; +import { AuthenticationSchema } from "../subscribe/types"; +import { WebhookIncomingRequest, WebhookResult } from "../types"; + +type WebhookWithDestinations = WebhookRow & { + destinations: DestinationRow[]; +}; export class ReceiveWebhook { #prismaClient: PrismaClient; @@ -19,14 +26,157 @@ export class ReceiveWebhook { webhookId: string; request: WebhookIncomingRequest; }): Promise { - //todo get webhook - //todo get destination + //get webhook and destinations from the db + const webhookRow = await this.#getWebhookAndDestinationRow(webhookId); + if (!webhookRow) { + return { + success: false, + error: `Webhook ${webhookId} not found`, + response: { + status: 404, + headers: {}, + body: `Webhook ${webhookId} not found`, + }, + }; + } + if (webhookRow.destinations.length === 0) { + return { + success: false, + error: `Webhook ${webhookId} has no destinations`, + response: { + status: 404, + headers: {}, + body: `Webhook ${webhookId} has no destinations`, + }, + }; + } //if service webhook then collect together objects - //call receive and get events + let result: WebhookResult; + switch (webhookRow.type) { + case "SERVICE": { + result = await this.#handleServiceWebhook(webhookRow, request); + break; + } + case "GENERIC": { + result = await this.#handleGenericWebhook(webhookRow, request); + break; + } + default: { + throw new Error(`Unknown webhook type ${webhookRow.type}`); + } + } + //create deliveries and jobs in Graphile Worker //return response + return result; + } + + async #handleServiceWebhook( + webhookRow: WebhookWithDestinations, + request: WebhookIncomingRequest + ): Promise { + const service = webhookRow.service + ? catalog.services[webhookRow.service] + : undefined; + if (!service) { + return { + success: false, + error: `Service ${webhookRow.service} not found`, + response: { + status: 404, + headers: {}, + body: `Service ${webhookRow.service} not found`, + }, + }; + } + + if (!service.webhooks) { + return { + success: false, + error: `Service ${webhookRow.service} doesn't have webhooks`, + response: { + status: 404, + headers: {}, + body: `Service ${webhookRow.service} doesn't have webhooks`, + }, + }; + } + if (!webhookRow.webhookName) { + return { + success: false, + error: `Webhook ${webhookRow.id} doesn't have a webhook name`, + response: { + status: 404, + headers: {}, + body: `Webhook ${webhookRow.id} doesn't have a webhook name`, + }, + }; + } + + const webhookName = webhookRow.webhookName; + const webhook = Object.values(service.webhooks).find( + (w) => w.spec.id === webhookName + ); + if (!webhook) { + return { + success: false, + error: `Webhook ${webhookRow.webhookName} doesn't exist in service ${webhookRow.service}`, + response: { + status: 404, + headers: {}, + body: `Webhook ${webhookRow.webhookName} doesn't exist in service ${webhookRow.service}`, + }, + }; + } + + const authenticationData = AuthenticationSchema.safeParse( + webhookRow.authenticationData + ); + if (!authenticationData.success) { + return { + success: false, + error: `Webhook ${webhookRow.id} has invalid authentication data`, + response: { + status: 404, + headers: {}, + body: `Webhook ${webhookRow.id} has invalid authentication data`, + }, + }; + } + + const credentials = await getCredentials({ + service, + authentication: authenticationData.data, + }); + + const result = await webhook.receive({ + credentials, + secret: webhookRow.secret ?? undefined, + subscriptionData: webhookRow.externalData + ? (webhookRow.externalData as Record) + : {}, + request, + }); + + return result; + } + + async #handleGenericWebhook( + webhookRow: WebhookWithDestinations, + request: WebhookIncomingRequest + ): Promise { + throw new Error("Method not implemented."); + } - throw new Error("Not implemented"); + #getWebhookAndDestinationRow(id: string) { + return this.#prismaClient.webhook.findUnique({ + where: { + id, + }, + include: { + destinations: true, + }, + }); } } diff --git a/apps/integrations/src/core/webhook/receive/types.ts b/apps/integrations/src/core/webhook/receive/types.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index 4092b397da8..ffa40625d10 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -10,7 +10,7 @@ const APIKeySchema = z.object({ api_key: z.string(), }); -const AuthenticationSchema = z.discriminatedUnion("type", [ +export const AuthenticationSchema = z.discriminatedUnion("type", [ OAuthSchema, APIKeySchema, ]); From aafe9c70ffa6011637d547c04ca2852501959bf8 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 14:08:43 +0000 Subject: [PATCH 047/113] Create webhook deliveries and add Graphile worker jobs --- apps/integrations/package.json | 1 + .../migration.sql | 14 ++ apps/integrations/prisma/schema.prisma | 15 ++ .../src/api/v2/webhooks/receive.ts | 1 + .../src/core/jobs/tasks/webhookJob.ts | 56 +++++++ apps/integrations/src/core/jobs/worker.ts | 32 ++++ .../src/core/webhook/receive/index.ts | 8 + apps/integrations/src/core/webhook/types.ts | 24 +-- apps/integrations/src/index.ts | 1 + pnpm-lock.yaml | 151 ++++++++++++++++-- 10 files changed, 280 insertions(+), 23 deletions(-) create mode 100644 apps/integrations/prisma/migrations/20230304133437_added_webhook_event_delivery_table/migration.sql create mode 100644 apps/integrations/src/core/jobs/tasks/webhookJob.ts create mode 100644 apps/integrations/src/core/jobs/worker.ts diff --git a/apps/integrations/package.json b/apps/integrations/package.json index 08cca4cbf79..0c5edf88350 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -27,6 +27,7 @@ "body-parser": "^1.20.2", "express": "^4.18.1", "express-async-errors": "^3.1.1", + "graphile-worker": "^0.13.0", "json-pointer": "^0.6.2", "json-schema-deref-sync": "^0.14.0", "json-schema-to-typescript": "^11.0.3", diff --git a/apps/integrations/prisma/migrations/20230304133437_added_webhook_event_delivery_table/migration.sql b/apps/integrations/prisma/migrations/20230304133437_added_webhook_event_delivery_table/migration.sql new file mode 100644 index 00000000000..0eabf387655 --- /dev/null +++ b/apps/integrations/prisma/migrations/20230304133437_added_webhook_event_delivery_table/migration.sql @@ -0,0 +1,14 @@ +-- CreateTable +CREATE TABLE "WebhookEventDelivery" ( + "id" TEXT NOT NULL, + "eventName" TEXT NOT NULL, + "destinationId" TEXT NOT NULL, + "payload" JSONB NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WebhookEventDelivery_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "WebhookEventDelivery" ADD CONSTRAINT "WebhookEventDelivery_destinationId_fkey" FOREIGN KEY ("destinationId") REFERENCES "Destination"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/integrations/prisma/schema.prisma b/apps/integrations/prisma/schema.prisma index 9162e9bdab0..7864ba904e9 100644 --- a/apps/integrations/prisma/schema.prisma +++ b/apps/integrations/prisma/schema.prisma @@ -74,4 +74,19 @@ model Destination { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + + deliveries WebhookEventDelivery[] +} + +model WebhookEventDelivery { + id String @id @default(cuid()) + eventName String + + destination Destination @relation(fields: [destinationId], references: [id], onDelete: Cascade, onUpdate: Cascade) + destinationId String + + payload Json + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt } \ No newline at end of file diff --git a/apps/integrations/src/api/v2/webhooks/receive.ts b/apps/integrations/src/api/v2/webhooks/receive.ts index 82a0b097596..a040e5fb428 100644 --- a/apps/integrations/src/api/v2/webhooks/receive.ts +++ b/apps/integrations/src/api/v2/webhooks/receive.ts @@ -1,3 +1,4 @@ +import { createDeliveriesAndTasks } from "core/jobs/tasks/webhookJob"; import { HTTPMethod } from "core/request/types"; import { ReceiveWebhook } from "core/webhook/receive"; import { diff --git a/apps/integrations/src/core/jobs/tasks/webhookJob.ts b/apps/integrations/src/core/jobs/tasks/webhookJob.ts new file mode 100644 index 00000000000..1c791a4fc13 --- /dev/null +++ b/apps/integrations/src/core/jobs/tasks/webhookJob.ts @@ -0,0 +1,56 @@ +import { Destination } from ".prisma/client"; +import { WebhookEventResult } from "core/webhook/types"; +import { prisma } from "db/db.server"; +import { JobHelpers } from "graphile-worker"; +import { runner } from "../worker"; + +export async function createDeliveriesAndTasks({ + eventResults, + destinations, +}: { + eventResults: WebhookEventResult[]; + destinations: Destination[]; +}) { + const deliveries = eventResults.flatMap((eventResult) => { + const matchingDestinations = destinations.filter( + (d) => d.destinationEvent === eventResult.event + ); + + return matchingDestinations.map((destination) => ({ + eventName: eventResult.event, + destinationId: destination.id, + payload: eventResult.payload, + })); + }); + + return await prisma.$transaction(async (tx) => { + const deliveryPromises = deliveries.map((delivery) => + tx.webhookEventDelivery.create({ + data: { + eventName: delivery.eventName, + destinationId: delivery.destinationId, + payload: delivery.payload, + }, + }) + ); + + const deliveryRows = await Promise.all(deliveryPromises); + const jobPromises = deliveryRows.map((deliveryRow) => + runner.addJob("webhookTask", { deliveryId: deliveryRow.id }) + ); + + const jobs = await Promise.all(jobPromises); + return { deliveries, jobs }; + }); +} + +export async function webhookTask( + payload: unknown, + helpers: JobHelpers +): Promise { + // const { name } = payload; + // helpers.logger.info(`Hello, ${name}`); + + console.log("webhookTask", payload); + throw new Error("Not implemented"); +} diff --git a/apps/integrations/src/core/jobs/worker.ts b/apps/integrations/src/core/jobs/worker.ts new file mode 100644 index 00000000000..e9345da8268 --- /dev/null +++ b/apps/integrations/src/core/jobs/worker.ts @@ -0,0 +1,32 @@ +import { run, Runner } from "graphile-worker"; +import { webhookTask } from "./tasks/webhookJob"; + +let runner: Runner; + +async function main() { + runner = await run({ + connectionString: process.env.JOBS_DATABASE_URL, + concurrency: 5, + // Install signal handlers for graceful shutdown on SIGINT, SIGTERM, etc + noHandleSignals: false, + pollInterval: 1000, + taskList: { + webhookTask, + }, + }); + + // Immediately await (or otherwise handled) the resulting promise, to avoid + // "unhandled rejection" errors causing a process crash in the event of + // something going wrong. + await runner.promise; + + // If the worker exits (whether through fatal error or otherwise), the above + // promise will resolve/reject. +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); + +export { runner }; diff --git a/apps/integrations/src/core/webhook/receive/index.ts b/apps/integrations/src/core/webhook/receive/index.ts index 3ace7ba8e39..8bb26eb5b69 100644 --- a/apps/integrations/src/core/webhook/receive/index.ts +++ b/apps/integrations/src/core/webhook/receive/index.ts @@ -2,6 +2,7 @@ import { Destination as DestinationRow, Webhook as WebhookRow, } from ".prisma/client"; +import { createDeliveriesAndTasks } from "core/jobs/tasks/webhookJob"; import { prisma, PrismaClient } from "db/db.server"; import { catalog } from "integrations/catalog"; import { getCredentials } from "../credentials"; @@ -68,6 +69,13 @@ export class ReceiveWebhook { } //create deliveries and jobs in Graphile Worker + if (result.success) { + await createDeliveriesAndTasks({ + eventResults: result.eventResults, + destinations: webhookRow.destinations, + }); + } + //return response return result; } diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 47eaba2d2da..c0d7cc6f468 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -7,17 +7,19 @@ import { EndpointSpec } from "core/endpoint/types"; import { HTTPMethod, HTTPResponse } from "core/request/types"; import { JSONSchema } from "core/schemas/types"; -export type WebhookResult = - | { - success: true; - eventResults: WebhookEventResult[]; - response: HTTPResponse; - } - | { - success: false; - error: string; - response: HTTPResponse; - }; +export type WebhookResultSuccess = { + success: true; + eventResults: WebhookEventResult[]; + response: HTTPResponse; +}; + +export type WebhookResultError = { + success: false; + error: string; + response: HTTPResponse; +}; + +export type WebhookResult = WebhookResultSuccess | WebhookResultError; export type Webhook = { baseUrl: string; diff --git a/apps/integrations/src/index.ts b/apps/integrations/src/index.ts index 9999a48c593..915d8329207 100644 --- a/apps/integrations/src/index.ts +++ b/apps/integrations/src/index.ts @@ -8,6 +8,7 @@ import express, { Express, NextFunction, Request, Response } from "express"; import morgan from "morgan"; import { handleCreateWebhook } from "api/v2/webhooks/create"; import { handleReceivingWebhook } from "api/v2/webhooks/receive"; +import "core/jobs/worker"; dotenv.config(); const app: Express = express(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7d793b00b8..564868f277a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -62,6 +62,7 @@ importers: eslint-plugin-promise: ^6.1.1 express: ^4.18.1 express-async-errors: ^3.1.1 + graphile-worker: ^0.13.0 json-pointer: ^0.6.2 json-schema-deref-sync: ^0.14.0 json-schema-to-typescript: ^11.0.3 @@ -92,6 +93,7 @@ importers: body-parser: 1.20.2 express: 4.18.2 express-async-errors: 3.1.1_express@4.18.2 + graphile-worker: 0.13.0 json-pointer: 0.6.2 json-schema-deref-sync: 0.14.0 json-schema-to-typescript: 11.0.4 @@ -4885,6 +4887,10 @@ packages: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true + /@graphile/logger/0.2.0: + resolution: {integrity: sha512-jjcWBokl9eb1gVJ85QmoaQ73CQ52xAaOCF29ukRbYNl6lY+ts0ErTaDYOBlejcbUs2OpaiqYLO5uDhyLFzWw4w==} + dev: false + /@hapi/hoek/9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} dev: true @@ -6487,7 +6493,6 @@ packages: resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} dependencies: '@types/ms': 0.7.31 - dev: true /@types/degit/2.8.3: resolution: {integrity: sha512-CL7y71j2zaDmtPLD5Xq5S1Gv2dFoHl0/GBZm6s39Mj/ls28L3NzAOqf7H4H0/2TNVMgMjMVf9CAFYSjmXhi3bw==} @@ -6691,7 +6696,6 @@ packages: /@types/ms/0.7.31: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} - dev: true /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} @@ -6729,6 +6733,18 @@ packages: /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + /@types/parse-json/4.0.0: + resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} + dev: false + + /@types/pg/8.6.6: + resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==} + dependencies: + '@types/node': 18.14.0 + pg-protocol: 1.6.0 + pg-types: 2.2.0 + dev: false + /@types/prettier/2.7.2: resolution: {integrity: sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==} dev: false @@ -8102,6 +8118,11 @@ packages: resolution: {integrity: sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==} engines: {node: '>=0.10'} + /buffer-writer/2.0.0: + resolution: {integrity: sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==} + engines: {node: '>=4'} + dev: false + /buffer/5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -8277,7 +8298,6 @@ packages: /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - dev: true /camelcase-css/2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} @@ -8578,7 +8598,6 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: true /cliui/8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} @@ -8841,6 +8860,17 @@ packages: /core-util-is/1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + /cosmiconfig/7.1.0: + resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} + engines: {node: '>=10'} + dependencies: + '@types/parse-json': 4.0.0 + import-fresh: 3.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + yaml: 1.10.2 + dev: false + /cp-file/7.0.0: resolution: {integrity: sha512-0Cbj7gyvFVApzpK/uhCtQ/9kE9UnYpxMzaq5nQQC/Dh4iaj5fxp7iEFIullrYwzj8nf0qnsI1Qsx34hAeAebvw==} engines: {node: '>=8'} @@ -11688,6 +11718,24 @@ packages: /grapheme-splitter/1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + /graphile-worker/0.13.0: + resolution: {integrity: sha512-8Hl5XV6hkabZRhYzvbUfvjJfPFR5EPxYRVWlzQC2rqYHrjULTLBgBYZna5R9ukbnsbWSvn4vVrzOBIOgIC1jjw==} + engines: {node: '>=10.0.0'} + hasBin: true + dependencies: + '@graphile/logger': 0.2.0 + '@types/debug': 4.1.7 + '@types/pg': 8.6.6 + chokidar: 3.5.3 + cosmiconfig: 7.1.0 + json5: 2.2.3 + pg: 8.9.0 + tslib: 2.4.1 + yargs: 16.2.0 + transitivePeerDependencies: + - pg-native + dev: false + /graphql/16.6.0: resolution: {integrity: sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} @@ -11997,7 +12045,6 @@ packages: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - dev: true /imurmurhash/0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} @@ -12886,7 +12933,6 @@ packages: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - dev: true /jsonata/1.8.6: resolution: {integrity: sha512-ZH2TPYdNP2JecOl/HvrH47Xc+9imibEMQ4YqKy/F/FrM+2a6vfbGxeCX23dB9Fr6uvGwv+ghf1KxWB3iZk09wA==} @@ -14723,6 +14769,10 @@ packages: semver: 6.3.0 dev: true + /packet-reader/1.0.0: + resolution: {integrity: sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==} + dev: false + /pako/0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} dev: true @@ -14732,7 +14782,6 @@ packages: engines: {node: '>=6'} dependencies: callsites: 3.1.0 - dev: true /parse-cache-control/1.0.1: resolution: {integrity: sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==} @@ -14894,6 +14943,62 @@ packages: is-reference: 3.0.1 dev: true + /pg-connection-string/2.5.0: + resolution: {integrity: sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==} + dev: false + + /pg-int8/1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + dev: false + + /pg-pool/3.5.2_pg@8.9.0: + resolution: {integrity: sha512-His3Fh17Z4eg7oANLob6ZvH8xIVen3phEZh2QuyrIl4dQSDVEabNducv6ysROKpDNPSD+12tONZVWfSgMvDD9w==} + peerDependencies: + pg: '>=8.0' + dependencies: + pg: 8.9.0 + dev: false + + /pg-protocol/1.6.0: + resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==} + dev: false + + /pg-types/2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.0 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + dev: false + + /pg/8.9.0: + resolution: {integrity: sha512-ZJM+qkEbtOHRuXjmvBtOgNOXOtLSbxiMiUVMgE4rV6Zwocy03RicCVvDXgx8l4Biwo8/qORUnEqn2fdQzV7KCg==} + engines: {node: '>= 8.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + dependencies: + buffer-writer: 2.0.0 + packet-reader: 1.0.0 + pg-connection-string: 2.5.0 + pg-pool: 3.5.2_pg@8.9.0 + pg-protocol: 1.6.0 + pg-types: 2.2.0 + pgpass: 1.0.5 + dev: false + + /pgpass/1.0.5: + resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + dependencies: + split2: 4.1.0 + dev: false + /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -15059,6 +15164,28 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postgres-array/2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + dev: false + + /postgres-bytea/1.0.0: + resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==} + engines: {node: '>=0.10.0'} + dev: false + + /postgres-date/1.0.7: + resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} + engines: {node: '>=0.10.0'} + dev: false + + /postgres-interval/1.2.0: + resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} + engines: {node: '>=0.10.0'} + dependencies: + xtend: 4.0.2 + dev: false + /posthog-js/1.45.1: resolution: {integrity: sha512-dHB0agl9qc/PIhHhfnJB4hxzcO/wBS8z7U2OLrAAAyrmWU+3K1XnIipyZX3tEFq6hk1yL+tJuidBw+gqgMvo4g==} dependencies: @@ -15923,7 +16050,6 @@ packages: /resolve-from/4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - dev: true /resolve-from/5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} @@ -16503,6 +16629,11 @@ packages: through: 2.3.8 dev: true + /split2/4.1.0: + resolution: {integrity: sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==} + engines: {node: '>= 10.x'} + dev: false + /sprintf-js/1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -18586,7 +18717,6 @@ packages: /xtend/4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} - dev: true /y18n/4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} @@ -18609,7 +18739,6 @@ packages: /yaml/1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - dev: true /yargs-parser/18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} @@ -18622,7 +18751,6 @@ packages: /yargs-parser/20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} - dev: true /yargs-parser/21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} @@ -18656,7 +18784,6 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 20.2.9 - dev: true /yargs/17.6.2: resolution: {integrity: sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==} From fbcc21467912bb1746231e9bf7812093719a36d2 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 16:34:40 +0000 Subject: [PATCH 048/113] Sending request to the webhook destination --- .../src/core/jobs/tasks/webhookJob.ts | 57 +++++++++++++++++-- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/apps/integrations/src/core/jobs/tasks/webhookJob.ts b/apps/integrations/src/core/jobs/tasks/webhookJob.ts index 1c791a4fc13..c27b163fca5 100644 --- a/apps/integrations/src/core/jobs/tasks/webhookJob.ts +++ b/apps/integrations/src/core/jobs/tasks/webhookJob.ts @@ -1,7 +1,10 @@ import { Destination } from ".prisma/client"; import { WebhookEventResult } from "core/webhook/types"; +import { getFetch } from "core/fetch/fetchUtilities"; import { prisma } from "db/db.server"; +import crypto from "node:crypto"; import { JobHelpers } from "graphile-worker"; +import { z } from "zod"; import { runner } from "../worker"; export async function createDeliveriesAndTasks({ @@ -36,7 +39,14 @@ export async function createDeliveriesAndTasks({ const deliveryRows = await Promise.all(deliveryPromises); const jobPromises = deliveryRows.map((deliveryRow) => - runner.addJob("webhookTask", { deliveryId: deliveryRow.id }) + //the jobKey means this job will overwrite any existing job with the same key + runner.addJob( + "webhookTask", + { deliveryId: deliveryRow.id }, + { + jobKey: deliveryRow.id, + } + ) ); const jobs = await Promise.all(jobPromises); @@ -44,13 +54,50 @@ export async function createDeliveriesAndTasks({ }); } +const PayloadSchema = z.object({ + deliveryId: z.string(), +}); + export async function webhookTask( payload: unknown, helpers: JobHelpers ): Promise { - // const { name } = payload; - // helpers.logger.info(`Hello, ${name}`); + const { deliveryId } = PayloadSchema.parse(payload); + const delivery = await prisma.webhookEventDelivery.findUnique({ + where: { id: deliveryId }, + include: { + destination: { + include: { + webhook: true, + }, + }, + }, + }); + + if (!delivery) { + throw new Error(`Delivery ${deliveryId} not found`); + } + + const fetch = await getFetch(); - console.log("webhookTask", payload); - throw new Error("Not implemented"); + const bodyText = JSON.stringify(delivery.payload); + const hash = crypto + .createHmac("sha256", delivery.destination.destinationSecret) + .update(Buffer.from(bodyText, "utf8")) + .digest("base64"); + + const response = await fetch(delivery.destination.destinationUrl, { + method: "POST", + headers: { + "Content-Type": "application/json", + "X-Webhook-Signature": `sha256=${hash}`, + }, + body: bodyText, + }); + + if (!response.ok) { + throw new Error( + `Delivery ${deliveryId} failed with status ${response.status}` + ); + } } From 1cc394e6db9c627b3e101d44695f906a765ab318 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 16:38:41 +0000 Subject: [PATCH 049/113] When subscribing, send the destination secret back so we can check the bodies are signed correctly --- apps/integrations/src/core/webhook/subscribe/index.ts | 3 +++ apps/integrations/src/core/webhook/subscribe/types.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 8b8d7adc8ff..84c51bacee3 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -89,6 +89,7 @@ export class SubscribeToWebhook { return { success: true, + destinationSecret: destination.destinationSecret, result: { type: "service", webhookId: existingWebhookRow.id, @@ -134,6 +135,7 @@ export class SubscribeToWebhook { return { success: true, + destinationSecret: destination.destinationSecret, result: { type: "service", webhookId: newWebhookRow.id, @@ -210,6 +212,7 @@ export class SubscribeToWebhook { return { success: true, + destinationSecret: destination.destinationSecret, result: { type: "service", webhookId: newWebhookRow.id, diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index ffa40625d10..d21088efb2a 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -59,6 +59,7 @@ export type SubscribeResult = } | { success: true; + destinationSecret: string; result: | { type: "service"; From 683c40a30af8cae166b5b1ebbcf7237d42774b6f Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 17:12:26 +0000 Subject: [PATCH 050/113] Created the endpoint for receiving events in the web app --- .../src/core/jobs/tasks/webhookJob.ts | 9 ++- .../v2/internal/webhooks/$externalSourceId.ts | 57 +++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts diff --git a/apps/integrations/src/core/jobs/tasks/webhookJob.ts b/apps/integrations/src/core/jobs/tasks/webhookJob.ts index c27b163fca5..81b6b85dfeb 100644 --- a/apps/integrations/src/core/jobs/tasks/webhookJob.ts +++ b/apps/integrations/src/core/jobs/tasks/webhookJob.ts @@ -80,7 +80,14 @@ export async function webhookTask( const fetch = await getFetch(); - const bodyText = JSON.stringify(delivery.payload); + const bodyText = JSON.stringify({ + id: delivery.id, + timestamp: delivery.createdAt.toISOString(), + event: delivery.eventName, + input: delivery.destination.destinationData, + payload: delivery.payload, + }); + const hash = crypto .createHmac("sha256", delivery.destination.destinationSecret) .update(Buffer.from(bodyText, "utf8")) diff --git a/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts b/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts new file mode 100644 index 00000000000..74df5bc5e74 --- /dev/null +++ b/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts @@ -0,0 +1,57 @@ +import type { ActionArgs, LoaderArgs } from "@remix-run/server-runtime"; +import { z } from "zod"; +import { findExternalSourceById } from "~/models/externalSource.server"; +import { IngestEvent } from "~/services/events/ingest.server"; + +const paramsSchema = z.object({ + externalSourceId: z.string(), +}); + +const bodySchema = z.object({ + id: z.string(), + timestamp: z.string(), + event: z.string(), + input: z.record(z.any()), + payload: z.any(), +}); + +export async function action({ request, params }: ActionArgs) { + const { externalSourceId } = paramsSchema.parse(params); + const body = await request.json(); + const { id, timestamp, event, input, payload } = bodySchema.parse(body); + + const externalSource = await findExternalSourceById(externalSourceId); + + if (!externalSource) { + return { + status: 404, + body: `Could not find external source with id ${externalSourceId}`, + }; + } + + try { + const ingestService = new IngestEvent(); + await ingestService.call( + { + id, + payload, + name: event, + type: externalSource.type, + service: externalSource.service, + timestamp, + context: {}, + }, + externalSource.organization + ); + + return { status: 200 }; + } catch (error) { + return { + status: 500, + body: + error instanceof Error + ? error.message + : `Unknown error: ${JSON.stringify(error)}`, + }; + } +} From 5159ee4cdede3ab806548c7d6280656336457ead Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 18:13:48 +0000 Subject: [PATCH 051/113] Added displayProperties to TriggerEvent and the integrations side too --- .../migration.sql | 8 ++++++++ apps/integrations/prisma/schema.prisma | 1 + apps/integrations/src/core/jobs/tasks/webhookJob.ts | 3 +++ .../api/v2/internal/webhooks/$externalSourceId.ts | 11 ++++++++--- apps/webapp/app/services/events/ingest.server.ts | 3 +++ .../migration.sql | 5 +++++ apps/webapp/prisma/schema.prisma | 3 +++ 7 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 apps/integrations/prisma/migrations/20230304175813_added_displayproperties_event_delivery/migration.sql create mode 100644 apps/webapp/prisma/migrations/20230304175200_external_source_integrationwebhook_triggerevent_displayproperties/migration.sql diff --git a/apps/integrations/prisma/migrations/20230304175813_added_displayproperties_event_delivery/migration.sql b/apps/integrations/prisma/migrations/20230304175813_added_displayproperties_event_delivery/migration.sql new file mode 100644 index 00000000000..08422ba108a --- /dev/null +++ b/apps/integrations/prisma/migrations/20230304175813_added_displayproperties_event_delivery/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - Added the required column `displayProperties` to the `WebhookEventDelivery` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "WebhookEventDelivery" ADD COLUMN "displayProperties" JSONB NOT NULL; diff --git a/apps/integrations/prisma/schema.prisma b/apps/integrations/prisma/schema.prisma index 7864ba904e9..f0e99101cc7 100644 --- a/apps/integrations/prisma/schema.prisma +++ b/apps/integrations/prisma/schema.prisma @@ -85,6 +85,7 @@ model WebhookEventDelivery { destination Destination @relation(fields: [destinationId], references: [id], onDelete: Cascade, onUpdate: Cascade) destinationId String + displayProperties Json payload Json createdAt DateTime @default(now()) diff --git a/apps/integrations/src/core/jobs/tasks/webhookJob.ts b/apps/integrations/src/core/jobs/tasks/webhookJob.ts index 81b6b85dfeb..3aa34fdd22d 100644 --- a/apps/integrations/src/core/jobs/tasks/webhookJob.ts +++ b/apps/integrations/src/core/jobs/tasks/webhookJob.ts @@ -22,6 +22,7 @@ export async function createDeliveriesAndTasks({ return matchingDestinations.map((destination) => ({ eventName: eventResult.event, destinationId: destination.id, + displayProperties: eventResult.displayProperties, payload: eventResult.payload, })); }); @@ -32,6 +33,7 @@ export async function createDeliveriesAndTasks({ data: { eventName: delivery.eventName, destinationId: delivery.destinationId, + displayProperties: delivery.displayProperties, payload: delivery.payload, }, }) @@ -85,6 +87,7 @@ export async function webhookTask( timestamp: delivery.createdAt.toISOString(), event: delivery.eventName, input: delivery.destination.destinationData, + displayProperties: delivery.displayProperties, payload: delivery.payload, }); diff --git a/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts b/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts index 74df5bc5e74..c6a52b9795e 100644 --- a/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts +++ b/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts @@ -12,17 +12,21 @@ const bodySchema = z.object({ timestamp: z.string(), event: z.string(), input: z.record(z.any()), + displayProperties: z.object({ + title: z.string(), + }), payload: z.any(), }); export async function action({ request, params }: ActionArgs) { const { externalSourceId } = paramsSchema.parse(params); const body = await request.json(); - const { id, timestamp, event, input, payload } = bodySchema.parse(body); + const { id, timestamp, event, displayProperties, payload } = + bodySchema.parse(body); const externalSource = await findExternalSourceById(externalSourceId); - if (!externalSource) { + if (!externalSource || externalSource.type !== "INTEGRATION_WEBHOOK") { return { status: 404, body: `Could not find external source with id ${externalSourceId}`, @@ -36,10 +40,11 @@ export async function action({ request, params }: ActionArgs) { id, payload, name: event, - type: externalSource.type, + type: "WEBHOOK", service: externalSource.service, timestamp, context: {}, + displayProperties, }, externalSource.organization ); diff --git a/apps/webapp/app/services/events/ingest.server.ts b/apps/webapp/app/services/events/ingest.server.ts index a46924a133f..1c46961bab9 100644 --- a/apps/webapp/app/services/events/ingest.server.ts +++ b/apps/webapp/app/services/events/ingest.server.ts @@ -1,4 +1,5 @@ import type { TriggerType } from ".prisma/client"; +import type { DisplayProperties } from "@trigger.dev/integration-sdk"; import { ulid } from "ulid"; import type { PrismaClient } from "~/db.server"; import { prisma, Prisma } from "~/db.server"; @@ -16,6 +17,7 @@ export type IngestEventOptions = { context?: any; apiKey?: string; isTest?: boolean; + displayProperties?: DisplayProperties; }; export class IngestEvent { @@ -65,6 +67,7 @@ export class IngestEvent { service: options.service, type: options.type, isTest: options.isTest ?? false, + displayProperties: options.displayProperties, }, }); diff --git a/apps/webapp/prisma/migrations/20230304175200_external_source_integrationwebhook_triggerevent_displayproperties/migration.sql b/apps/webapp/prisma/migrations/20230304175200_external_source_integrationwebhook_triggerevent_displayproperties/migration.sql new file mode 100644 index 00000000000..e7e9aef0b9f --- /dev/null +++ b/apps/webapp/prisma/migrations/20230304175200_external_source_integrationwebhook_triggerevent_displayproperties/migration.sql @@ -0,0 +1,5 @@ +-- AlterEnum +ALTER TYPE "ExternalSourceType" ADD VALUE 'INTEGRATION_WEBHOOK'; + +-- AlterTable +ALTER TABLE "TriggerEvent" ADD COLUMN "displayProperties" JSONB; diff --git a/apps/webapp/prisma/schema.prisma b/apps/webapp/prisma/schema.prisma index a776ea0a1d6..9b9ec81fd1a 100644 --- a/apps/webapp/prisma/schema.prisma +++ b/apps/webapp/prisma/schema.prisma @@ -239,6 +239,7 @@ enum ExternalSourceType { WEBHOOK EVENT_BRIDGE HTTP_POLLING + INTEGRATION_WEBHOOK } model SchedulerSource { @@ -423,6 +424,8 @@ model TriggerEvent { dispatchedAt DateTime? isTest Boolean @default(false) + + displayProperties Json? } enum TriggerEventStatus { From 6760c72b5412ddb459208faebdbbe6b94cb628f1 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 18:56:38 +0000 Subject: [PATCH 052/113] Added event column to ExternalSource --- .../migration.sql | 2 ++ apps/webapp/prisma/schema.prisma | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 apps/webapp/prisma/migrations/20230304184007_add_externalsource_event_column/migration.sql diff --git a/apps/webapp/prisma/migrations/20230304184007_add_externalsource_event_column/migration.sql b/apps/webapp/prisma/migrations/20230304184007_add_externalsource_event_column/migration.sql new file mode 100644 index 00000000000..7ac6a40fd40 --- /dev/null +++ b/apps/webapp/prisma/migrations/20230304184007_add_externalsource_event_column/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "ExternalSource" ADD COLUMN "event" TEXT; diff --git a/apps/webapp/prisma/schema.prisma b/apps/webapp/prisma/schema.prisma index 9b9ec81fd1a..e3c69e52f21 100644 --- a/apps/webapp/prisma/schema.prisma +++ b/apps/webapp/prisma/schema.prisma @@ -226,6 +226,8 @@ model ExternalSource { connection APIConnection? @relation(fields: [connectionId], references: [id], onDelete: SetNull) connectionId String? + event String? + @@unique([organizationId, key]) } From b92b82e1fd27e3b8968c9bb6c0d75f8a81373e19 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sat, 4 Mar 2023 18:56:56 +0000 Subject: [PATCH 053/113] Added subscribe functionality for the INTEGRATION_WEBHOOK --- .../registerExternalSource.server.ts | 61 ++++++++ .../app/services/integrationsClient.server.ts | 139 ++++++++++++++++++ 2 files changed, 200 insertions(+) diff --git a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts index d806eba156c..9469e0e5665 100644 --- a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts +++ b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts @@ -9,6 +9,8 @@ import { findExternalSourceById, } from "~/models/externalSource.server"; import { getAccessInfo } from "../accessInfo.server"; +import { env } from "~/env.server"; +import { integrationsClient } from "../integrationsClient.server"; export class RegisterExternalSource { #prismaClient: PrismaClient; @@ -56,6 +58,12 @@ export class RegisterExternalSource { case "HTTP_POLLING": { return this.#registerHttpPolling(externalSource); } + case "INTEGRATION_WEBHOOK": { + return this.#registerIntegrationWebhook( + externalSource, + externalSource.connection + ); + } } } @@ -112,6 +120,59 @@ export class RegisterExternalSource { return true; } + async #registerIntegrationWebhook( + externalSource: ExternalSource, + connection?: APIConnection | null + ) { + if (!connection) { + return true; // Somehow the connection slot was deleted, so by returning true we're saying we're done with this webhook + } + + const accessInfo = await getAccessInfo(connection); + if (accessInfo == null) { + throw new Error("No access token found for webhook"); + } + + if (!externalSource.event) { + throw new Error("No event found for integration webhook"); + } + + const registrationResponse = await integrationsClient.registerWebhook({ + service: externalSource.service, + connectionId: connection.id, + externalSourceId: externalSource.id, + accessInfo, + event: externalSource.event, + data: externalSource.source, + }); + + if (!registrationResponse.success) { + return false; + } + + await this.#prismaClient.externalSource.update({ + where: { + id: externalSource.id, + }, + data: { + status: "READY", + readyAt: new Date(), + secret: registrationResponse.destinationSecret, + }, + }); + + await this.#prismaClient.workflow.updateMany({ + where: { + externalSourceId: externalSource.id, + }, + data: { + status: "READY", + }, + }); + + return true; + } + async #registerEventBridge(externalSource: ExternalSource) { return true; } diff --git a/apps/webapp/app/services/integrationsClient.server.ts b/apps/webapp/app/services/integrationsClient.server.ts index 38add088446..9e08a7cc890 100644 --- a/apps/webapp/app/services/integrationsClient.server.ts +++ b/apps/webapp/app/services/integrationsClient.server.ts @@ -5,8 +5,79 @@ import type { PerformedRequestResponse, ServiceMetadata, } from "@trigger.dev/integration-sdk"; +import { z } from "zod"; import { env } from "~/env.server"; +type ServiceSubscription = { + service: string; + type: "service"; + data: Record; + consumerId: string; + callbackUrl: string; + authentication: + | { + type: "oauth"; + connectionId: string; + } + | { + type: "api-key"; + api_key: string; + }; + eventName: string; +}; + +type GenericSubscription = { + type: "generic"; + consumerId: string; + callbackUrl: string; + eventName: string; + schema: any; + verifyPayload: { + enabled: boolean; + header?: string; + }; +}; + +export type Subscription = ServiceSubscription | GenericSubscription; + +const SubscriptionResponseSchema = z.discriminatedUnion("success", [ + z.object({ + success: z.literal(false), + error: z.object({ + code: z.string(), + message: z.string(), + }), + }), + z.object({ + success: z.literal(true), + destinationSecret: z.string(), + result: z.union([ + z.object({ + type: z.literal("service"), + webhookId: z.string(), + subscription: z.discriminatedUnion("type", [ + z.object({ + type: z.literal("automatic"), + }), + z.object({ + type: z.literal("manual"), + url: z.string(), + secret: z.string().optional(), + }), + ]), + }), + z.object({ + type: z.literal("generic"), + webhookId: z.string(), + url: z.string(), + secret: z.string().optional(), + }), + ]), + }), +]); + +export type SubscribeResponse = z.infer; + class IntegrationsClient { #baseUrl: string; #apiKey: string; @@ -126,6 +197,74 @@ class IntegrationsClient { return undefined; } } + + async registerWebhook({ + service, + connectionId, + externalSourceId, + accessInfo, + event, + data, + }: { + service: string; + connectionId: string; + externalSourceId: string; + accessInfo: AccessInfo; + event: string; + data: any; + }): Promise { + let credentials: ServiceSubscription["authentication"]; + switch (accessInfo.type) { + case "oauth2": + credentials = { + type: "oauth", + connectionId, + }; + break; + case "api_key": + credentials = { + type: "api-key", + api_key: accessInfo.api_key, + }; + break; + } + + const callbackUrl = `${env.APP_ORIGIN}/api/v2/internal/webhooks/${externalSourceId}`; + const body: Subscription = { + type: "service", + service, + consumerId: connectionId, + callbackUrl, + authentication: credentials, + data, + eventName: event, + }; + + try { + const response = await fetch(`${this.#baseUrl}/webhooks`, { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.#apiKey}`, + }, + body: JSON.stringify(body), + }); + + const json = await response.json(); + const parsedResult = SubscriptionResponseSchema.parse(json); + + return parsedResult; + } catch (e) { + console.error(e); + return { + success: false, + error: { + code: "unknown", + message: JSON.stringify(e), + }, + }; + } + } } export const integrationsClient = new IntegrationsClient( From 29c5a942f813614a5d5dfc77edf908460adb9fbe Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 12:44:09 +0000 Subject: [PATCH 054/113] Key that gets passed through and added registering logic --- .../src/api/v2/webhooks/create.ts | 14 ++++ .../src/core/webhook/subscribe/index.ts | 11 +-- .../src/core/webhook/subscribe/types.ts | 2 + apps/integrations/src/core/webhook/types.ts | 3 +- .../typeform/webhooks/webhooks.ts | 2 +- .../registerExternalSource.server.ts | 1 + .../app/services/integrationsClient.server.ts | 5 ++ .../workflows/registerWorkflow.server.ts | 76 +++++++++++++++++++ packages/common-schemas/src/triggers.ts | 13 ++++ 9 files changed, 117 insertions(+), 10 deletions(-) diff --git a/apps/integrations/src/api/v2/webhooks/create.ts b/apps/integrations/src/api/v2/webhooks/create.ts index 4640cc2aea0..912a6d350f8 100644 --- a/apps/integrations/src/api/v2/webhooks/create.ts +++ b/apps/integrations/src/api/v2/webhooks/create.ts @@ -4,6 +4,7 @@ import { SubscribeResult, } from "core/webhook/subscribe/types"; import { SubscribeToWebhook } from "core/webhook/subscribe"; +import { Prisma } from "db/db.server"; export async function handleCreateWebhook(req: Request, res: Response) { const parsedBody = SubscribeInputSchema.safeParse(req.body); @@ -32,6 +33,19 @@ export async function handleCreateWebhook(req: Request, res: Response) { res.status(400).json(result); return; } catch (error) { + if (error instanceof Prisma.PrismaClientKnownRequestError) { + if (error.code === "P2002") { + res.status(400).json({ + success: false, + error: { + code: "duplicate_webhook", + message: `A webhook with this ${error.meta?.target} already exists`, + }, + }); + return; + } + } + res.status(500).json(error); } } diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 84c51bacee3..c8f6e3290d5 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -65,15 +65,10 @@ export class SubscribeToWebhook { }; } - //the key and consumerId are used to identify the webhook - const key = `${service.service}-${event.name}-${event.createKey( - input.data - )}`; - //is there an existing webhook? const existingWebhookRow = await this.#getWebhookRow({ consumerId: input.consumerId, - key, + key: input.key, }); if (existingWebhookRow) { @@ -121,7 +116,7 @@ export class SubscribeToWebhook { const newWebhookRow = await this.#createManualWebhook({ requiresSecret: webhook.subscription.requiresSecret, consumerId: input.consumerId, - key, + key: input.key, service: input.service, webhookName: webhook.spec.id, authenticationData: input.authentication, @@ -151,7 +146,7 @@ export class SubscribeToWebhook { const newWebhookRow = await this.#createAutomaticWebhook({ requiresSecret: webhook.subscription.requiresSecret, consumerId: input.consumerId, - key, + key: input.key, service: input.service, webhookName: webhook.spec.id, authenticationData: input.authentication, diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index d21088efb2a..7ef510e4e09 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -25,6 +25,7 @@ const ServiceSchema = z.object({ authentication: AuthenticationSchema, data: z.record(z.any()), eventName: z.string(), + key: z.string(), }); const GenericSchema = z.object({ @@ -37,6 +38,7 @@ const GenericSchema = z.object({ enabled: z.boolean(), header: z.string().optional(), }), + key: z.string(), }); export const SubscribeInputSchema = z.discriminatedUnion("type", [ diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index c0d7cc6f468..ebb6273dc2d 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -124,7 +124,8 @@ export type WebhookEvent = { metadata: WebhookEventMetadata; schema: JSONSchema; examples: any[]; - createKey: (data: Record) => string; + /** This will be used to identify this event, you should use template language but inside a double quoted string */ + key: string; matches: (data: { subscriptionData: Record; request: WebhookIncomingRequest; diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 2634dba15e6..70100eaf8a5 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -19,7 +19,7 @@ export const formResponseEvent: WebhookEvent = { }, schema: formEventSchema, examples: [example], - createKey: (data) => `${data.form_id}`, + key: "${data.form_id}", matches: () => true, process: async (data: WebhookReceiveRequest) => [ { diff --git a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts index 9469e0e5665..470ee4a27dc 100644 --- a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts +++ b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts @@ -144,6 +144,7 @@ export class RegisterExternalSource { accessInfo, event: externalSource.event, data: externalSource.source, + key: externalSource.key, }); if (!registrationResponse.success) { diff --git a/apps/webapp/app/services/integrationsClient.server.ts b/apps/webapp/app/services/integrationsClient.server.ts index 9e08a7cc890..1bbe2d4bf93 100644 --- a/apps/webapp/app/services/integrationsClient.server.ts +++ b/apps/webapp/app/services/integrationsClient.server.ts @@ -24,6 +24,7 @@ type ServiceSubscription = { api_key: string; }; eventName: string; + key: string; }; type GenericSubscription = { @@ -36,6 +37,7 @@ type GenericSubscription = { enabled: boolean; header?: string; }; + key: string; }; export type Subscription = ServiceSubscription | GenericSubscription; @@ -205,12 +207,14 @@ class IntegrationsClient { accessInfo, event, data, + key, }: { service: string; connectionId: string; externalSourceId: string; accessInfo: AccessInfo; event: string; + key: string; data: any; }): Promise { let credentials: ServiceSubscription["authentication"]; @@ -238,6 +242,7 @@ class IntegrationsClient { authentication: credentials, data, eventName: event, + key, }; try { diff --git a/apps/webapp/app/services/workflows/registerWorkflow.server.ts b/apps/webapp/app/services/workflows/registerWorkflow.server.ts index 8abcffe4b5e..c1d2220d161 100644 --- a/apps/webapp/app/services/workflows/registerWorkflow.server.ts +++ b/apps/webapp/app/services/workflows/registerWorkflow.server.ts @@ -212,6 +212,32 @@ export class RegisterWorkflow { return externalSource; } + case "INTEGRATION_WEBHOOK": { + const externalSource = await this.#upsertIntegrationWebhookSource( + payload, + organization, + workflow + ); + + if (!externalSource) { + return; + } + + await this.#prismaClient.workflow.update({ + where: { + id: workflow.id, + }, + data: { + externalSourceId: externalSource.id, + }, + }); + + await taskQueue.publish("EXTERNAL_SOURCE_UPSERTED", { + id: externalSource.id, + }); + + return externalSource; + } case "SCHEDULE": { if (!payload.trigger.source) { return; @@ -358,6 +384,56 @@ export class RegisterWorkflow { } } + async #upsertIntegrationWebhookSource( + payload: WorkflowMetadata, + organization: Organization, + workflow: Workflow + ) { + if (payload.trigger.type !== "INTEGRATION_WEBHOOK") { + return; + } + + const existingConnection = await this.#findLatestExistingConnectionInOrg( + payload.trigger.service, + organization + ); + + const externalSource = await this.#prismaClient.externalSource.upsert({ + where: { + organizationId_key: { + key: payload.trigger.key, + organizationId: organization.id, + }, + }, + update: { + source: payload.trigger.source ?? undefined, + }, + create: { + organizationId: organization.id, + key: this.#keyForExternalSource(payload), + type: "INTEGRATION_WEBHOOK", + source: payload.trigger.source ?? {}, + status: "CREATED", + connectionId: existingConnection?.id, + service: payload.trigger.service, + manualRegistration: false, + }, + }); + + if (!externalSource.connectionId && existingConnection) { + await this.#prismaClient.externalSource.update({ + where: { + id: externalSource.id, + }, + data: { + connectionId: existingConnection.id, + }, + }); + } + + return externalSource; + } + #keyForExternalSource(payload: WorkflowMetadata): string { if (payload.trigger.type === "WEBHOOK") { switch (payload.trigger.service) { diff --git a/packages/common-schemas/src/triggers.ts b/packages/common-schemas/src/triggers.ts index b773f1cc290..24d9fb6a206 100644 --- a/packages/common-schemas/src/triggers.ts +++ b/packages/common-schemas/src/triggers.ts @@ -26,6 +26,18 @@ export const WebhookEventTriggerSchema = z.object({ }); export type WebhookEventTrigger = z.infer; +export const IntegrationWebhookEventTriggerSchema = z.object({ + type: z.literal("INTEGRATION_WEBHOOK"), + service: z.string(), + name: z.string(), + key: z.string(), + filter: EventFilterSchema, + source: JsonSchema.optional(), +}); +export type IntegrationWebhookEventTrigger = z.infer< + typeof IntegrationWebhookEventTriggerSchema +>; + export const HttpEventTriggerSchema = z.object({ type: z.literal("HTTP_ENDPOINT"), service: z.literal("trigger"), @@ -56,6 +68,7 @@ export type SlackInteractionEventTrigger = z.infer< export const TriggerMetadataSchema = z.discriminatedUnion("type", [ CustomEventTriggerSchema, WebhookEventTriggerSchema, + IntegrationWebhookEventTriggerSchema, HttpEventTriggerSchema, ScheduledEventTriggerSchema, SlackInteractionTriggerSchema, From 7477fed0a1881ad4a7d5e43ab67c520df5b5466e Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 15:04:13 +0000 Subject: [PATCH 055/113] Generating the SDK with the events in --- apps/integrations/package.json | 1 + apps/integrations/src/core/endpoint/types.ts | 12 +- .../src/core/request/requestEndpoint.ts | 16 +-- apps/integrations/src/core/webhook/index.ts | 37 ++++- apps/integrations/src/core/webhook/types.ts | 1 + .../integrations/typeform/webhooks/specs.ts | 28 +--- .../typeform/webhooks/webhooks.ts | 22 ++- .../src/trigger/sdk/generateService.ts | 131 ++++++++++++++---- .../sdk/templates/package.json.template | 3 +- apps/integrations/src/trigger/sdk/types.ts | 1 + .../integrations/src/trigger/sdk/utilities.ts | 30 ++++ packages/trigger-sdk/src/events.ts | 5 + pnpm-lock.yaml | 39 ++++++ 13 files changed, 239 insertions(+), 87 deletions(-) diff --git a/apps/integrations/package.json b/apps/integrations/package.json index 0c5edf88350..c0e3ec38045 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -55,6 +55,7 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^15.6.1", "eslint-plugin-promise": "^6.1.1", + "json-schema-to-zod": "^0.6.3", "nock": "^13.3.0", "nodemon": "^2.0.19", "prisma": "^4.3.0", diff --git a/apps/integrations/src/core/endpoint/types.ts b/apps/integrations/src/core/endpoint/types.ts index f26e4ba2de3..f2a3c11ebad 100644 --- a/apps/integrations/src/core/endpoint/types.ts +++ b/apps/integrations/src/core/endpoint/types.ts @@ -27,11 +27,7 @@ export type EndpointSpecParameter = { description: string; required?: boolean; schema: JSONSchema; -} & ( - | EndpointSpecParameterUrl - | EndpointSpecParameterHeader - | EndpointSpecParameterBody -); +} & (EndpointSpecParameterUrl | EndpointSpecParameterHeader); type EndpointSpecParameterUrl = { in: "query" | "path"; @@ -41,16 +37,10 @@ type EndpointSpecParameterHeader = { in: "header"; }; -type EndpointSpecParameterBody = { - in: "body"; - pointer: JSONPointer; -}; - interface EndpointSpecRequest { headers?: Record; body?: { schema: JSONSchema; - static?: Record; }; } diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index 668b6f532c1..0c21cb06dfd 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -24,7 +24,7 @@ export async function requestEndpoint( // check the request body is there if it's meant to be const requiresBody = request.body?.schema != null; - if (body == null && requiresBody && request.body?.static === undefined) { + if (body == null && requiresBody) { throw { type: "missing_body", }; @@ -81,10 +81,6 @@ export async function requestEndpoint( [name]: `${element}`, }; break; - case "body": { - JsonPointer.set(body, parameter.pointer, element); - break; - } } } } @@ -100,16 +96,6 @@ export async function requestEndpoint( } } - // add any static body content - if (request.body?.static != null) { - for (const pointer in request.body.static) { - if (Object.prototype.hasOwnProperty.call(request.body.static, pointer)) { - const element = request.body.static[pointer]; - JsonPointer.set(body, pointer, element); - } - } - } - // build the fetch config const url = `${baseUrl}${path}`; let fetchConfig: HTTPRequest = { diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 3767bf8148e..7f4ba286011 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -4,6 +4,7 @@ import { } from "core/authentication/types"; import { requestEndpoint } from "core/request/requestEndpoint"; import { HTTPResponse } from "core/request/types"; +import { JSONSchema } from "core/schemas/types"; import { Webhook, WebhookEvent, @@ -26,6 +27,15 @@ export function makeWebhook(input: { | { type: "automatic"; requiresSecret: boolean; + inputSchema: JSONSchema; + /** take the raw data and turn it into the appropriate input for the subscribe request */ + preSubscribe: (input: { + webhookId: string; + callbackUrl: string; + events: string[]; + secret?: string; + data: Record; + }) => { parameters?: Record; body?: any }; /** after a subscription you might want to alter the result, e.g. add secret from response */ postSubscribe?: ( result: WebhookSubscriptionResult @@ -63,6 +73,17 @@ export function makeWebhook(input: { }; } + if (!("preSubscribe" in input.subscription)) + throw new Error("No required presubscribe field"); + + const subscribeInputData = input.subscription.preSubscribe({ + webhookId: config.webhookId, + callbackUrl: config.callbackUrl, + events: config.events, + secret: config.secret, + data: config.inputData, + }); + const result = await subscribeToWebhook({ id: config.webhookId, baseUrl, @@ -73,6 +94,7 @@ export function makeWebhook(input: { events: config.events, secret: config.secret, data: config.inputData, + subscribeInputData, }); //have to do this because TS is dumb because this in a closure if (!("postSubscribe" in input.subscription)) return result; @@ -83,6 +105,7 @@ export function makeWebhook(input: { subscription = { type: "automatic", + inputSpec: input.subscription.inputSchema, requiresSecret: input.subscription.requiresSecret, subscribe: subscribe, }; @@ -170,6 +193,7 @@ async function subscribeToWebhook({ events, secret, data, + subscribeInputData, }: { id: string; baseUrl: string; @@ -180,6 +204,10 @@ async function subscribeToWebhook({ events: string[]; secret?: string; data: Record; + subscribeInputData: { + parameters?: Record | undefined; + body?: any; + }; }): Promise { switch (webhook.subscribe.type) { case "manual": @@ -193,13 +221,8 @@ async function subscribeToWebhook({ }, { credentials, - parameters: { - webhookId: id, - callbackUrl, - events, - secret, - ...data, - }, + parameters: subscribeInputData.parameters, + body: subscribeInputData.body, } ); diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index ebb6273dc2d..5ee9cb2ff0a 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -37,6 +37,7 @@ export type WebhookSubscription = export type WebhookSubscriptionAutomatic = { type: "automatic"; requiresSecret: boolean; + inputSpec: JSONSchema; subscribe: ( data: WebhookSubscriptionRequest ) => Promise; diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index d726ed8e3b3..d2027885482 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -4,7 +4,7 @@ import { WebhookSpec } from "core/webhook/types"; const createEndpoint: EndpointSpec = { method: "PUT", - path: "/forms/{form_id}/webhooks/{webhookId}", + path: "/forms/{form_id}/webhooks/{tag}", metadata: { name: "Create webhook", description: "Create a webhook for a form", @@ -27,7 +27,7 @@ const createEndpoint: EndpointSpec = { in: "path", }, { - name: "webhookId", + name: "tag", description: "The webhook tag", required: true, schema: { @@ -35,26 +35,6 @@ const createEndpoint: EndpointSpec = { }, in: "path", }, - { - name: "secret", - description: "The webhook secret", - required: true, - schema: { - type: "string", - }, - in: "body", - pointer: createJSONPointer(["secret"]), - }, - { - name: "callbackUrl", - description: "The webhook url", - required: true, - schema: { - type: "string", - }, - in: "body", - pointer: createJSONPointer(["url"]), - }, ], request: { headers: { @@ -78,10 +58,6 @@ const createEndpoint: EndpointSpec = { }, }, }, - static: { - "/enabled": true, - "/verify_ssl": true, - }, }, }, responses: [ diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 70100eaf8a5..774aca8c143 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -5,6 +5,7 @@ import { example } from "./examples"; import { formEventSchema } from "./schemas"; import { formResponse } from "./specs"; import crypto from "node:crypto"; +import { makeObjectSchema, makeStringSchema } from "core/schemas/makeSchema"; const baseUrl = "https://api.typeform.com"; @@ -19,7 +20,7 @@ export const formResponseEvent: WebhookEvent = { }, schema: formEventSchema, examples: [example], - key: "${data.form_id}", + key: "${params.form_id}", matches: () => true, process: async (data: WebhookReceiveRequest) => [ { @@ -42,6 +43,25 @@ const webhook = makeWebhook({ subscription: { type: "automatic", requiresSecret: true, + inputSchema: makeObjectSchema("Input", { + requiredProperties: { + form_id: makeStringSchema("Form ID"), + }, + }), + preSubscribe: (input) => { + return { + parameters: { + form_id: input.data.form_id, + tag: input.webhookId, + }, + body: { + enabled: true, + secret: input.secret, + url: input.callbackUrl, + verify_ssl: true, + }, + }; + }, }, preProcess: async (data) => { if (data.secret) { diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index b42b4b90305..53f051b8d86 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -1,16 +1,22 @@ -import { IndentationText, NewLineKind, Project, QuoteKind } from "ts-morph"; +import { AutoReffer } from "core/schemas/autoReffer"; +import { makeAnyOf } from "core/schemas/makeSchema"; +import { JSONSchema } from "core/schemas/types"; import { Service } from "core/service/types"; import fs from "fs/promises"; -import path from "path"; import { generateInputOutputSchemas } from "generators/combineSchemas"; import { getTypesFromSchema } from "generators/generateTypes"; +import { parseSchema } from "json-schema-to-zod"; +import path from "path"; import rimraf from "rimraf"; -import { makeAnyOf } from "core/schemas/makeSchema"; -import { JSONSchema } from "core/schemas/types"; -import { FunctionData } from "./types"; +import { IndentationText, NewLineKind, Project, QuoteKind } from "ts-morph"; import { generateDocs } from "./generateDocs"; -import { TitleCaseWithSpaces, toFriendlyTypeName } from "./utilities"; -import { AutoReffer } from "core/schemas/autoReffer"; +import { FunctionData } from "./types"; +import { + TitleCaseWithSpaces, + toCamelCase, + toFriendlyTypeName, + toTitleCase, +} from "./utilities"; const appDir = process.cwd(); @@ -140,19 +146,20 @@ async function createFileAndReplaceVariables( } async function generateFunctionData(service: Service) { - const { actions } = service; + const { actions, webhooks } = service; const functions: Record = {}; //loop through actions - for (const key in actions) { - const action = actions[key]; + if (actions) { + for (const key in actions) { + const action = actions[key]; - //generate schemas for input and output - const title = TitleCaseWithSpaces(action.name); - const name = action.name; - const friendlyName = toFriendlyTypeName(name); - const schemas = generateInputOutputSchemas(action.spec, friendlyName); + //generate schemas for input and output + const title = TitleCaseWithSpaces(action.name); + const name = action.name; + const friendlyName = toFriendlyTypeName(name); + const schemas = generateInputOutputSchemas(action.spec, friendlyName); - const functionCode = ` + const functionCode = ` ${action.description ? `/** ${action.description} */` : ""} export async function ${action.name}( /** This key should be unique inside your workflow */ @@ -181,16 +188,86 @@ export async function ${action.name}( } `; - const functionData: FunctionData = { - title, - name, - friendlyName, - description: action.description, - input: schemas.input, - output: schemas.output, - functionCode, - }; - functions[name] = functionData; + const functionData: FunctionData = { + type: "action", + title, + name, + friendlyName, + description: action.description, + input: schemas.input, + output: schemas.output, + functionCode, + }; + functions[name] = functionData; + } + } + + if (webhooks) { + for (const key in webhooks) { + const webhook = webhooks[key]; + + for (const eventKey in webhook.events) { + const event = webhook.events[eventKey]; + + //generate schemas for input and output + switch (webhook.subscription.type) { + case "automatic": { + const typeName = toTitleCase(event.name); + const inputSpec = webhook.subscription.inputSpec; + inputSpec.title = `${typeName}Input`; + const outputSpec = event.schema; + outputSpec.title = `${typeName}Output`; + const title = event.metadata.displayProperties.title; + const functionName = toCamelCase(`${typeName}Event`); + const friendlyName = toFriendlyTypeName(functionName); + + const zodReturnSchema = parseSchema(outputSpec as any); + const zodSchemaName = `${functionName}Schema`; + + const functionCode = ` +const ${zodSchemaName} = ${zodReturnSchema} + +${event.metadata.description ? `/** ${event.metadata.description} */` : ""} +export function ${functionName}( + /** The params for this call */ + params: Prettify<${inputSpec.title}> +): TriggerEvent { + return { + metadata: { + type: "INTEGRATION_WEBHOOK", + service: "${service.service}", + name: "${event.name}", + key: \`${event.key}\`, + filter: { + service: ["${service.service}"], + event: ["${event.name}"], + }, + source: params, + }, + schema: ${zodSchemaName}, + }; +} + `; + + const functionData: FunctionData = { + type: "action", + title, + name: functionName, + friendlyName, + description: event.metadata.description, + input: inputSpec, + output: outputSpec, + functionCode, + }; + functions[functionName] = functionData; + break; + } + case "manual": { + throw new Error("Manual subscriptions not supported yet"); + } + } + } + } } return functions; @@ -244,6 +321,8 @@ async function createFunctionsAndTypesFiles( const functionsFile = project.createSourceFile( `${basePath}/src/index.ts`, `import { getTriggerRun } from "@trigger.dev/sdk"; + import type { TriggerEvent } from "@trigger.dev/sdk"; + import { z } from "zod"; import { ${typeSchemas .map((t) => t && t.title) .join(", ")}, Prettify } from "./types"; diff --git a/apps/integrations/src/trigger/sdk/templates/package.json.template b/apps/integrations/src/trigger/sdk/templates/package.json.template index 62f203a3263..5750f58a5ba 100644 --- a/apps/integrations/src/trigger/sdk/templates/package.json.template +++ b/apps/integrations/src/trigger/sdk/templates/package.json.template @@ -28,6 +28,7 @@ "build:tsup": "tsup" }, "dependencies": { - "debug": "^4.3.4" + "debug": "^4.3.4", + "zod": "^3.20.2" } } diff --git a/apps/integrations/src/trigger/sdk/types.ts b/apps/integrations/src/trigger/sdk/types.ts index f7ab0d011be..7866cef32fb 100644 --- a/apps/integrations/src/trigger/sdk/types.ts +++ b/apps/integrations/src/trigger/sdk/types.ts @@ -1,6 +1,7 @@ import { JSONSchema } from "core/schemas/types"; export type FunctionData = { + type: "action" | "event"; title: string; name: string; friendlyName: string; diff --git a/apps/integrations/src/trigger/sdk/utilities.ts b/apps/integrations/src/trigger/sdk/utilities.ts index 4a878192d3a..c5085d6b3ed 100644 --- a/apps/integrations/src/trigger/sdk/utilities.ts +++ b/apps/integrations/src/trigger/sdk/utilities.ts @@ -27,9 +27,39 @@ export function toFriendlyTypeName(original: string) { //convert the input string to TitleCase, strip out any non alpha characters and strip out spaces return original .replace(/([A-Z])/g, " $1") + .replace(/[_-]/g, " ") .replace(/^./, function (str: string) { return str.toUpperCase(); }) .replace(/[^a-zA-Z]/g, "") .replace(/\s/g, ""); } + +export function toCamelCase(original: string) { + return original + .replace(/([A-Z])/g, " $1") + .replace(/[_-]/g, " ") + .replace(/^./, function (str: string) { + return str.toLowerCase(); + }) + .replace(/\s(.)/g, function ($1: string) { + return $1.toUpperCase(); + }) + .replace(/\s/g, "") + .replace(/^(.)/, function ($1: string) { + return $1.toLowerCase(); + }); +} + +export function toTitleCase(original: string) { + return original + .replace(/([A-Z])/g, " $1") + .replace(/[_-]/g, " ") + .replace(/^./, function (str: string) { + return str.toUpperCase(); + }) + .replace(/\s(.)/g, function ($1: string) { + return $1.toUpperCase(); + }) + .replace(/\s/g, ""); +} diff --git a/packages/trigger-sdk/src/events.ts b/packages/trigger-sdk/src/events.ts index c0e78c85a0b..0efdae7ca5e 100644 --- a/packages/trigger-sdk/src/events.ts +++ b/packages/trigger-sdk/src/events.ts @@ -20,6 +20,11 @@ export type TriggerEvent = { schema: TSchema; }; +export type TriggerIntegrationWebhookEvent = { + metadata: z.infer; + schema: TSchema; +}; + export type TriggerCustomEventOptions = { name: string; schema?: TSchema; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 564868f277a..1b83e2f6f66 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,6 +66,7 @@ importers: json-pointer: ^0.6.2 json-schema-deref-sync: ^0.14.0 json-schema-to-typescript: ^11.0.3 + json-schema-to-zod: ^0.6.3 loglevel: ^1.8.1 morgan: ^1.10.0 nock: ^13.3.0 @@ -120,6 +121,7 @@ importers: eslint-plugin-import: 2.27.5_zycheyzypw6s5ouujsf5akzhsy eslint-plugin-n: 15.6.1_eslint@8.34.0 eslint-plugin-promise: 6.1.1_eslint@8.34.0 + json-schema-to-zod: 0.6.3 nock: 13.3.0 nodemon: 2.0.20 prisma: 4.8.1 @@ -848,6 +850,25 @@ importers: rimraf: 3.0.2 tsup: 6.5.0 + generated-integrations/typeform: + specifiers: + '@trigger.dev/sdk': workspace:* + '@types/debug': ^4.1.7 + '@types/node': '16' + debug: ^4.3.4 + rimraf: ^3.0.2 + tsup: ^6.5.0 + zod: ^3.20.2 + dependencies: + debug: 4.3.4 + zod: 3.20.2 + devDependencies: + '@trigger.dev/sdk': link:../../packages/trigger-sdk + '@types/debug': 4.1.7 + '@types/node': 16.18.11 + rimraf: 3.0.2 + tsup: 6.6.3 + integrations/github: specifiers: '@octokit/webhooks': ^10.4.0 @@ -1306,6 +1327,15 @@ packages: lodash.clonedeep: 4.5.0 dev: true + /@apidevtools/json-schema-ref-parser/9.1.2: + resolution: {integrity: sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg==} + dependencies: + '@jsdevtools/ono': 7.1.3 + '@types/json-schema': 7.0.11 + call-me-maybe: 1.0.2 + js-yaml: 4.1.0 + dev: true + /@aws-crypto/crc32/2.0.0: resolution: {integrity: sha512-TvE1r2CUueyXOuHdEigYjIZVesInd9KN+K/TFFNfkkxRThiNxO6i4ZqqAVMoEjAamZZ1AA8WXJkjCz7YShHPQA==} dependencies: @@ -12902,6 +12932,15 @@ packages: prettier: 2.8.2 dev: false + /json-schema-to-zod/0.6.3: + resolution: {integrity: sha512-G/B51WWBeY1+ozbE4ZOPHblY8CJ5Frk5f4wUPynWfzkD0ysB2nXsrEnkRlx5UFNOe/WKFErMP/NAUhwK3nd4jg==} + hasBin: true + dependencies: + '@apidevtools/json-schema-ref-parser': 9.1.2 + '@types/json-schema': 7.0.11 + prettier: 2.8.2 + dev: true + /json-schema-traverse/0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true From 46a426c90b3e659aa8cc99771dd4c00ce5bbf279 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 15:09:11 +0000 Subject: [PATCH 056/113] Fix for typecheck issue --- packages/create-trigger/src/utils/createProject.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-trigger/src/utils/createProject.ts b/packages/create-trigger/src/utils/createProject.ts index 2a258bc4726..1323e35c647 100644 --- a/packages/create-trigger/src/utils/createProject.ts +++ b/packages/create-trigger/src/utils/createProject.ts @@ -67,7 +67,7 @@ function updatePackageJson(projectName: string, projectDir: string) { }); } -function updateReadme(projectName: string, projectDir: string) { +function updateReadme(_projectName: string, projectDir: string) { const existingReadme = fs.readFileSync(path.resolve(projectDir, "README.md")); fs.writeFileSync(path.resolve(projectDir, "README.md"), existingReadme); From 98e05ac581c6b13d74cd46647cbff28972b520f9 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 15:51:40 +0000 Subject: [PATCH 057/113] Code generation working --- .../src/trigger/sdk/generateService.ts | 37 +- .../migration.sql | 2 + apps/webapp/prisma/schema.prisma | 1 + generated-integrations/typeform/README.md | 3 + .../typeform/docs/form-response-event.mdx | 119 +++ generated-integrations/typeform/package.json | 34 + .../typeform/schema-optimized.json | 878 ++++++++++++++++++ generated-integrations/typeform/src/index.ts | 50 + generated-integrations/typeform/src/types.ts | 197 ++++ generated-integrations/typeform/tsconfig.json | 21 + .../typeform/tsup.config.ts | 22 + pnpm-lock.yaml | 17 + 12 files changed, 1370 insertions(+), 11 deletions(-) create mode 100644 apps/webapp/prisma/migrations/20230305151257_trigger_type_integrationwebhook/migration.sql create mode 100644 generated-integrations/typeform/README.md create mode 100644 generated-integrations/typeform/docs/form-response-event.mdx create mode 100644 generated-integrations/typeform/package.json create mode 100644 generated-integrations/typeform/schema-optimized.json create mode 100644 generated-integrations/typeform/src/index.ts create mode 100644 generated-integrations/typeform/src/types.ts create mode 100644 generated-integrations/typeform/tsconfig.json create mode 100644 generated-integrations/typeform/tsup.config.ts diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 53f051b8d86..d2a8afdfa9f 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -228,7 +228,7 @@ export async function ${action.name}( const ${zodSchemaName} = ${zodReturnSchema} ${event.metadata.description ? `/** ${event.metadata.description} */` : ""} -export function ${functionName}( +function ${functionName}( /** The params for this call */ params: Prettify<${inputSpec.title}> ): TriggerEvent { @@ -250,7 +250,7 @@ export function ${functionName}( `; const functionData: FunctionData = { - type: "action", + type: "event", title, name: functionName, friendlyName, @@ -318,17 +318,32 @@ async function createFunctionsAndTypesFiles( ); typesFile.formatText(); + const imports = `import { getTriggerRun } from "@trigger.dev/sdk"; + import type { TriggerEvent } from "@trigger.dev/sdk"; + import { z } from "zod"; + import { ${typeSchemas + .map((t) => t && t.title) + .join(", ")}, Prettify } from "./types";`; + + const functions = `${Object.values(functionsData) + .map((f) => f.functionCode) + .join("")}`; + + const eventFunctions = Object.values(functionsData).filter( + (f) => f.type === "event" + ); + const eventExport = + eventFunctions.length > 0 + ? `export const events = { ${eventFunctions + .map((f) => f.name) + .join(", ")} };` + : ""; + const functionsFile = project.createSourceFile( `${basePath}/src/index.ts`, - `import { getTriggerRun } from "@trigger.dev/sdk"; - import type { TriggerEvent } from "@trigger.dev/sdk"; - import { z } from "zod"; - import { ${typeSchemas - .map((t) => t && t.title) - .join(", ")}, Prettify } from "./types"; - ${Object.values(functionsData) - .map((f) => f.functionCode) - .join("")}`, + `${imports} + ${functions} + ${eventExport}`, { overwrite: true, } diff --git a/apps/webapp/prisma/migrations/20230305151257_trigger_type_integrationwebhook/migration.sql b/apps/webapp/prisma/migrations/20230305151257_trigger_type_integrationwebhook/migration.sql new file mode 100644 index 00000000000..e15e451c085 --- /dev/null +++ b/apps/webapp/prisma/migrations/20230305151257_trigger_type_integrationwebhook/migration.sql @@ -0,0 +1,2 @@ +-- AlterEnum +ALTER TYPE "TriggerType" ADD VALUE 'INTEGRATION_WEBHOOK'; diff --git a/apps/webapp/prisma/schema.prisma b/apps/webapp/prisma/schema.prisma index e3c69e52f21..f714b0d58a1 100644 --- a/apps/webapp/prisma/schema.prisma +++ b/apps/webapp/prisma/schema.prisma @@ -194,6 +194,7 @@ enum TriggerType { EVENT_BRIDGE HTTP_POLLING SLACK_INTERACTION + INTEGRATION_WEBHOOK } enum WorkflowStatus { diff --git a/generated-integrations/typeform/README.md b/generated-integrations/typeform/README.md new file mode 100644 index 00000000000..185578f8ce1 --- /dev/null +++ b/generated-integrations/typeform/README.md @@ -0,0 +1,3 @@ +# Trigger.dev Typeform integration + +View more documentation[here](https://docs.trigger.dev) diff --git a/generated-integrations/typeform/docs/form-response-event.mdx b/generated-integrations/typeform/docs/form-response-event.mdx new file mode 100644 index 00000000000..2554986e007 --- /dev/null +++ b/generated-integrations/typeform/docs/form-response-event.mdx @@ -0,0 +1,119 @@ +--- +title: New response +sidebarTitle: New response +description: A form response was submitted +--- + +## Params + + + A unique string. Please see the [Keys and Resumability](/guides/resumability) + doc for more info. + + Form Response Input + + Form ID + + +## Response + + + Form Response Output + + The ID of the event that triggered this webhook + + The type of event, always "form_response" + + Form_response + + The ID of the form that was submitted + + The unique token for this response + + The date and time the response was submitted + + The date and time the respondent landed on the form + + Definition + + The ID of the form + + The title of the form + + Fields + + Field + + The ID of the field + + The title of the field + + The type of the field + + A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. + + Whether or not the field allows multiple selections + + Whether or not the field allows an 'other' choice + + Choices + + Choice + + The label of the choice + + The ID of the choice + + Endings + + Ending + + The ID of the ending + + A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. + + The title of the ending + + The type of the ending + + Answers + + Answer + +*Please note that this object is one of the following possible types* + + + Ending + + The ID of the ending + + A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. + + Calculated + + The score of the response, if the form has a score field + + Variables + + Variable + +*Please note that this object is one of the following possible types* + + Number variable + + The ID of the variable + + The type of the variable + + The value of the variable + + Number variable + + The ID of the variable + + The type of the variable + + The value of the variable + + Hidden + \ No newline at end of file diff --git a/generated-integrations/typeform/package.json b/generated-integrations/typeform/package.json new file mode 100644 index 00000000000..93b7a28ef12 --- /dev/null +++ b/generated-integrations/typeform/package.json @@ -0,0 +1,34 @@ +{ + "name": "@trigger.dev/typeform", + "version": "0.1.21", + "description": "The official Typeform integration for Trigger.dev", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "publishConfig": { + "access": "public" + }, + "files": [ + "dist/index.js", + "dist/index.d.ts", + "dist/index.js.map" + ], + "devDependencies": { + "@trigger.dev/sdk": "workspace:*", + "@types/debug": "^4.1.7", + "@types/node": "16", + "rimraf": "^3.0.2", + "tsup": "^6.5.0" + }, + "peerDependencies": { + "@trigger.dev/sdk": "workspace:*" + }, + "scripts": { + "clean": "rimraf dist", + "build": "npm run clean && npm run build:tsup", + "build:tsup": "tsup" + }, + "dependencies": { + "debug": "^4.3.4", + "zod": "^3.20.2" + } +} diff --git a/generated-integrations/typeform/schema-optimized.json b/generated-integrations/typeform/schema-optimized.json new file mode 100644 index 00000000000..411a81992be --- /dev/null +++ b/generated-integrations/typeform/schema-optimized.json @@ -0,0 +1,878 @@ +{ + "title": "TypeformTypes", + "anyOf": [ + { + "type": "object", + "title": "FormResponseInput", + "properties": { + "form_id": { + "type": "string", + "title": "Form ID" + } + }, + "required": [ + "form_id" + ] + }, + { + "type": "object", + "title": "FormResponseOutput", + "properties": { + "event_id": { + "type": "string", + "title": "event_id", + "description": "The ID of the event that triggered this webhook" + }, + "event_type": { + "type": "string", + "title": "event_type", + "description": "The type of event, always \"form_response\"", + "const": "form_response" + }, + "form_response": { + "type": "object", + "title": "form_response", + "properties": { + "calculated": { + "type": "object", + "title": "calculated", + "properties": { + "score": { + "type": "number", + "title": "score", + "description": "The score of the response, if the form has a score field" + } + }, + "required": [ + "score" + ] + }, + "variables": { + "type": "array", + "title": "variables", + "items": { + "title": "variable", + "oneOf": [ + { + "type": "object", + "title": "number variable", + "properties": { + "id": { + "type": "string", + "title": "id", + "description": "The ID of the variable" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the variable", + "const": "text" + }, + "text": { + "type": "string", + "title": "text", + "description": "The value of the variable" + } + }, + "required": [ + "id", + "type", + "text" + ] + }, + { + "type": "object", + "title": "number variable", + "properties": { + "id": { + "type": "string", + "title": "id", + "description": "The ID of the variable" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the variable", + "const": "number" + }, + "number": { + "type": "number", + "title": "number", + "description": "The value of the variable" + } + }, + "required": [ + "id", + "type", + "number" + ] + } + ] + } + }, + "hidden": { + "type": "object", + "title": "hidden", + "additionalProperties": true + }, + "form_id": { + "type": "string", + "title": "form_id", + "description": "The ID of the form that was submitted" + }, + "token": { + "type": "string", + "title": "token", + "description": "The unique token for this response" + }, + "submitted_at": { + "type": "string", + "title": "submitted_at", + "description": "The date and time the response was submitted" + }, + "landed_at": { + "type": "string", + "title": "landed_at", + "description": "The date and time the respondent landed on the form" + }, + "definition": { + "type": "object", + "title": "definition", + "properties": { + "endings": { + "type": "array", + "title": "endings", + "items": { + "type": "object", + "title": "ending", + "properties": { + "id": { + "type": "string", + "title": "id", + "description": "The ID of the ending" + }, + "ref": { + "type": "string", + "title": "ref", + "description": "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + }, + "title": { + "type": "string", + "title": "title", + "description": "The title of the ending" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the ending" + } + }, + "required": [ + "id", + "ref", + "title", + "type" + ], + "additionalProperties": true + } + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the form" + }, + "title": { + "type": "string", + "title": "title", + "description": "The title of the form" + }, + "fields": { + "type": "array", + "title": "fields", + "items": { + "type": "object", + "title": "field", + "properties": { + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "title": { + "type": "string", + "title": "title", + "description": "The title of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field" + }, + "ref": { + "type": "string", + "title": "ref", + "description": "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + }, + "allow_multiple_selectiors": { + "title": "allow_multiple_selectiors", + "type": "boolean", + "description": "Whether or not the field allows multiple selections" + }, + "allow_other_choice": { + "title": "allow_other_choice", + "type": "boolean", + "description": "Whether or not the field allows an 'other' choice" + }, + "choices": { + "type": "array", + "title": "choices", + "items": { + "type": "object", + "title": "choice", + "properties": { + "label": { + "type": "string", + "title": "label", + "description": "The label of the choice" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the choice" + } + }, + "required": [ + "label", + "id" + ] + } + } + }, + "required": [ + "id", + "title", + "type", + "ref", + "allow_multiple_selectiors", + "allow_other_choice", + "choices" + ] + } + } + }, + "required": [ + "id", + "title", + "fields" + ] + }, + "answers": { + "type": "array", + "title": "answers", + "items": { + "title": "answer", + "oneOf": [ + [ + { + "type": "object", + "title": "text answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "text" + }, + "text": { + "type": "string", + "title": "text", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "short_text", + "long_text" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "text", + "field" + ] + }, + { + "type": "object", + "title": "choice answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "choice" + }, + "choice": { + "type": "object", + "title": "choice", + "properties": { + "label": { + "type": "string", + "title": "label", + "description": "The label of the choice" + }, + "other": { + "type": "string", + "title": "label", + "description": "What the user typed in to the \"other\" field" + } + } + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "picture_choice", + "dropdown", + "multiple_choice" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "choice", + "field" + ] + }, + { + "type": "object", + "title": "choices answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "choices" + }, + "choices": { + "type": "object", + "title": "choices", + "properties": { + "other": { + "type": "string", + "title": "label", + "description": "What the user typed in to the \"other\" field" + }, + "labels": { + "type": "array", + "title": "labels", + "items": { + "type": "string", + "title": "label", + "description": "The label of the choice" + } + } + }, + "required": [ + "labels" + ] + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "picture_choice", + "dropdown", + "multiple_choice" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "choices", + "field" + ] + }, + { + "type": "object", + "title": "email answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "email" + }, + "email": { + "type": "string", + "title": "email", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "email" + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "email", + "field" + ] + }, + { + "type": "object", + "title": "date answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "date" + }, + "date": { + "type": "string", + "title": "date", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "date" + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "date", + "field" + ] + }, + { + "type": "object", + "title": "boolean answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "boolean" + }, + "boolean": { + "title": "boolean", + "type": "boolean", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "legal", + "yes_no" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "boolean", + "field" + ] + }, + { + "type": "object", + "title": "url answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "url" + }, + "url": { + "type": "string", + "title": "url", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "website", + "calendly" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "url", + "field" + ] + }, + { + "type": "object", + "title": "number answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "number" + }, + "number": { + "type": "number", + "title": "number", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "rating", + "opinion_scale", + "number" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "number", + "field" + ] + }, + { + "type": "object", + "title": "file url answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "file_url" + }, + "file_url": { + "type": "string", + "title": "file_url", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "file_upload" + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "file_url", + "field" + ] + }, + { + "type": "object", + "title": "payment answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "payment" + }, + "payment": { + "type": "object", + "title": "payment", + "properties": { + "amount": { + "type": "number", + "title": "amount", + "description": "The amount of the payment" + }, + "last4": { + "type": "string", + "title": "last4", + "description": "The last 4 digits of the card" + }, + "name": { + "type": "string", + "title": "name", + "description": "The name of the credit card" + }, + "success": { + "title": "success", + "type": "boolean", + "description": "Whether the payment succeeded" + } + }, + "required": [ + "amount", + "last4", + "name", + "success" + ] + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "payment" + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "payment", + "field" + ] + } + ] + ] + } + }, + "ending": { + "type": "object", + "title": "ending", + "properties": { + "id": { + "type": "string", + "title": "id", + "description": "The ID of the ending" + }, + "ref": { + "type": "string", + "title": "ref", + "description": "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + } + }, + "required": [ + "id", + "ref" + ], + "additionalProperties": true + } + }, + "required": [ + "form_id", + "token", + "submitted_at", + "landed_at", + "definition", + "answers", + "ending" + ] + } + }, + "required": [ + "event_id", + "event_type", + "form_response" + ] + } + ], + "definitions": {} +} \ No newline at end of file diff --git a/generated-integrations/typeform/src/index.ts b/generated-integrations/typeform/src/index.ts new file mode 100644 index 00000000000..41413d387f7 --- /dev/null +++ b/generated-integrations/typeform/src/index.ts @@ -0,0 +1,50 @@ +import { getTriggerRun } from "@trigger.dev/sdk"; +import type { TriggerEvent } from "@trigger.dev/sdk"; +import { z } from "zod"; +import { FormResponseInput, FormResponseOutput, Prettify } from "./types"; + +const formResponseEventSchema = z.object({ + "event_id": z.string().describe("The ID of the event that triggered this webhook"), "event_type": z.literal("form_response").describe("The type of event, always \"form_response\""), "form_response": z.object({ + "calculated": z.object({ "score": z.number().describe("The score of the response, if the form has a score field") }).optional(), "variables": z.array(z.any().superRefine((x, ctx) => { + const schemas = [z.object({ "id": z.string().describe("The ID of the variable"), "type": z.literal("text").describe("The type of the variable"), "text": z.string().describe("The value of the variable") }), z.object({ "id": z.string().describe("The ID of the variable"), "type": z.literal("number").describe("The type of the variable"), "number": z.number().describe("The value of the variable") })]; + const errors = schemas.reduce( + (errors: z.ZodError[], schema) => + ((result) => ("error" in result ? [...errors, result.error] : errors))( + schema.safeParse(x) + ), + [] + ); + if (schemas.length - errors.length !== 1) { + ctx.addIssue({ + path: ctx.path, + code: "invalid_union", + unionErrors: errors, + message: "Invalid input: Should pass single schema", + }); + } + })).optional(), "hidden": z.record(z.any()).optional(), "form_id": z.string().describe("The ID of the form that was submitted"), "token": z.string().describe("The unique token for this response"), "submitted_at": z.string().describe("The date and time the response was submitted"), "landed_at": z.string().describe("The date and time the respondent landed on the form"), "definition": z.object({ "endings": z.array(z.object({ "id": z.string().describe("The ID of the ending"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to."), "title": z.string().describe("The title of the ending"), "type": z.string().describe("The type of the ending") }).catchall(z.any())).optional(), "id": z.string().describe("The ID of the form"), "title": z.string().describe("The title of the form"), "fields": z.array(z.object({ "id": z.string().describe("The ID of the field"), "title": z.string().describe("The title of the field"), "type": z.string().describe("The type of the field"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to."), "allow_multiple_selectiors": z.boolean().describe("Whether or not the field allows multiple selections"), "allow_other_choice": z.boolean().describe("Whether or not the field allows an 'other' choice"), "choices": z.array(z.object({ "label": z.string().describe("The label of the choice"), "id": z.string().describe("The ID of the choice") })) })) }), "answers": z.array(z.any()), "ending": z.object({ "id": z.string().describe("The ID of the ending"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to.") }).catchall(z.any()) + }) +}) + +/** A form response was submitted */ +function formResponseEvent( + /** The params for this call */ + params: Prettify +): TriggerEvent { + return { + metadata: { + type: "INTEGRATION_WEBHOOK", + service: "typeform", + name: "form_response", + key: `${params.form_id}`, + filter: { + service: ["typeform"], + event: ["form_response"], + }, + source: params, + }, + schema: formResponseEventSchema, + }; +} + +export const events = { formResponseEvent }; diff --git a/generated-integrations/typeform/src/types.ts b/generated-integrations/typeform/src/types.ts new file mode 100644 index 00000000000..6715d48e883 --- /dev/null +++ b/generated-integrations/typeform/src/types.ts @@ -0,0 +1,197 @@ +export type TypeformTypes = (FormResponseInput | FormResponseOutput) +export type FormID = string +/** + * The ID of the event that triggered this webhook + */ +export type EventId = string +/** + * The type of event, always "form_response" + */ +export type EventType = "form_response" +/** + * The score of the response, if the form has a score field + */ +export type Score = number +export type Variable = (NumberVariable | NumberVariable1) +/** + * The ID of the variable + */ +export type Id = string +/** + * The type of the variable + */ +export type Type = "text" +/** + * The value of the variable + */ +export type Text = string +/** + * The ID of the variable + */ +export type Id1 = string +/** + * The type of the variable + */ +export type Type1 = "number" +/** + * The value of the variable + */ +export type Number = number +export type Variables = Variable[] +/** + * The ID of the form that was submitted + */ +export type FormId = string +/** + * The unique token for this response + */ +export type Token = string +/** + * The date and time the response was submitted + */ +export type SubmittedAt = string +/** + * The date and time the respondent landed on the form + */ +export type LandedAt = string +/** + * The ID of the ending + */ +export type Id2 = string +/** + * A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. + */ +export type Ref = string +/** + * The title of the ending + */ +export type Title = string +/** + * The type of the ending + */ +export type Type2 = string +export type Endings = Ending[] +/** + * The ID of the form + */ +export type Id3 = string +/** + * The title of the form + */ +export type Title1 = string +/** + * The ID of the field + */ +export type Id4 = string +/** + * The title of the field + */ +export type Title2 = string +/** + * The type of the field + */ +export type Type3 = string +/** + * A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. + */ +export type Ref1 = string +/** + * Whether or not the field allows multiple selections + */ +export type AllowMultipleSelectiors = boolean +/** + * Whether or not the field allows an 'other' choice + */ +export type AllowOtherChoice = boolean +/** + * The label of the choice + */ +export type Label = string +/** + * The ID of the choice + */ +export type Id5 = string +export type Choices = Choice[] +export type Fields = Field[] +export type Answer = [{ "type": "object", "title": "text answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "text" }, "text": { "type": "string", "title": "text", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["short_text", "long_text"] } }, "required": ["id", "type"] } }, "required": ["type", "text", "field"] }, { "type": "object", "title": "choice answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "choice" }, "choice": { "type": "object", "title": "choice", "properties": { "label": { "type": "string", "title": "label", "description": "The label of the choice" }, "other": { "type": "string", "title": "label", "description": "What the user typed in to the \"other\" field" } } }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["picture_choice", "dropdown", "multiple_choice"] } }, "required": ["id", "type"] } }, "required": ["type", "choice", "field"] }, { "type": "object", "title": "choices answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "choices" }, "choices": { "type": "object", "title": "choices", "properties": { "other": { "type": "string", "title": "label", "description": "What the user typed in to the \"other\" field" }, "labels": { "type": "array", "title": "labels", "items": { "type": "string", "title": "label", "description": "The label of the choice" } } }, "required": ["labels"] }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["picture_choice", "dropdown", "multiple_choice"] } }, "required": ["id", "type"] } }, "required": ["type", "choices", "field"] }, { "type": "object", "title": "email answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "email" }, "email": { "type": "string", "title": "email", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "email" } }, "required": ["id", "type"] } }, "required": ["type", "email", "field"] }, { "type": "object", "title": "date answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "date" }, "date": { "type": "string", "title": "date", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "date" } }, "required": ["id", "type"] } }, "required": ["type", "date", "field"] }, { "type": "object", "title": "boolean answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "boolean" }, "boolean": { "title": "boolean", "type": "boolean", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["legal", "yes_no"] } }, "required": ["id", "type"] } }, "required": ["type", "boolean", "field"] }, { "type": "object", "title": "url answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "url" }, "url": { "type": "string", "title": "url", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["website", "calendly"] } }, "required": ["id", "type"] } }, "required": ["type", "url", "field"] }, { "type": "object", "title": "number answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "number" }, "number": { "type": "number", "title": "number", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["rating", "opinion_scale", "number"] } }, "required": ["id", "type"] } }, "required": ["type", "number", "field"] }, { "type": "object", "title": "file url answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "file_url" }, "file_url": { "type": "string", "title": "file_url", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "file_upload" } }, "required": ["id", "type"] } }, "required": ["type", "file_url", "field"] }, { "type": "object", "title": "payment answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "payment" }, "payment": { "type": "object", "title": "payment", "properties": { "amount": { "type": "number", "title": "amount", "description": "The amount of the payment" }, "last4": { "type": "string", "title": "last4", "description": "The last 4 digits of the card" }, "name": { "type": "string", "title": "name", "description": "The name of the credit card" }, "success": { "title": "success", "type": "boolean", "description": "Whether the payment succeeded" } }, "required": ["amount", "last4", "name", "success"] }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "payment" } }, "required": ["id", "type"] } }, "required": ["type", "payment", "field"] }] +export type Answers = Answer[] +/** + * The ID of the ending + */ +export type Id6 = string +/** + * A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. + */ +export type Ref2 = string + +export interface FormResponseInput { + form_id: FormID +} +export interface FormResponseOutput { + event_id: EventId + event_type: EventType + form_response: FormResponse +} +export interface FormResponse { + calculated?: Calculated + variables?: Variables + hidden?: Hidden + form_id: FormId + token: Token + submitted_at: SubmittedAt + landed_at: LandedAt + definition: Definition + answers: Answers + ending: Ending1 +} +export interface Calculated { + score: Score +} +export interface NumberVariable { + id: Id + type: Type + text: Text +} +export interface NumberVariable1 { + id: Id1 + type: Type1 + number: Number +} +export interface Hidden { + [k: string]: unknown +} +export interface Definition { + endings?: Endings + id: Id3 + title: Title1 + fields: Fields +} +export interface Ending { + id: Id2 + ref: Ref + title: Title + type: Type2 + [k: string]: unknown +} +export interface Field { + id: Id4 + title: Title2 + type: Type3 + ref: Ref1 + allow_multiple_selectiors: AllowMultipleSelectiors + allow_other_choice: AllowOtherChoice + choices: Choices +} +export interface Choice { + label: Label + id: Id5 +} +export interface Ending1 { + id: Id6 + ref: Ref2 + [k: string]: unknown +} + +export type Prettify = { + [K in keyof T]: T[K]; +} & {}; diff --git a/generated-integrations/typeform/tsconfig.json b/generated-integrations/typeform/tsconfig.json new file mode 100644 index 00000000000..bb3e70788c7 --- /dev/null +++ b/generated-integrations/typeform/tsconfig.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 16", + "include": ["./src/**/*.ts", "tsup.config.ts"], + "compilerOptions": { + "module": "commonjs", + "target": "ES2021", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "lib": ["DOM", "DOM.Iterable", "ES2019"], + "paths": { + "@trigger.dev/sdk/*": ["../../packages/trigger-sdk/src/*"], + "@trigger.dev/sdk": ["../../packages/trigger-sdk/src/index"] + } + }, + "exclude": ["node_modules"] +} diff --git a/generated-integrations/typeform/tsup.config.ts b/generated-integrations/typeform/tsup.config.ts new file mode 100644 index 00000000000..5fcec5da2b5 --- /dev/null +++ b/generated-integrations/typeform/tsup.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from "tsup"; + +export default defineConfig([ + { + name: "main", + entry: ["./src/index.ts"], + outDir: "./dist", + platform: "node", + format: ["cjs"], + legacyOutput: true, + sourcemap: true, + clean: true, + bundle: true, + splitting: false, + dts: true, + treeshake: { + preset: "smallest", + }, + external: ["http", "https", "util", "events", "tty", "os", "timers"], + esbuildPlugins: [], + }, +]); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b83e2f6f66..1c968e4f552 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -778,6 +778,23 @@ importers: '@types/node': 16.18.11 tsx: 3.12.2 + examples/typeform: + specifiers: + '@trigger.dev/sdk': workspace:* + '@trigger.dev/tsconfig': workspace:* + '@trigger.dev/typeform': workspace:* + '@types/node': '16' + tsx: ^3.12.0 + zod: ^3.20.2 + dependencies: + '@trigger.dev/sdk': link:../../packages/trigger-sdk + '@trigger.dev/typeform': link:../../generated-integrations/typeform + zod: 3.20.2 + devDependencies: + '@trigger.dev/tsconfig': link:../../config-packages/tsconfig + '@types/node': 16.18.11 + tsx: 3.12.3 + examples/whatsapp: specifiers: '@trigger.dev/sdk': workspace:* From 2a92afde0f313607b423bd49a8fbb76c96d33c8e Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 16:19:27 +0000 Subject: [PATCH 058/113] Created a typeform example --- config-packages/tsconfig/examples.json | 6 +++++- examples/typeform/package.json | 19 +++++++++++++++++++ examples/typeform/src/index.ts | 17 +++++++++++++++++ examples/typeform/tsconfig.json | 5 +++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 examples/typeform/package.json create mode 100644 examples/typeform/src/index.ts create mode 100644 examples/typeform/tsconfig.json diff --git a/config-packages/tsconfig/examples.json b/config-packages/tsconfig/examples.json index 20c484b39c5..1e44b46a45f 100644 --- a/config-packages/tsconfig/examples.json +++ b/config-packages/tsconfig/examples.json @@ -53,7 +53,11 @@ ], "@trigger.dev/whatsapp/*": [ "../../integrations/whatsapp/src/*" - ] + ], + "@trigger.dev/typeform": [ + "../../generated-integrations/typeform/src/index" + ], + "@trigger.dev/typeform/*": ["../../generated-integrations/typeform/src/*"] } } } \ No newline at end of file diff --git a/examples/typeform/package.json b/examples/typeform/package.json new file mode 100644 index 00000000000..885d7f5ea13 --- /dev/null +++ b/examples/typeform/package.json @@ -0,0 +1,19 @@ +{ + "private": true, + "name": "@examples/typeform", + "version": "0.0.1", + "description": "Example trigger.dev workflow that uses the Typeform integration", + "dependencies": { + "@trigger.dev/typeform": "workspace:*", + "@trigger.dev/sdk": "workspace:*", + "zod": "^3.20.2" + }, + "devDependencies": { + "@trigger.dev/tsconfig": "workspace:*", + "@types/node": "16", + "tsx": "^3.12.0" + }, + "scripts": { + "dev": "tsx src/index.ts" + } +} diff --git a/examples/typeform/src/index.ts b/examples/typeform/src/index.ts new file mode 100644 index 00000000000..a4d3bd76be1 --- /dev/null +++ b/examples/typeform/src/index.ts @@ -0,0 +1,17 @@ +import { Trigger } from "@trigger.dev/sdk"; +import { events } from "@trigger.dev/typeform"; + +new Trigger({ + id: "typeform-webhook", + name: "Typeform webhook example", + apiKey: "trigger_dev_zC25mKNn6c0q", + endpoint: "ws://localhost:8889/ws", + logLevel: "debug", + on: events.formResponseEvent({ + form_id: "NclFXN1d", + }), + run: async (event, ctx) => { + await ctx.logger.info(`Action was ${event.event_id}`, event.form_response); + return {}; + }, +}).listen(); diff --git a/examples/typeform/tsconfig.json b/examples/typeform/tsconfig.json new file mode 100644 index 00000000000..00ad22f1a85 --- /dev/null +++ b/examples/typeform/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@trigger.dev/tsconfig/examples.json", + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "**/*.test.*"] +} From ebb6002a7e39af8e16138544aae60c81bad99e36 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 16:19:53 +0000 Subject: [PATCH 059/113] =?UTF-8?q?Add=20the=20key=20and=20event=20to=20th?= =?UTF-8?q?e=20external=20source=20when=20it=E2=80=99s=20an=20integration?= =?UTF-8?q?=20webhook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/webapp/app/services/workflows/registerWorkflow.server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/webapp/app/services/workflows/registerWorkflow.server.ts b/apps/webapp/app/services/workflows/registerWorkflow.server.ts index c1d2220d161..2bb29995ce5 100644 --- a/apps/webapp/app/services/workflows/registerWorkflow.server.ts +++ b/apps/webapp/app/services/workflows/registerWorkflow.server.ts @@ -410,13 +410,14 @@ export class RegisterWorkflow { }, create: { organizationId: organization.id, - key: this.#keyForExternalSource(payload), + key: payload.trigger.key, type: "INTEGRATION_WEBHOOK", source: payload.trigger.source ?? {}, status: "CREATED", connectionId: existingConnection?.id, service: payload.trigger.service, manualRegistration: false, + event: payload.trigger.name, }, }); From 303558eb746d7a0fed1ae2c94059c08f28ba9543 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 17:33:44 +0000 Subject: [PATCH 060/113] Turn auth off for the webhook endpoint --- apps/integrations/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/integrations/src/index.ts b/apps/integrations/src/index.ts index 915d8329207..2c5a7b5f10a 100644 --- a/apps/integrations/src/index.ts +++ b/apps/integrations/src/index.ts @@ -38,8 +38,9 @@ const checkAuthentication = function ( res: Response, next: NextFunction ) { - //if the path is /healthcheck, skip authentication - if (req.path === "/healthcheck") { + //if the path is /healthcheck, or /api/v2/webhooks/$id/receive skip authentication + const regex = /api\/v2\/webhooks\/[a-zA-Z0-9_-]+\/receive/g; + if (req.path === "/healthcheck" || regex.test(req.path)) { next(); return; } From 22ceeb5e809e9dce22057221609c6c344498ead1 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 17:33:53 +0000 Subject: [PATCH 061/113] Fix for the webhook url --- apps/integrations/src/core/webhook/subscribe/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/integrations/src/core/webhook/subscribe/utilities.ts b/apps/integrations/src/core/webhook/subscribe/utilities.ts index 1358eeea74d..12ac9bd741a 100644 --- a/apps/integrations/src/core/webhook/subscribe/utilities.ts +++ b/apps/integrations/src/core/webhook/subscribe/utilities.ts @@ -1,3 +1,3 @@ export function webhookUrl(id: string): string { - return `${process.env.WEBHOOKS_ORIGIN}/api/v1/webhooks/${id}/receive`; + return `${process.env.WEBHOOKS_ORIGIN}/api/v2/webhooks/${id}/receive`; } From dba572f81df716ef75f625b65ef602f1c6d40a34 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 17:34:07 +0000 Subject: [PATCH 062/113] Added ngrok for integrations --- scripts/proxy-integrations.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/proxy-integrations.sh diff --git a/scripts/proxy-integrations.sh b/scripts/proxy-integrations.sh new file mode 100755 index 00000000000..126fae234be --- /dev/null +++ b/scripts/proxy-integrations.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +set -e -x + +ngrok http --subdomain=${1:-$NGROK_SUBDOMAIN} --region ${2:-eu} 3006 From 388759314cdc719b5f31dcbeced70fed3ebe0562 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 17:34:16 +0000 Subject: [PATCH 063/113] Updated to a different Typeform id --- examples/typeform/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/typeform/src/index.ts b/examples/typeform/src/index.ts index a4d3bd76be1..149ae798ece 100644 --- a/examples/typeform/src/index.ts +++ b/examples/typeform/src/index.ts @@ -8,7 +8,7 @@ new Trigger({ endpoint: "ws://localhost:8889/ws", logLevel: "debug", on: events.formResponseEvent({ - form_id: "NclFXN1d", + form_id: "KywLXMeB", }), run: async (event, ctx) => { await ctx.logger.info(`Action was ${event.event_id}`, event.form_response); From e26ac4962e6ffe05289f4655799be11447818571 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 17:37:43 +0000 Subject: [PATCH 064/113] Workflows are receiving the new webhooks --- .../app/routes/api/v2/internal/webhooks/$externalSourceId.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts b/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts index c6a52b9795e..ee685f56d60 100644 --- a/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts +++ b/apps/webapp/app/routes/api/v2/internal/webhooks/$externalSourceId.ts @@ -1,4 +1,4 @@ -import type { ActionArgs, LoaderArgs } from "@remix-run/server-runtime"; +import type { ActionArgs } from "@remix-run/server-runtime"; import { z } from "zod"; import { findExternalSourceById } from "~/models/externalSource.server"; import { IngestEvent } from "~/services/events/ingest.server"; @@ -40,7 +40,7 @@ export async function action({ request, params }: ActionArgs) { id, payload, name: event, - type: "WEBHOOK", + type: "INTEGRATION_WEBHOOK", service: externalSource.service, timestamp, context: {}, From ecbcc205a3d840528e8e01f111f3832f8beb5759 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 18:03:33 +0000 Subject: [PATCH 065/113] Created Typeform schema tests and fixed them --- .../typeform/tests/webhooks.test.ts | 845 ++++++++++++++++++ .../integrations/typeform/webhooks/schemas.ts | 31 +- 2 files changed, 865 insertions(+), 11 deletions(-) diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index e1eca0a7aa0..1ae109028b8 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -1,3 +1,4 @@ +import { validate } from "core/schemas/validate"; import { startNock, stopNock } from "testing/nock"; import { describe, expect, test } from "vitest"; import { webhooks, events } from "../webhooks/webhooks"; @@ -450,4 +451,848 @@ describe("typeform.webhooks", async () => { expect(true).toBe(false); } }); + + describe("schemas", async () => { + test("formResponse 1", async () => { + const data = { + event_id: "LtWXD3crgy", + event_type: "form_response", + form_response: { + answers: [ + { + field: { + id: "DlXFaesGBpoF", + type: "long_text", + }, + text: "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", + type: "text", + }, + { + email: "laura@example.com", + field: { + id: "SMEUb7VJz92Q", + type: "email", + }, + type: "email", + }, + { + field: { + id: "JwWggjAKtOkA", + type: "short_text", + }, + text: "Laura", + type: "text", + }, + { + date: "2005-10-15", + field: { + id: "KoJxDM3c6x8h", + type: "date", + }, + type: "date", + }, + { + choices: { + labels: ["London", "Sydney"], + }, + field: { + id: "PNe8ZKBK8C2Q", + type: "picture_choice", + }, + type: "choices", + }, + { + field: { + id: "Q7M2XAwY04dW", + type: "number", + }, + number: 5, + type: "number", + }, + { + boolean: true, + field: { + id: "gFFf3xAkJKsr", + type: "legal", + }, + type: "boolean", + }, + { + choice: { + label: "London", + }, + field: { + id: "k6TP9oLGgHjl", + type: "multiple_choice", + }, + type: "choice", + }, + { + boolean: false, + field: { + id: "RUqkXSeXBXSd", + type: "yes_no", + }, + type: "boolean", + }, + { + field: { + id: "NRsxU591jIW9", + type: "opinion_scale", + }, + number: 2, + type: "number", + }, + { + field: { + id: "WOTdC00F8A3h", + type: "rating", + }, + number: 3, + type: "number", + }, + { + field: { + id: "pn48RmPazVdM", + type: "number", + }, + number: 4, + type: "number", + }, + { + field: { + id: "M5tXK5kG7IeA", + ref: "readable_ref_calendly", + type: "calendly", + }, + type: "url", + url: "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", + }, + ], + calculated: { + score: 9, + }, + definition: { + endings: [ + { + id: "dN5FLyFpCMFo", + properties: { + button_mode: "default_redirect", + button_text: "Create a typeform", + share_icons: true, + show_button: true, + }, + ref: "01GRC8GR2017M6WW347T86VV39", + title: "Bye!", + type: "thankyou_screen", + }, + ], + fields: [ + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "DlXFaesGBpoF", + ref: "readable_ref_long_text", + title: + "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", + type: "long_text", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "SMEUb7VJz92Q", + ref: "readable_ref_email", + title: + "If you're OK with our city management following up if they have further questions, please give us your email address.", + type: "email", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "JwWggjAKtOkA", + ref: "readable_ref_short_text", + title: "What is your first name?", + type: "short_text", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "KoJxDM3c6x8h", + ref: "readable_ref_date", + title: "When did you move to the place where you live?", + type: "date", + }, + { + allow_multiple_selections: true, + allow_other_choice: false, + id: "PNe8ZKBK8C2Q", + ref: "readable_ref_picture_choice", + title: + "Which pictures do you like? You can choose as many as you like.", + type: "picture_choice", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "Q7M2XAwY04dW", + ref: "readable_ref_number1", + title: + "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", + type: "number", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "gFFf3xAkJKsr", + ref: "readable_ref_legal", + title: + "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", + type: "legal", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "k6TP9oLGgHjl", + ref: "readable_ref_multiple_choice", + title: "Which of these cities is your favorite?", + type: "multiple_choice", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "RUqkXSeXBXSd", + ref: "readable_ref_yes_no", + title: "Do you have a favorite city we haven't listed?", + type: "yes_no", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "NRsxU591jIW9", + ref: "readable_ref_opinion_scale", + title: + "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", + type: "opinion_scale", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "WOTdC00F8A3h", + ref: "readable_ref_rating", + title: + "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", + type: "rating", + }, + { + allow_multiple_selections: false, + allow_other_choice: false, + id: "pn48RmPazVdM", + ref: "readable_ref_number2", + title: + "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", + type: "number", + }, + { + id: "M5tXK5kG7IeA", + properties: {}, + ref: "readable_ref_calendly", + title: "Book a time with me", + type: "calendly", + }, + ], + id: "lT4Z3j", + title: "Webhooks example", + }, + ending: { + id: "dN5FLyFpCMFo", + ref: "01GRC8GR2017M6WW347T86VV39", + }, + form_id: "lT4Z3j", + hidden: { + user_id: "abc123456", + }, + landed_at: "2018-01-18T18:07:02Z", + submitted_at: "2018-01-18T18:17:02Z", + token: "a3a12ec67a1365927098a606107fac15", + variables: [ + { + key: "score", + number: 4, + type: "number", + }, + { + key: "name", + text: "typeform", + type: "text", + }, + ], + }, + }; + + const validationResult = await validate(data, events.formResponse.schema); + console.log(validationResult); + expect(validationResult).toEqual({ + success: true, + }); + }); + + test("formResponse 2", async () => { + const data = { + event_id: "01GTSD5R1YKSV4DE4YH0WTHDSJ", + event_type: "form_response", + form_response: { + token: "hphw0h2xjkq50gx81hphwiu6jkh43j6b", + ending: { id: "DefaultTyScreen", ref: "default_tys" }, + answers: [ + { + type: "number", + field: { + id: "w4L7U4WU7USv", + ref: "2c62a515-ef36-438e-a4a4-222a39e2e99e", + type: "nps", + }, + number: 5, + }, + { + text: "fghhfg", + type: "text", + field: { + id: "zU5ISuBXtB56", + ref: "01E0D1GYEQKP759R4NP94X7V1D", + type: "long_text", + }, + }, + { + type: "choice", + field: { + id: "VLghy7KPHsxX", + ref: "01E0D1GYEQSC82ZJHD7NFF072Q", + type: "multiple_choice", + }, + choice: { label: "35 to 44" }, + }, + { + type: "choice", + field: { + id: "AddS20Xg25Qm", + ref: "01E0D1GYEQK8THD0P29B10ADRQ", + type: "dropdown", + }, + choice: { label: "Albania" }, + }, + { + type: "choice", + field: { + id: "HGOZa4w1y0KA", + ref: "01E0D1GYEQD9BB15HQM3GHTP48", + type: "dropdown", + }, + choice: { label: "Airlines / Aviation" }, + }, + { + type: "choice", + field: { + id: "KvMvx4hBtOcV", + ref: "01E0D1GYEQ17BCE98BZPASH3K6", + type: "multiple_choice", + }, + choice: { label: "51 to 200" }, + }, + ], + form_id: "KywLXMeB", + landed_at: "2023-03-05T17:29:54Z", + definition: { + id: "KywLXMeB", + title: "Net Promoter Score® (copy)", + fields: [ + { + id: "w4L7U4WU7USv", + ref: "2c62a515-ef36-438e-a4a4-222a39e2e99e", + type: "nps", + title: + "How likely are you to recommend us to a friend or colleague?", + properties: {}, + }, + { + id: "zU5ISuBXtB56", + ref: "01E0D1GYEQKP759R4NP94X7V1D", + type: "long_text", + title: "Why did you choose ?", + properties: {}, + }, + { + id: "VLghy7KPHsxX", + ref: "01E0D1GYEQSC82ZJHD7NFF072Q", + type: "multiple_choice", + title: "What's your age?", + choices: [ + { id: "SQsDGQMdaGn2", label: "Under 18" }, + { id: "PldS57HPKq31", label: "18 to 24" }, + { id: "h9xZWNI7wyDt", label: "25 to 34" }, + { id: "cgDtmheGvgXA", label: "35 to 44" }, + { id: "Xu9RKmULlXxA", label: "45 to 54" }, + { id: "3xGelJVg6BQ3", label: "55 to 64" }, + { id: "yO8pK25uvTED", label: "65 to 74" }, + { id: "Y4mxwlJH0IsU", label: "75 or older" }, + ], + properties: {}, + }, + { + id: "AddS20Xg25Qm", + ref: "01E0D1GYEQK8THD0P29B10ADRQ", + type: "dropdown", + title: "What's your country of residence?", + choices: [ + { id: "ggpVHxwo5xyY", label: "Afghanistan" }, + { id: "mOP9eVTnIJCC", label: "Albania" }, + { id: "KNOnnKx2exYM", label: "Algeria" }, + { id: "457irbXVMAVL", label: "Andorra" }, + { id: "5GwOYQdjunSR", label: "Angola" }, + { id: "GgfrKlBo3rRE", label: "Antigua and Barbuda" }, + { id: "g6MVZiPUIMdV", label: "Argentina" }, + { id: "snLjlzg7V2FO", label: "Armenia" }, + { id: "OwfIvcYYDQD9", label: "Aruba" }, + { id: "KskA2KLyDNGr", label: "Australia" }, + { id: "wQ4o0wrPUuV6", label: "Austria" }, + { id: "Orp7HpktRv4O", label: "Azerbaijan" }, + { id: "TFP5A8J08YxC", label: "Bahamas" }, + { id: "BK7RXLCdYvlB", label: "Bahrain" }, + { id: "Dtzd0fty095k", label: "Bangladesh" }, + { id: "tbMJa4OHwMpe", label: "Barbados" }, + { id: "AvVzIoDDPVHJ", label: "Belarus" }, + { id: "IAXpsFx2yj09", label: "Belgium" }, + { id: "fF5aHJmR3WS6", label: "Belize" }, + { id: "M45AobghyYUL", label: "Benin" }, + { id: "E66Q0BZ8iqh4", label: "Bhutan" }, + { id: "ua2XJ0Mj0QFi", label: "Bolivia" }, + { id: "a1BvdshzHVuU", label: "Bosnia and Herzegovina" }, + { id: "mOqNmwmDV5bb", label: "Botswana" }, + { id: "Do2TnRVgf1YO", label: "Brazil" }, + { id: "FXfkCxsLSUvU", label: "Brunei" }, + { id: "zsIw5gE2DDUH", label: "Bulgaria" }, + { id: "XoMFygcC8MGc", label: "Burkina Faso" }, + { id: "xPk1ogSDfO4V", label: "Burma" }, + { id: "osLlzk1Zj3B8", label: "Burundi" }, + { id: "dsvh9KcqcwW1", label: "Cambodia" }, + { id: "xC8nBXYLAGRk", label: "Cameroon" }, + { id: "GYfkjM0QJhPx", label: "Canada" }, + { id: "bfcfNu4sGQTJ", label: "Cape Verde" }, + { id: "u5e9EdEoaKOB", label: "Central African Republic" }, + { id: "pA0gp2dLXVnm", label: "Chad" }, + { id: "cldLTkwvMcnv", label: "Chile" }, + { id: "vcS7F8eVdzst", label: "China" }, + { id: "5pyvWuSkh3v6", label: "Colombia" }, + { id: "L1RHnTrgnyFa", label: "Comoros" }, + { + id: "XiO6zcYufsT7", + label: "Democratic Republic of the Congo", + }, + { id: "bZQXYgBHlXkd", label: "Costa Rica" }, + { id: "yv8sBfGnZuNn", label: "Cote d'Ivoire" }, + { id: "QqFHSnlHa1BT", label: "Croatia" }, + { id: "gf5mNngs9Szn", label: "Cuba" }, + { id: "sSQmANHUeCU5", label: "Curacao" }, + { id: "cdySLFXuAqPK", label: "Cyprus" }, + { id: "w9ITvUlq00zk", label: "Czech Republic" }, + { id: "DQXayFU1WOMd", label: "Denmark" }, + { id: "915jWua5Y6UO", label: "Djibouti" }, + { id: "FEOBwmkZh5jR", label: "Dominica" }, + { id: "PbABWSJmsXxp", label: "Dominican Republic" }, + { id: "Sm3isUQqRPU3", label: "East Timor" }, + { id: "KTBj6pfJkUgT", label: "Ecuador" }, + { id: "2kRpeiExhDMg", label: "Egypt" }, + { id: "rkOERPwZUQ6q", label: "El Salvador" }, + { id: "Xyoe3jrO6h7E", label: "Equatorial Guinea" }, + { id: "maJ0pI5bdirI", label: "Eritrea" }, + { id: "X31dYiw25wmD", label: "Estonia" }, + { id: "9pd1nKNrQ0GL", label: "Ethiopia" }, + { id: "DgZs5L5B2Hqi", label: "Fiji" }, + { id: "ZZAvbCBbNAJH", label: "Finland" }, + { id: "IuXU5KZ2VN91", label: "France" }, + { id: "OnZSAKWaJIU8", label: "Gabon" }, + { id: "cmHEGf3NH2sA", label: "Gambia" }, + { id: "xDYXjww9Xtgo", label: "Georgia" }, + { id: "NuBE9QCiSDc2", label: "Germany" }, + { id: "RrIlTGlQRKSE", label: "Ghana" }, + { id: "XqQ1PXOzsJUG", label: "Greece" }, + { id: "RkMh2hl4WXh0", label: "Grenada" }, + { id: "6oQwzPhJrj7R", label: "Guatemala" }, + { id: "5afXBrBpRN0w", label: "Guinea" }, + { id: "qFvl0OVqT5Or", label: "Guinea-Bissau" }, + { id: "3tZqajnmemz0", label: "Guyana" }, + { id: "yhpg38rY1jFJ", label: "Haiti" }, + { id: "0H7Oa3hmtNpW", label: "Holy See" }, + { id: "75OSvjbpTbNV", label: "Honduras" }, + { id: "TaefzvkdvTg4", label: "Hong Kong" }, + { id: "AeMRpGZgcyVG", label: "Hungary" }, + { id: "KBJizGOFHAMl", label: "Iceland" }, + { id: "DIDO3s3yBl8t", label: "India" }, + { id: "EJ8pibBAPXGB", label: "Indonesia" }, + { id: "sOjRUeecgUSF", label: "Iran" }, + { id: "Hur1mJ1bmQAc", label: "Iraq" }, + { id: "X7GjPWpIfA5w", label: "Ireland" }, + { id: "qklzBVYmx3JQ", label: "Israel" }, + { id: "pfKzb57zkhxz", label: "Italy" }, + { id: "PeMKcsNVsE67", label: "Jamaica" }, + { id: "dtLFo2hjuayU", label: "Japan" }, + { id: "M7rMlJaKyepP", label: "Jordan" }, + { id: "5w05kNWyDhSk", label: "Kazakhstan" }, + { id: "jb3Or7SlMrEL", label: "Kenya" }, + { id: "0vGWD1l9eyRC", label: "Kiribati" }, + { id: "hRmyNAMQg7Wx", label: "Kosovo" }, + { id: "EAWjwqRsXpUN", label: "Kuwait" }, + { id: "AKydA2diOPJ9", label: "Kyrgyzstan" }, + { id: "Y3BwdRzjzg4w", label: "Laos" }, + { id: "azcPEY3tw8zB", label: "Latvia" }, + { id: "iaDA1gcwvLok", label: "Lebanon" }, + { id: "99NiMd7U6MNH", label: "Lesotho" }, + { id: "0kvw7ftffYNV", label: "Liberia" }, + { id: "71pMBrCicOjj", label: "Libya" }, + { id: "gzamHsfQuqHJ", label: "Liechtenstein" }, + { id: "wusYAZJ9AOPU", label: "Lithuania" }, + { id: "3TT3T1ctU7cu", label: "Luxembourg" }, + { id: "iKKZEARJNWnH", label: "Macau" }, + { id: "pwYlUwiMDsMn", label: "Macedonia" }, + { id: "SJ4LJtOUhi8T", label: "Madagascar" }, + { id: "0lV7E5J5BjL2", label: "Malawi" }, + { id: "D3hxSqJ3ecGI", label: "Malaysia" }, + { id: "MD9vfEtORl5I", label: "Maldives" }, + { id: "lm0qiEoUyWJQ", label: "Mali" }, + { id: "pY1svv8Wmmik", label: "Malta" }, + { id: "Vyxcknp5FxkZ", label: "Marshall Islands" }, + { id: "Et2OIYo09lFh", label: "Mauritania" }, + { id: "TTFv8wWUGxrL", label: "Mauritius" }, + { id: "V700pfY1WmiR", label: "Mexico" }, + { id: "yOSMmEdLCCuv", label: "Micronesia" }, + { id: "gsu3MFEl8w3Y", label: "Moldova" }, + { id: "cTaKbfzMbd4E", label: "Monaco" }, + { id: "ilsmf1EByAby", label: "Mongolia" }, + { id: "mjyCLTqOBBzD", label: "Montenegro" }, + { id: "45QMORuJSJqs", label: "Morocco" }, + { id: "UPKZfXtHAtL4", label: "Mozambique" }, + { id: "6JGAFZWk2F0c", label: "Namibia" }, + { id: "RAzzAwKCHVWV", label: "Nauru" }, + { id: "VLIdG7FehvOA", label: "Nepal" }, + { id: "nfkjJlekuBL5", label: "Netherlands" }, + { id: "ZX4R5DSFr0JB", label: "Netherlands Antilles" }, + { id: "vD0epxjGd9mx", label: "New Zealand" }, + { id: "MEwOvWXLx3oY", label: "Nicaragua" }, + { id: "L4h3KmLJH7jS", label: "Niger" }, + { id: "jPUbeuiEYe0b", label: "Nigeria" }, + { id: "uPlyhEafOdQp", label: "North Korea" }, + { id: "WFyflJIL33Fj", label: "Norway" }, + { id: "YjjYDLM8FqUF", label: "Oman" }, + { id: "EncJ3TVvCLQv", label: "Pakistan" }, + { id: "vBSEk4bamECF", label: "Palau" }, + { id: "AxxDvya6pDlt", label: "Palestinian Territories" }, + { id: "WCeodSquLgpb", label: "Panama" }, + { id: "ataYnxT13TvK", label: "Papua New Guinea" }, + { id: "J2jKGUzmjf4S", label: "Paraguay" }, + { id: "VcwyY6ff1u7d", label: "Peru" }, + { id: "EVmEBkD5Xix2", label: "Philippines" }, + { id: "iF5y1bW1v8hm", label: "Poland" }, + { id: "v40zNHMaqbr7", label: "Portugal" }, + { id: "VvuFo8NEWwHr", label: "Qatar" }, + { id: "88CwuIlqIV7Y", label: "Romania" }, + { id: "lxh51YkksSoN", label: "Russia" }, + { id: "np8fMzz33Dok", label: "Rwanda" }, + { id: "ZIlLXuzLa5n0", label: "Saint Kitts and Nevis" }, + { id: "PLf7ZfXhuHmh", label: "Saint Lucia" }, + { + id: "H2esyJBCWQ66", + label: "Saint Vincent and the Grenadines", + }, + { id: "e0srYwLU8IsT", label: "Samoa" }, + { id: "dYfyeFXfqgne", label: "San Marino" }, + { id: "y25FmWFP3iVv", label: "Sao Tome and Principe" }, + { id: "NLCwpMSpZmio", label: "Saudi Arabia" }, + { id: "qO9XHeoBSRni", label: "Senegal" }, + { id: "o5zx2a2buPSe", label: "Serbia" }, + { id: "vV3nsJDxtDoU", label: "Seychelles" }, + { id: "LCNpig2cPPRY", label: "Sierra Leone" }, + { id: "eXHNHTIlWwlR", label: "Singapore" }, + { id: "qVlfEHaLx4wk", label: "Sint Maarten" }, + { id: "j1mHj03aq7cA", label: "Slovakia" }, + { id: "0capewNWlzMn", label: "Slovenia" }, + { id: "Eaanmrqauymz", label: "Solomon Islands" }, + { id: "pQfkoAzDEra2", label: "Somalia" }, + { id: "ymlXBNG9kQ45", label: "South Africa" }, + { id: "VZMvFMKde19O", label: "South Korea" }, + { id: "N9x58Op8Y57d", label: "South Sudan" }, + { id: "c5EmR4eZ0wuC", label: "Spain" }, + { id: "piVS3FMOVDKT", label: "Sri Lanka" }, + { id: "epQb60K5Af7c", label: "Sudan" }, + { id: "1vHyzuFIvA8q", label: "Suriname" }, + { id: "GuWeqIDLSFRK", label: "Swaziland" }, + { id: "slJUXW371ZF9", label: "Sweden" }, + { id: "HvFLKGb0BruO", label: "Switzerland" }, + { id: "hMLZFBhUCWbj", label: "Syria" }, + { id: "WlEH0Xc5b6QP", label: "Taiwan" }, + { id: "AjkPdFBfoUrg", label: "Tajikistan" }, + { id: "i14Hxyqtsrwb", label: "Tanzania" }, + { id: "gMzxmmeYfNRs", label: "Thailand" }, + { id: "OAtKqjECvKJi", label: "Togo" }, + { id: "i2pUEWLq2Pg7", label: "Tonga" }, + { id: "u6cZtgnU4bXf", label: "Trinidad and Tobago" }, + { id: "0xUYURCIqgsb", label: "Tunisia" }, + { id: "ciTWM7yCnAJ0", label: "Turkey" }, + { id: "EALLOUAoWToz", label: "Turkmenistan" }, + { id: "0yfWs9vbLJm6", label: "Tuvalu" }, + { id: "Wp47o77MuFlH", label: "Uganda" }, + { id: "1wduuBAdGHpv", label: "Ukraine" }, + { id: "0faSCuoqHr5d", label: "United Arab Emirates" }, + { id: "Xur3acA5TU9L", label: "United Kingdom" }, + { id: "lvQrSWcgW31q", label: "United States of America" }, + { id: "GRfsHMa5nQs2", label: "Uruguay" }, + { id: "Wrkp5dvgu18A", label: "Uzbekistan" }, + { id: "imCoEDqhKcS4", label: "Vanuatu" }, + { id: "aDaPDPlWAsTJ", label: "Venezuela" }, + { id: "qn70yN7yXmng", label: "Vietnam" }, + { id: "hBnBHj91cw6J", label: "Yemen" }, + { id: "gZm8uBgeQ2lN", label: "Zambia" }, + { id: "sABMpOSW32x1", label: "Zimbabwe" }, + ], + properties: {}, + }, + { + id: "HGOZa4w1y0KA", + ref: "01E0D1GYEQD9BB15HQM3GHTP48", + type: "dropdown", + title: "Which industry do you work in?", + choices: [ + { id: "77lPtDHFiOzB", label: "Accounting" }, + { id: "KX8Kme95lkS6", label: "Airlines / Aviation" }, + { + id: "EIyBdznqN1Gw", + label: "Alternative Dispute Resolution", + }, + { id: "e84axRfJwxq8", label: "Alternative Medicine" }, + { id: "5fuLx4qlpNPk", label: "Animation" }, + { id: "1n6J5yJJzcse", label: "Apparel & Fashion" }, + { id: "PnN0H8tdTB80", label: "Architecture & Planning" }, + { id: "D34NLCmd23YZ", label: "Arts & Crafts" }, + { id: "lYITB5VoOIcF", label: "Automotive" }, + { id: "H5NC4pjcbCqV", label: "Aviation & Aerospace" }, + { id: "2gFWS40gDg1A", label: "Banking" }, + { id: "54GpagRojhHs", label: "Biotechnology" }, + { id: "ZwG1VhxHNjst", label: "Broadcast Media" }, + { id: "9pAePnDgsiw1", label: "Building Materials" }, + { + id: "4cnAiFIKDufn", + label: "Business Supplies & Equipment", + }, + { id: "AXEa04WRZI8r", label: "Capital Markets" }, + { id: "XWuVYl07gv3O", label: "Chemicals" }, + { id: "bEwdkJHDML1x", label: "Civic & Social Organization" }, + { id: "M7kxd79NpPo9", label: "Civil Engineering" }, + { id: "YJl3aVWCQjiN", label: "Commercial Real Estate" }, + { id: "pkvJ75nOYtez", label: "Computer & Network Security" }, + { id: "j0oQIfxom25I", label: "Computer Games" }, + { id: "s9gvhKjKl7NF", label: "Computer Hardware" }, + { id: "NMTGWsKzo4gm", label: "Computer Networking" }, + { id: "6WmYi5g83Kvx", label: "Computer Software" }, + { id: "MDRi2eq5efa6", label: "Construction" }, + { id: "7GjU5OcS2aD3", label: "Consumer Electronics" }, + { id: "jOvy0iZ8LH1l", label: "Consumer Goods" }, + { id: "XSyoiJHLzQvS", label: "Consumer Services" }, + { id: "6bNIAAJGHpa1", label: "Cosmetics" }, + { id: "gEUe3ZwU4uZH", label: "Dairy" }, + { id: "615eY7EoT3OG", label: "Defense & Space" }, + { id: "vX4yklDQXKYd", label: "Design" }, + { id: "3XMkqTwR010U", label: "Education Management" }, + { id: "tUqTNp80txlK", label: "E-Learning" }, + { + id: "WbKX6hdmikja", + label: "Electrical / Electronic Manufacturing", + }, + { id: "kWq8zLpPXGWr", label: "Entertainment" }, + { id: "3zdElcaTLqmO", label: "Environmental Services" }, + { id: "OncO5lcBVRQZ", label: "Events Services" }, + { id: "Glob2ZFgGlqI", label: "Executive Office" }, + { id: "Xm0uvRO2LaCV", label: "Facilities Services" }, + { id: "Ol75oYMO79Iv", label: "Farming" }, + { id: "UO6ohgvOipmx", label: "Financial Services" }, + { id: "TimuH2bxqtxR", label: "Fine Art" }, + { id: "2C8avtFKfKgZ", label: "Fishery" }, + { id: "YfFbdsRqFfAy", label: "Food & Beverages" }, + { id: "DfeP1p9yQK8J", label: "Food Production" }, + { id: "ZGUWXE62lOvf", label: "Fund-Raising" }, + { id: "X1ZMol7KUWiT", label: "Furniture" }, + { id: "Ke7yN9v817OJ", label: "Gambling & Casinos" }, + { id: "TWr7lQ63TtqR", label: "Glass, Ceramics & Concrete" }, + { id: "s5KwhlZXQZ5U", label: "Government Administration" }, + { id: "BgwNUDeFX5dl", label: "Government Relations" }, + { id: "Y0DwYfctqkox", label: "Graphic Design" }, + { id: "mqX4N97ZzYGp", label: "Health, Wellness & Fitness" }, + { id: "ojcG3WKf9av0", label: "Higher Education" }, + { id: "0iPTcSwStPZR", label: "Hospital & Health Care" }, + { id: "JsRJNwBz3lLr", label: "Hospitality" }, + { id: "D1UM3Rf5qKUv", label: "Human Resources" }, + { id: "YDIlUGJwrCsV", label: "Import & Export" }, + { id: "BkvHblIr6YuV", label: "Individual & Family Services" }, + { id: "NVqagPACTmu4", label: "Industrial Automation" }, + { id: "f3knBiVcAXSe", label: "Information Services" }, + { + id: "D3Aoe6Aurir2", + label: "Information Technology & Services", + }, + { id: "Gc5Epj3X6KA7", label: "Insurance" }, + { id: "grB5kmdsQYq0", label: "International Affairs" }, + { + id: "YTGDn3WbKltc", + label: "International Trade & Development", + }, + { id: "Dw9bWINQWTaP", label: "Internet" }, + { id: "e18g5yqMuBej", label: "Investment Banking" }, + { id: "hS3hgRf2YQPi", label: "Investment Management" }, + { id: "LlZWE1u749ZK", label: "Judiciary" }, + { id: "jsH5mWxEAhtK", label: "Law Enforcement" }, + { id: "iLqzLB8ZRgzA", label: "Law Practice" }, + { id: "1TVvDiHJCaIj", label: "Legal Services" }, + { id: "X4p2nuvWW8N6", label: "Legislative Office" }, + { id: "PWMMKGTwJoRw", label: "Leisure, Travel & Tourism" }, + { id: "89gZFc6LHyZ5", label: "Libraries" }, + { id: "WkHt2RG6Jl3X", label: "Logistics & Supply Chain" }, + { id: "hBFJmaZswc9n", label: "Luxury Goods & Jewelry" }, + { id: "hjCMl5N8afHM", label: "Machinery" }, + { id: "VbV1uW52jmny", label: "Management Consulting" }, + { id: "xhlgTG3dYPMb", label: "Maritime" }, + { id: "16vkJZrkXlca", label: "Market Research" }, + { id: "qZGO9vzmNPq2", label: "Marketing & Advertising" }, + { + id: "rHm0Nt3uZl7F", + label: "Mechanical or Industrial Engineering", + }, + { id: "OwP4JeBr0j0G", label: "Media Production" }, + { id: "miMRHxk0l959", label: "Medical Devices" }, + { id: "Hhn53Eclnas6", label: "Medical Practice" }, + { id: "BMagEysbHmMK", label: "Mental Health Care" }, + { id: "u7lU7MTxsunj", label: "Military" }, + { id: "WfRuLtRj7BKP", label: "Mining & Metals" }, + { id: "tc01goGeJFVW", label: "Motion Pictures & Film" }, + { id: "bBYBSyukCAFY", label: "Museums & Institutions" }, + { id: "6yR1VeBfFhEh", label: "Music" }, + { id: "fuoMnv0V0nMT", label: "Nanotechnology" }, + { id: "rDcUbjtUm5yv", label: "Newspapers" }, + { + id: "aHKguzWt7l0K", + label: "Non-Profit Organization Management", + }, + { id: "t3ZEhGezG7Z3", label: "Oil & Energy" }, + { id: "WcbW8j48MxMT", label: "Online Media" }, + { id: "Tpdw3tCpKAsK", label: "Outsourcing / Offshoring" }, + { id: "5fBlSGSpjVEo", label: "Package / Freight Delivery" }, + { id: "uQNe1hNahQCB", label: "Packaging & Containers" }, + { id: "lIFZqYG6cUxq", label: "Paper & Forest Products" }, + { id: "TUboFmLiI4fV", label: "Performing Arts" }, + { id: "uxvAp7acAWCK", label: "Pharmaceuticals" }, + { id: "0IZadLrSljxJ", label: "Philanthropy" }, + { id: "J3xo4a1qXYIx", label: "Photography" }, + { id: "Vqsx9VF52ZOh", label: "Plastics" }, + { id: "A7vMqTFmkSKF", label: "Political Organization" }, + { + id: "tfnLrZhqcvoW", + label: "Primary / Secondary Education", + }, + { id: "SDnZiz1dQXuz", label: "Printing" }, + { + id: "TtfgJ7RpkdHu", + label: "Professional Training & Coaching", + }, + { id: "k5SJTP7RmrNh", label: "Program Development" }, + { id: "X63sl3HMjPyj", label: "Public Policy" }, + { + id: "5GrlMfOFNzS2", + label: "Public Relations & Communications", + }, + { id: "ZOBYjPzQhqoR", label: "Public Safety" }, + { id: "To7iwxoFrHt2", label: "Publishing" }, + { id: "rrsI1xfb0KAA", label: "Railroad Manufacture" }, + { id: "7fOAZo2pinlk", label: "Ranching" }, + { id: "LVLKDGbCYEBG", label: "Real Estate" }, + { + id: "3qSlgYAnDkrA", + label: "Recreational Facilities & Services", + }, + { id: "jpTqr5Nkura9", label: "Religious Institutions" }, + { id: "jI33Ui8fMR5O", label: "Renewables & Environment" }, + { id: "F1JLKQA8txk0", label: "Research" }, + { id: "mCegzlG9vO6i", label: "Restaurants" }, + { id: "zO2BvtMerVjf", label: "Retail" }, + { id: "ofW7YoOUSrCC", label: "Security & Investigations" }, + { id: "4Haufz0JrTDE", label: "Semiconductors" }, + { id: "N736YR9XCjmr", label: "Shipbuilding" }, + { id: "rT2McpSoy9xW", label: "Sporting Goods" }, + { id: "eUUVflIOrpq8", label: "Sports" }, + { id: "rlOHaqkctWFN", label: "Staffing & Recruiting" }, + { id: "EJa1VQzU6JYe", label: "Supermarkets" }, + { id: "JcU4vLD0iwFZ", label: "Telecommunications" }, + { id: "Bwf7wu42B9K6", label: "Textiles" }, + { id: "NoNKVyUKPoDy", label: "Think Tanks" }, + { id: "YpkOGvOfOYzT", label: "Tobacco" }, + { id: "B3HgG19r8Gnm", label: "Translation & Localization" }, + { + id: "LGKGVHIqZdzl", + label: "Transportation / Trucking / Railroad", + }, + { id: "QYKm7bOiYdpM", label: "Utilities" }, + { + id: "lyFfiqHrW6sM", + label: "Venture Capital & Private Equity", + }, + { id: "l54TIxHhz7KG", label: "Veterinary" }, + { id: "UN9mqjfN48EA", label: "Warehousing" }, + { id: "3Ev9drZtCCqr", label: "Wholesale" }, + { id: "K90mh5ZHv2Tn", label: "Wine & Spirits" }, + { id: "Oxp0WyLxlufQ", label: "Wireless" }, + { id: "UjXQa2oSLSz4", label: "Writing & Editing" }, + ], + properties: {}, + }, + { + id: "KvMvx4hBtOcV", + ref: "01E0D1GYEQ17BCE98BZPASH3K6", + type: "multiple_choice", + title: "How many employees does your organization have?", + choices: [ + { id: "Z6TiX8WFahlL", label: "It's just me :)" }, + { id: "lJahxmsyIRN4", label: "2 to 10" }, + { id: "PzrS0m4d6kUb", label: "11 to 50" }, + { id: "FC2uIYYNxVT9", label: "51 to 200" }, + { id: "z15fSBWwILmr", label: "500 or more" }, + ], + properties: {}, + }, + ], + endings: [ + { + id: "DefaultTyScreen", + ref: "default_tys", + type: "thankyou_screen", + title: + "Thanks for completing this typeform\nNow *create your own* — it's free, easy, & beautiful", + attachment: { + href: "https://images.typeform.com/images/2dpnUBBkz2VN", + type: "image", + }, + properties: { + button_mode: "default_redirect", + button_text: "Create a *typeform*", + share_icons: false, + show_button: true, + }, + }, + ], + }, + submitted_at: "2023-03-05T17:30:09Z", + }, + }; + + const validationResult = await validate(data, events.formResponse.schema); + console.log(validationResult); + expect(validationResult).toEqual({ + success: true, + }); + }); + }); }); diff --git a/apps/integrations/src/integrations/typeform/webhooks/schemas.ts b/apps/integrations/src/integrations/typeform/webhooks/schemas.ts index 1ecc9458996..1f2a4cedf4f 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/schemas.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/schemas.ts @@ -11,11 +11,12 @@ import { //https://www.typeform.com/developers/webhooks/example-payload/ function makeAnswerField(types: string[]) { - let typeField = makeStringSchema("type", `The type of the field`, { - const: types[0], - }); - - if (types.length > 1) { + let typeField = makeStringSchema("type", `The type of the field`); + if (types.length === 1) { + typeField = makeStringSchema("type", `The type of the field`, { + const: types[0], + }); + } else if (types.length > 1) { typeField = makeStringSchema("type", `The type of the field`, { enum: types, }); @@ -129,7 +130,7 @@ const NumberAnswer = makeObjectSchema("number answer", { const: "number", }), number: makeNumberSchema("number", `The value of the answer`), - field: makeAnswerField(["rating", "opinion_scale", "number"]), + field: makeAnswerField([]), }, }); @@ -214,8 +215,10 @@ export const formEventSchema = makeObjectSchema("form_response", { "ref", "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." ), - allow_multiple_selectiors: makeBooleanSchema( - "allow_multiple_selectiors", + }, + optionalProperties: { + allow_multiple_selections: makeBooleanSchema( + "allow_multiple_selections", "Whether or not the field allows multiple selections" ), allow_other_choice: makeBooleanSchema( @@ -256,7 +259,7 @@ export const formEventSchema = makeObjectSchema("form_response", { ), }, }), - answers: makeArraySchema("answers", makeOneOf("answer", [Answers])), + answers: makeArraySchema("answers", makeOneOf("answer", Answers)), ending: makeObjectSchema("ending", { requiredProperties: { id: makeStringSchema("id", `The ID of the ending`), @@ -282,7 +285,10 @@ export const formEventSchema = makeObjectSchema("form_response", { makeOneOf("variable", [ makeObjectSchema("number variable", { requiredProperties: { - id: makeStringSchema("id", `The ID of the variable`), + key: makeStringSchema( + "key", + `The unique identifier for the variable` + ), type: makeStringSchema("type", `The type of the variable`, { const: "text", }), @@ -291,7 +297,10 @@ export const formEventSchema = makeObjectSchema("form_response", { }), makeObjectSchema("number variable", { requiredProperties: { - id: makeStringSchema("id", `The ID of the variable`), + key: makeStringSchema( + "key", + `The unique identifier for the variable` + ), type: makeStringSchema("type", `The type of the variable`, { const: "number", }), From befa80fe95cddd209fd4c1f62b93e9d4fecb6b2c Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 5 Mar 2023 18:03:40 +0000 Subject: [PATCH 066/113] New generated Typeform SDK --- .../typeform/docs/form-response-event.mdx | 179 ++- .../typeform/schema-optimized.json | 1116 ++++++++--------- generated-integrations/typeform/src/index.ts | 21 +- generated-integrations/typeform/src/types.ts | 391 +++++- 4 files changed, 1103 insertions(+), 604 deletions(-) diff --git a/generated-integrations/typeform/docs/form-response-event.mdx b/generated-integrations/typeform/docs/form-response-event.mdx index 2554986e007..d86573ef83b 100644 --- a/generated-integrations/typeform/docs/form-response-event.mdx +++ b/generated-integrations/typeform/docs/form-response-event.mdx @@ -51,13 +51,13 @@ description: A form response was submitted The type of the field A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. - + Whether or not the field allows multiple selections - + Whether or not the field allows an 'other' choice - + Choices - + Choice The label of the choice @@ -77,12 +77,169 @@ description: A form response was submitted The type of the ending Answers - + Answer *Please note that this object is one of the following possible types* - - + + Text answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Choice answer + + The type of the answer + + Choice + + The label of the choice + + What the user typed in to the "other" field + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Choices answer + + The type of the answer + + Choices + + Labels + + The label of the choice + + What the user typed in to the "other" field + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Email answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Date answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Boolean answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Url answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Number answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + File url answer + + The type of the answer + + The value of the answer + + Field + + The ID of the field + + The type of the field + + The ref of the field + + Payment answer + + The type of the answer + + Payment + + The amount of the payment + + The last 4 digits of the card + + The name of the credit card + + Whether the payment succeeded + + Field + + The ID of the field + + The type of the field + + The ref of the field + Ending The ID of the ending @@ -100,16 +257,16 @@ description: A form response was submitted *Please note that this object is one of the following possible types* Number variable - - The ID of the variable + + The unique identifier for the variable The type of the variable The value of the variable Number variable - - The ID of the variable + + The unique identifier for the variable The type of the variable diff --git a/generated-integrations/typeform/schema-optimized.json b/generated-integrations/typeform/schema-optimized.json index 411a81992be..a9de73056a5 100644 --- a/generated-integrations/typeform/schema-optimized.json +++ b/generated-integrations/typeform/schema-optimized.json @@ -57,10 +57,10 @@ "type": "object", "title": "number variable", "properties": { - "id": { + "key": { "type": "string", - "title": "id", - "description": "The ID of the variable" + "title": "key", + "description": "The unique identifier for the variable" }, "type": { "type": "string", @@ -75,7 +75,7 @@ } }, "required": [ - "id", + "key", "type", "text" ] @@ -84,10 +84,10 @@ "type": "object", "title": "number variable", "properties": { - "id": { + "key": { "type": "string", - "title": "id", - "description": "The ID of the variable" + "title": "key", + "description": "The unique identifier for the variable" }, "type": { "type": "string", @@ -102,7 +102,7 @@ } }, "required": [ - "id", + "key", "type", "number" ] @@ -193,28 +193,8 @@ "type": "object", "title": "field", "properties": { - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "title": { - "type": "string", - "title": "title", - "description": "The title of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field" - }, - "ref": { - "type": "string", - "title": "ref", - "description": "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." - }, - "allow_multiple_selectiors": { - "title": "allow_multiple_selectiors", + "allow_multiple_selections": { + "title": "allow_multiple_selections", "type": "boolean", "description": "Whether or not the field allows multiple selections" }, @@ -246,16 +226,33 @@ "id" ] } + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "title": { + "type": "string", + "title": "title", + "description": "The title of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field" + }, + "ref": { + "type": "string", + "title": "ref", + "description": "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." } }, "required": [ "id", "title", "type", - "ref", - "allow_multiple_selectiors", - "allow_other_choice", - "choices" + "ref" ] } } @@ -272,565 +269,558 @@ "items": { "title": "answer", "oneOf": [ - [ - { - "type": "object", - "title": "text answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "text" - }, - "text": { - "type": "string", - "title": "text", - "description": "The value of the answer" + { + "type": "object", + "title": "text answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "text" + }, + "text": { + "type": "string", + "title": "text", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "short_text", + "long_text" + ] + } }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "enum": [ - "short_text", - "long_text" - ] - } + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "text", + "field" + ] + }, + { + "type": "object", + "title": "choice answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "choice" + }, + "choice": { + "type": "object", + "title": "choice", + "properties": { + "label": { + "type": "string", + "title": "label", + "description": "The label of the choice" }, - "required": [ - "id", - "type" - ] + "other": { + "type": "string", + "title": "label", + "description": "What the user typed in to the \"other\" field" + } } }, - "required": [ - "type", - "text", - "field" - ] - }, - { - "type": "object", - "title": "choice answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "choice" + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "picture_choice", + "dropdown", + "multiple_choice" + ] + } }, - "choice": { - "type": "object", - "title": "choice", - "properties": { - "label": { + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "choice", + "field" + ] + }, + { + "type": "object", + "title": "choices answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "choices" + }, + "choices": { + "type": "object", + "title": "choices", + "properties": { + "other": { + "type": "string", + "title": "label", + "description": "What the user typed in to the \"other\" field" + }, + "labels": { + "type": "array", + "title": "labels", + "items": { "type": "string", "title": "label", "description": "The label of the choice" - }, - "other": { - "type": "string", - "title": "label", - "description": "What the user typed in to the \"other\" field" } } }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "enum": [ - "picture_choice", - "dropdown", - "multiple_choice" - ] - } - }, - "required": [ - "id", - "type" - ] - } + "required": [ + "labels" + ] }, - "required": [ - "type", - "choice", - "field" - ] - }, - { - "type": "object", - "title": "choices answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "choices" - }, - "choices": { - "type": "object", - "title": "choices", - "properties": { - "other": { - "type": "string", - "title": "label", - "description": "What the user typed in to the \"other\" field" - }, - "labels": { - "type": "array", - "title": "labels", - "items": { - "type": "string", - "title": "label", - "description": "The label of the choice" - } - } + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" }, - "required": [ - "labels" - ] - }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "enum": [ - "picture_choice", - "dropdown", - "multiple_choice" - ] - } + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" }, - "required": [ - "id", - "type" - ] - } - }, - "required": [ - "type", - "choices", - "field" - ] - }, - { - "type": "object", - "title": "email answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "email" - }, - "email": { - "type": "string", - "title": "email", - "description": "The value of the answer" + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "picture_choice", + "dropdown", + "multiple_choice" + ] + } }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "const": "email" - } - }, - "required": [ - "id", - "type" - ] - } - }, - "required": [ - "type", - "email", - "field" - ] + "required": [ + "id", + "type" + ] + } }, - { - "type": "object", - "title": "date answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "date" - }, - "date": { - "type": "string", - "title": "date", - "description": "The value of the answer" - }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "const": "date" - } - }, - "required": [ - "id", - "type" - ] - } + "required": [ + "type", + "choices", + "field" + ] + }, + { + "type": "object", + "title": "email answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "email" }, - "required": [ - "type", - "date", - "field" - ] - }, - { - "type": "object", - "title": "boolean answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "boolean" - }, - "boolean": { - "title": "boolean", - "type": "boolean", - "description": "The value of the answer" - }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "enum": [ - "legal", - "yes_no" - ] - } - }, - "required": [ - "id", - "type" - ] - } + "email": { + "type": "string", + "title": "email", + "description": "The value of the answer" }, - "required": [ - "type", - "boolean", - "field" - ] - }, - { - "type": "object", - "title": "url answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "url" - }, - "url": { - "type": "string", - "title": "url", - "description": "The value of the answer" - }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "enum": [ - "website", - "calendly" - ] - } + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" }, - "required": [ - "id", - "type" - ] - } - }, - "required": [ - "type", - "url", - "field" - ] - }, - { - "type": "object", - "title": "number answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "number" - }, - "number": { - "type": "number", - "title": "number", - "description": "The value of the answer" - }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "enum": [ - "rating", - "opinion_scale", - "number" - ] - } + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" }, - "required": [ - "id", - "type" - ] - } - }, - "required": [ - "type", - "number", - "field" - ] - }, - { - "type": "object", - "title": "file url answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "file_url" + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "email" + } }, - "file_url": { - "type": "string", - "title": "file_url", - "description": "The value of the answer" + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "email", + "field" + ] + }, + { + "type": "object", + "title": "date answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "date" + }, + "date": { + "type": "string", + "title": "date", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "date" + } }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "const": "file_upload" - } + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "date", + "field" + ] + }, + { + "type": "object", + "title": "boolean answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "boolean" + }, + "boolean": { + "title": "boolean", + "type": "boolean", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" }, - "required": [ - "id", - "type" - ] - } + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "legal", + "yes_no" + ] + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "boolean", + "field" + ] + }, + { + "type": "object", + "title": "url answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "url" + }, + "url": { + "type": "string", + "title": "url", + "description": "The value of the answer" }, - "required": [ - "type", - "file_url", - "field" - ] + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "enum": [ + "website", + "calendly" + ] + } + }, + "required": [ + "id", + "type" + ] + } }, - { - "type": "object", - "title": "payment answer", - "properties": { - "type": { - "type": "string", - "title": "type", - "description": "The type of the answer", - "const": "payment" + "required": [ + "type", + "url", + "field" + ] + }, + { + "type": "object", + "title": "number answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "number" + }, + "number": { + "type": "number", + "title": "number", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field" + } }, - "payment": { - "type": "object", - "title": "payment", - "properties": { - "amount": { - "type": "number", - "title": "amount", - "description": "The amount of the payment" - }, - "last4": { - "type": "string", - "title": "last4", - "description": "The last 4 digits of the card" - }, - "name": { - "type": "string", - "title": "name", - "description": "The name of the credit card" - }, - "success": { - "title": "success", - "type": "boolean", - "description": "Whether the payment succeeded" - } + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "number", + "field" + ] + }, + { + "type": "object", + "title": "file url answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "file_url" + }, + "file_url": { + "type": "string", + "title": "file_url", + "description": "The value of the answer" + }, + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" }, - "required": [ - "amount", - "last4", - "name", - "success" - ] + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "file_upload" + } }, - "field": { - "type": "object", - "title": "field", - "properties": { - "ref": { - "type": "string", - "title": "ref", - "description": "The ref of the field" - }, - "id": { - "type": "string", - "title": "id", - "description": "The ID of the field" - }, - "type": { - "type": "string", - "title": "type", - "description": "The type of the field", - "const": "payment" - } + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "file_url", + "field" + ] + }, + { + "type": "object", + "title": "payment answer", + "properties": { + "type": { + "type": "string", + "title": "type", + "description": "The type of the answer", + "const": "payment" + }, + "payment": { + "type": "object", + "title": "payment", + "properties": { + "amount": { + "type": "number", + "title": "amount", + "description": "The amount of the payment" }, - "required": [ - "id", - "type" - ] - } + "last4": { + "type": "string", + "title": "last4", + "description": "The last 4 digits of the card" + }, + "name": { + "type": "string", + "title": "name", + "description": "The name of the credit card" + }, + "success": { + "title": "success", + "type": "boolean", + "description": "Whether the payment succeeded" + } + }, + "required": [ + "amount", + "last4", + "name", + "success" + ] }, - "required": [ - "type", - "payment", - "field" - ] - } - ] + "field": { + "type": "object", + "title": "field", + "properties": { + "ref": { + "type": "string", + "title": "ref", + "description": "The ref of the field" + }, + "id": { + "type": "string", + "title": "id", + "description": "The ID of the field" + }, + "type": { + "type": "string", + "title": "type", + "description": "The type of the field", + "const": "payment" + } + }, + "required": [ + "id", + "type" + ] + } + }, + "required": [ + "type", + "payment", + "field" + ] + } ] } }, diff --git a/generated-integrations/typeform/src/index.ts b/generated-integrations/typeform/src/index.ts index 41413d387f7..2a59881fc21 100644 --- a/generated-integrations/typeform/src/index.ts +++ b/generated-integrations/typeform/src/index.ts @@ -6,7 +6,7 @@ import { FormResponseInput, FormResponseOutput, Prettify } from "./types"; const formResponseEventSchema = z.object({ "event_id": z.string().describe("The ID of the event that triggered this webhook"), "event_type": z.literal("form_response").describe("The type of event, always \"form_response\""), "form_response": z.object({ "calculated": z.object({ "score": z.number().describe("The score of the response, if the form has a score field") }).optional(), "variables": z.array(z.any().superRefine((x, ctx) => { - const schemas = [z.object({ "id": z.string().describe("The ID of the variable"), "type": z.literal("text").describe("The type of the variable"), "text": z.string().describe("The value of the variable") }), z.object({ "id": z.string().describe("The ID of the variable"), "type": z.literal("number").describe("The type of the variable"), "number": z.number().describe("The value of the variable") })]; + const schemas = [z.object({ "key": z.string().describe("The unique identifier for the variable"), "type": z.literal("text").describe("The type of the variable"), "text": z.string().describe("The value of the variable") }), z.object({ "key": z.string().describe("The unique identifier for the variable"), "type": z.literal("number").describe("The type of the variable"), "number": z.number().describe("The value of the variable") })]; const errors = schemas.reduce( (errors: z.ZodError[], schema) => ((result) => ("error" in result ? [...errors, result.error] : errors))( @@ -22,7 +22,24 @@ const formResponseEventSchema = z.object({ message: "Invalid input: Should pass single schema", }); } - })).optional(), "hidden": z.record(z.any()).optional(), "form_id": z.string().describe("The ID of the form that was submitted"), "token": z.string().describe("The unique token for this response"), "submitted_at": z.string().describe("The date and time the response was submitted"), "landed_at": z.string().describe("The date and time the respondent landed on the form"), "definition": z.object({ "endings": z.array(z.object({ "id": z.string().describe("The ID of the ending"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to."), "title": z.string().describe("The title of the ending"), "type": z.string().describe("The type of the ending") }).catchall(z.any())).optional(), "id": z.string().describe("The ID of the form"), "title": z.string().describe("The title of the form"), "fields": z.array(z.object({ "id": z.string().describe("The ID of the field"), "title": z.string().describe("The title of the field"), "type": z.string().describe("The type of the field"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to."), "allow_multiple_selectiors": z.boolean().describe("Whether or not the field allows multiple selections"), "allow_other_choice": z.boolean().describe("Whether or not the field allows an 'other' choice"), "choices": z.array(z.object({ "label": z.string().describe("The label of the choice"), "id": z.string().describe("The ID of the choice") })) })) }), "answers": z.array(z.any()), "ending": z.object({ "id": z.string().describe("The ID of the ending"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to.") }).catchall(z.any()) + })).optional(), "hidden": z.record(z.any()).optional(), "form_id": z.string().describe("The ID of the form that was submitted"), "token": z.string().describe("The unique token for this response"), "submitted_at": z.string().describe("The date and time the response was submitted"), "landed_at": z.string().describe("The date and time the respondent landed on the form"), "definition": z.object({ "endings": z.array(z.object({ "id": z.string().describe("The ID of the ending"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to."), "title": z.string().describe("The title of the ending"), "type": z.string().describe("The type of the ending") }).catchall(z.any())).optional(), "id": z.string().describe("The ID of the form"), "title": z.string().describe("The title of the form"), "fields": z.array(z.object({ "allow_multiple_selections": z.boolean().describe("Whether or not the field allows multiple selections").optional(), "allow_other_choice": z.boolean().describe("Whether or not the field allows an 'other' choice").optional(), "choices": z.array(z.object({ "label": z.string().describe("The label of the choice"), "id": z.string().describe("The ID of the choice") })).optional(), "id": z.string().describe("The ID of the field"), "title": z.string().describe("The title of the field"), "type": z.string().describe("The type of the field"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to.") })) }), "answers": z.array(z.any().superRefine((x, ctx) => { + const schemas = [z.object({ "type": z.literal("text").describe("The type of the answer"), "text": z.string().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.enum(["short_text", "long_text"]).describe("The type of the field") }) }), z.object({ "type": z.literal("choice").describe("The type of the answer"), "choice": z.object({ "label": z.string().describe("The label of the choice").optional(), "other": z.string().describe("What the user typed in to the \"other\" field").optional() }), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.enum(["picture_choice", "dropdown", "multiple_choice"]).describe("The type of the field") }) }), z.object({ "type": z.literal("choices").describe("The type of the answer"), "choices": z.object({ "other": z.string().describe("What the user typed in to the \"other\" field").optional(), "labels": z.array(z.string().describe("The label of the choice")) }), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.enum(["picture_choice", "dropdown", "multiple_choice"]).describe("The type of the field") }) }), z.object({ "type": z.literal("email").describe("The type of the answer"), "email": z.string().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.literal("email").describe("The type of the field") }) }), z.object({ "type": z.literal("date").describe("The type of the answer"), "date": z.string().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.literal("date").describe("The type of the field") }) }), z.object({ "type": z.literal("boolean").describe("The type of the answer"), "boolean": z.boolean().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.enum(["legal", "yes_no"]).describe("The type of the field") }) }), z.object({ "type": z.literal("url").describe("The type of the answer"), "url": z.string().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.enum(["website", "calendly"]).describe("The type of the field") }) }), z.object({ "type": z.literal("number").describe("The type of the answer"), "number": z.number().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.string().describe("The type of the field") }) }), z.object({ "type": z.literal("file_url").describe("The type of the answer"), "file_url": z.string().describe("The value of the answer"), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.literal("file_upload").describe("The type of the field") }) }), z.object({ "type": z.literal("payment").describe("The type of the answer"), "payment": z.object({ "amount": z.number().describe("The amount of the payment"), "last4": z.string().describe("The last 4 digits of the card"), "name": z.string().describe("The name of the credit card"), "success": z.boolean().describe("Whether the payment succeeded") }), "field": z.object({ "ref": z.string().describe("The ref of the field").optional(), "id": z.string().describe("The ID of the field"), "type": z.literal("payment").describe("The type of the field") }) })]; + const errors = schemas.reduce( + (errors: z.ZodError[], schema) => + ((result) => ("error" in result ? [...errors, result.error] : errors))( + schema.safeParse(x) + ), + [] + ); + if (schemas.length - errors.length !== 1) { + ctx.addIssue({ + path: ctx.path, + code: "invalid_union", + unionErrors: errors, + message: "Invalid input: Should pass single schema", + }); + } + })), "ending": z.object({ "id": z.string().describe("The ID of the ending"), "ref": z.string().describe("A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to.") }).catchall(z.any()) }) }) diff --git a/generated-integrations/typeform/src/types.ts b/generated-integrations/typeform/src/types.ts index 6715d48e883..b232ab4f90a 100644 --- a/generated-integrations/typeform/src/types.ts +++ b/generated-integrations/typeform/src/types.ts @@ -14,9 +14,9 @@ export type EventType = "form_response" export type Score = number export type Variable = (NumberVariable | NumberVariable1) /** - * The ID of the variable + * The unique identifier for the variable */ -export type Id = string +export type Key = string /** * The type of the variable */ @@ -26,9 +26,9 @@ export type Type = "text" */ export type Text = string /** - * The ID of the variable + * The unique identifier for the variable */ -export type Id1 = string +export type Key1 = string /** * The type of the variable */ @@ -57,7 +57,7 @@ export type LandedAt = string /** * The ID of the ending */ -export type Id2 = string +export type Id = string /** * A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. */ @@ -74,15 +74,32 @@ export type Endings = Ending[] /** * The ID of the form */ -export type Id3 = string +export type Id1 = string /** * The title of the form */ export type Title1 = string +/** + * Whether or not the field allows multiple selections + */ +export type AllowMultipleSelections = boolean +/** + * Whether or not the field allows an 'other' choice + */ +export type AllowOtherChoice = boolean +/** + * The label of the choice + */ +export type Label = string +/** + * The ID of the choice + */ +export type Id2 = string +export type Choices = Choice[] /** * The ID of the field */ -export type Id4 = string +export type Id3 = string /** * The title of the field */ @@ -95,34 +112,238 @@ export type Type3 = string * A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. */ export type Ref1 = string +export type Fields = Field[] +export type Answer = (TextAnswer | ChoiceAnswer | ChoicesAnswer | EmailAnswer | DateAnswer | BooleanAnswer | UrlAnswer | NumberAnswer | FileUrlAnswer | PaymentAnswer) /** - * Whether or not the field allows multiple selections + * The type of the answer */ -export type AllowMultipleSelectiors = boolean +export type Type4 = "text" /** - * Whether or not the field allows an 'other' choice + * The value of the answer */ -export type AllowOtherChoice = boolean +export type Text1 = string +/** + * The ref of the field + */ +export type Ref2 = string +/** + * The ID of the field + */ +export type Id4 = string +/** + * The type of the field + */ +export type Type5 = ("short_text" | "long_text") +/** + * The type of the answer + */ +export type Type6 = "choice" /** * The label of the choice */ -export type Label = string +export type Label1 = string /** - * The ID of the choice + * What the user typed in to the "other" field + */ +export type Label2 = string +/** + * The ref of the field + */ +export type Ref3 = string +/** + * The ID of the field */ export type Id5 = string -export type Choices = Choice[] -export type Fields = Field[] -export type Answer = [{ "type": "object", "title": "text answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "text" }, "text": { "type": "string", "title": "text", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["short_text", "long_text"] } }, "required": ["id", "type"] } }, "required": ["type", "text", "field"] }, { "type": "object", "title": "choice answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "choice" }, "choice": { "type": "object", "title": "choice", "properties": { "label": { "type": "string", "title": "label", "description": "The label of the choice" }, "other": { "type": "string", "title": "label", "description": "What the user typed in to the \"other\" field" } } }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["picture_choice", "dropdown", "multiple_choice"] } }, "required": ["id", "type"] } }, "required": ["type", "choice", "field"] }, { "type": "object", "title": "choices answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "choices" }, "choices": { "type": "object", "title": "choices", "properties": { "other": { "type": "string", "title": "label", "description": "What the user typed in to the \"other\" field" }, "labels": { "type": "array", "title": "labels", "items": { "type": "string", "title": "label", "description": "The label of the choice" } } }, "required": ["labels"] }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["picture_choice", "dropdown", "multiple_choice"] } }, "required": ["id", "type"] } }, "required": ["type", "choices", "field"] }, { "type": "object", "title": "email answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "email" }, "email": { "type": "string", "title": "email", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "email" } }, "required": ["id", "type"] } }, "required": ["type", "email", "field"] }, { "type": "object", "title": "date answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "date" }, "date": { "type": "string", "title": "date", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "date" } }, "required": ["id", "type"] } }, "required": ["type", "date", "field"] }, { "type": "object", "title": "boolean answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "boolean" }, "boolean": { "title": "boolean", "type": "boolean", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["legal", "yes_no"] } }, "required": ["id", "type"] } }, "required": ["type", "boolean", "field"] }, { "type": "object", "title": "url answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "url" }, "url": { "type": "string", "title": "url", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["website", "calendly"] } }, "required": ["id", "type"] } }, "required": ["type", "url", "field"] }, { "type": "object", "title": "number answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "number" }, "number": { "type": "number", "title": "number", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "enum": ["rating", "opinion_scale", "number"] } }, "required": ["id", "type"] } }, "required": ["type", "number", "field"] }, { "type": "object", "title": "file url answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "file_url" }, "file_url": { "type": "string", "title": "file_url", "description": "The value of the answer" }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "file_upload" } }, "required": ["id", "type"] } }, "required": ["type", "file_url", "field"] }, { "type": "object", "title": "payment answer", "properties": { "type": { "type": "string", "title": "type", "description": "The type of the answer", "const": "payment" }, "payment": { "type": "object", "title": "payment", "properties": { "amount": { "type": "number", "title": "amount", "description": "The amount of the payment" }, "last4": { "type": "string", "title": "last4", "description": "The last 4 digits of the card" }, "name": { "type": "string", "title": "name", "description": "The name of the credit card" }, "success": { "title": "success", "type": "boolean", "description": "Whether the payment succeeded" } }, "required": ["amount", "last4", "name", "success"] }, "field": { "type": "object", "title": "field", "properties": { "ref": { "type": "string", "title": "ref", "description": "The ref of the field" }, "id": { "type": "string", "title": "id", "description": "The ID of the field" }, "type": { "type": "string", "title": "type", "description": "The type of the field", "const": "payment" } }, "required": ["id", "type"] } }, "required": ["type", "payment", "field"] }] +/** + * The type of the field + */ +export type Type7 = ("picture_choice" | "dropdown" | "multiple_choice") +/** + * The type of the answer + */ +export type Type8 = "choices" +/** + * What the user typed in to the "other" field + */ +export type Label3 = string +/** + * The label of the choice + */ +export type Label4 = string +export type Labels = Label4[] +/** + * The ref of the field + */ +export type Ref4 = string +/** + * The ID of the field + */ +export type Id6 = string +/** + * The type of the field + */ +export type Type9 = ("picture_choice" | "dropdown" | "multiple_choice") +/** + * The type of the answer + */ +export type Type10 = "email" +/** + * The value of the answer + */ +export type Email = string +/** + * The ref of the field + */ +export type Ref5 = string +/** + * The ID of the field + */ +export type Id7 = string +/** + * The type of the field + */ +export type Type11 = "email" +/** + * The type of the answer + */ +export type Type12 = "date" +/** + * The value of the answer + */ +export type Date = string +/** + * The ref of the field + */ +export type Ref6 = string +/** + * The ID of the field + */ +export type Id8 = string +/** + * The type of the field + */ +export type Type13 = "date" +/** + * The type of the answer + */ +export type Type14 = "boolean" +/** + * The value of the answer + */ +export type Boolean = boolean +/** + * The ref of the field + */ +export type Ref7 = string +/** + * The ID of the field + */ +export type Id9 = string +/** + * The type of the field + */ +export type Type15 = ("legal" | "yes_no") +/** + * The type of the answer + */ +export type Type16 = "url" +/** + * The value of the answer + */ +export type Url = string +/** + * The ref of the field + */ +export type Ref8 = string +/** + * The ID of the field + */ +export type Id10 = string +/** + * The type of the field + */ +export type Type17 = ("website" | "calendly") +/** + * The type of the answer + */ +export type Type18 = "number" +/** + * The value of the answer + */ +export type Number1 = number +/** + * The ref of the field + */ +export type Ref9 = string +/** + * The ID of the field + */ +export type Id11 = string +/** + * The type of the field + */ +export type Type19 = string +/** + * The type of the answer + */ +export type Type20 = "file_url" +/** + * The value of the answer + */ +export type FileUrl = string +/** + * The ref of the field + */ +export type Ref10 = string +/** + * The ID of the field + */ +export type Id12 = string +/** + * The type of the field + */ +export type Type21 = "file_upload" +/** + * The type of the answer + */ +export type Type22 = "payment" +/** + * The amount of the payment + */ +export type Amount = number +/** + * The last 4 digits of the card + */ +export type Last4 = string +/** + * The name of the credit card + */ +export type Name = string +/** + * Whether the payment succeeded + */ +export type Success = boolean +/** + * The ref of the field + */ +export type Ref11 = string +/** + * The ID of the field + */ +export type Id13 = string +/** + * The type of the field + */ +export type Type23 = "payment" export type Answers = Answer[] /** * The ID of the ending */ -export type Id6 = string +export type Id14 = string /** * A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to. */ -export type Ref2 = string +export type Ref12 = string export interface FormResponseInput { form_id: FormID @@ -148,12 +369,12 @@ export interface Calculated { score: Score } export interface NumberVariable { - id: Id + key: Key type: Type text: Text } export interface NumberVariable1 { - id: Id1 + key: Key1 type: Type1 number: Number } @@ -162,33 +383,147 @@ export interface Hidden { } export interface Definition { endings?: Endings - id: Id3 + id: Id1 title: Title1 fields: Fields } export interface Ending { - id: Id2 + id: Id ref: Ref title: Title type: Type2 [k: string]: unknown } export interface Field { - id: Id4 + allow_multiple_selections?: AllowMultipleSelections + allow_other_choice?: AllowOtherChoice + choices?: Choices + id: Id3 title: Title2 type: Type3 ref: Ref1 - allow_multiple_selectiors: AllowMultipleSelectiors - allow_other_choice: AllowOtherChoice - choices: Choices } export interface Choice { label: Label + id: Id2 +} +export interface TextAnswer { + type: Type4 + text: Text1 + field: Field1 +} +export interface Field1 { + ref?: Ref2 + id: Id4 + type: Type5 +} +export interface ChoiceAnswer { + type: Type6 + choice: Choice1 + field: Field2 +} +export interface Choice1 { + label?: Label1 + other?: Label2 +} +export interface Field2 { + ref?: Ref3 id: Id5 + type: Type7 } -export interface Ending1 { +export interface ChoicesAnswer { + type: Type8 + choices: Choices1 + field: Field3 +} +export interface Choices1 { + other?: Label3 + labels: Labels +} +export interface Field3 { + ref?: Ref4 id: Id6 - ref: Ref2 + type: Type9 +} +export interface EmailAnswer { + type: Type10 + email: Email + field: Field4 +} +export interface Field4 { + ref?: Ref5 + id: Id7 + type: Type11 +} +export interface DateAnswer { + type: Type12 + date: Date + field: Field5 +} +export interface Field5 { + ref?: Ref6 + id: Id8 + type: Type13 +} +export interface BooleanAnswer { + type: Type14 + boolean: Boolean + field: Field6 +} +export interface Field6 { + ref?: Ref7 + id: Id9 + type: Type15 +} +export interface UrlAnswer { + type: Type16 + url: Url + field: Field7 +} +export interface Field7 { + ref?: Ref8 + id: Id10 + type: Type17 +} +export interface NumberAnswer { + type: Type18 + number: Number1 + field: Field8 +} +export interface Field8 { + ref?: Ref9 + id: Id11 + type: Type19 +} +export interface FileUrlAnswer { + type: Type20 + file_url: FileUrl + field: Field9 +} +export interface Field9 { + ref?: Ref10 + id: Id12 + type: Type21 +} +export interface PaymentAnswer { + type: Type22 + payment: Payment + field: Field10 +} +export interface Payment { + amount: Amount + last4: Last4 + name: Name + success: Success +} +export interface Field10 { + ref?: Ref11 + id: Id13 + type: Type23 +} +export interface Ending1 { + id: Id14 + ref: Ref12 [k: string]: unknown } From 44c424b28ec618ab3a55f8d175edd091478e1f78 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 16:47:25 +0000 Subject: [PATCH 067/113] Added organization the DispatchEvent log --- apps/webapp/app/services/events/dispatch.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/app/services/events/dispatch.server.ts b/apps/webapp/app/services/events/dispatch.server.ts index 986f3fc379a..1c89e78c768 100644 --- a/apps/webapp/app/services/events/dispatch.server.ts +++ b/apps/webapp/app/services/events/dispatch.server.ts @@ -26,7 +26,7 @@ export class DispatchEvent { } console.log( - `Dispatching event ${event.id}, type = ${event.type}, name = ${event.name}, service = ${event.service}, environment = ${event.environmentId}` + `Dispatching event ${event.id}, type = ${event.type}, name = ${event.name}, service = ${event.service}, environment = ${event.environmentId}, organization = ${event.organizationId}` ); const eventRules = await this.#prismaClient.eventRule.findMany({ From 84b276fa80410718a241301a2603d0644cfcf245 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 16:47:35 +0000 Subject: [PATCH 068/113] Changed the example form to a new one --- examples/typeform/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/typeform/src/index.ts b/examples/typeform/src/index.ts index 149ae798ece..6488c3c5206 100644 --- a/examples/typeform/src/index.ts +++ b/examples/typeform/src/index.ts @@ -8,7 +8,7 @@ new Trigger({ endpoint: "ws://localhost:8889/ws", logLevel: "debug", on: events.formResponseEvent({ - form_id: "KywLXMeB", + form_id: "XHfDDtcu", }), run: async (event, ctx) => { await ctx.logger.info(`Action was ${event.event_id}`, event.form_response); From 07fb86e8a67a4615c4a98895ff334b6f970cca40 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 16:47:57 +0000 Subject: [PATCH 069/113] hello-world repo --- examples/github-webhook/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/github-webhook/src/index.ts b/examples/github-webhook/src/index.ts index ae6cae9191d..eba2f253150 100644 --- a/examples/github-webhook/src/index.ts +++ b/examples/github-webhook/src/index.ts @@ -120,7 +120,7 @@ new Trigger({ endpoint: "ws://localhost:8889/ws", logLevel: "debug", on: events.newStarEvent({ - repo: "triggerdotdev/trigger.dev-examples", + repo: "triggerdotdev/hello-world", }), run: async (event, ctx) => { return {}; From 8136e436583ae89c497370235623ec4d4b6fa70a Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 17:04:19 +0000 Subject: [PATCH 070/113] Added INTEGRATION_WEBHOOK type label --- apps/webapp/app/components/triggers/triggerLabel.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/webapp/app/components/triggers/triggerLabel.tsx b/apps/webapp/app/components/triggers/triggerLabel.tsx index 5558fcb046d..e73d27b9a2f 100644 --- a/apps/webapp/app/components/triggers/triggerLabel.tsx +++ b/apps/webapp/app/components/triggers/triggerLabel.tsx @@ -12,6 +12,8 @@ export function triggerLabel(type: TriggerType) { return "HTTP endpoint"; case "SCHEDULE": return "Scheduled"; + case "INTEGRATION_WEBHOOK": + return "Webhook"; case "SLACK_INTERACTION": return "Slack interaction"; default: From 118b2570cd2233fb17c66767377b9af07689fab5 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 17:04:50 +0000 Subject: [PATCH 071/113] Improved the display of the INTEGRATION_WEBHOOK --- .../app/components/triggers/Trigger.tsx | 58 ++++++++++++++----- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/apps/webapp/app/components/triggers/Trigger.tsx b/apps/webapp/app/components/triggers/Trigger.tsx index 04fa0ffdb40..88b233eebe3 100644 --- a/apps/webapp/app/components/triggers/Trigger.tsx +++ b/apps/webapp/app/components/triggers/Trigger.tsx @@ -1,5 +1,6 @@ import type { CustomEventTrigger, + IntegrationWebhookEventTrigger, ScheduledEventTrigger, ScheduleSourceCron, ScheduleSourceRate, @@ -23,6 +24,8 @@ export function TriggerBody({ trigger }: { trigger: TriggerMetadata }) { break; case "SLACK_INTERACTION": return ; + case "INTEGRATION_WEBHOOK": + return ; default: break; } @@ -38,40 +41,40 @@ function SlackInteraction({ }) { return (
-
+
Name - + {trigger.name}
{trigger.source.type === "block_action" && ( -
+
Block - + {trigger.source.blockId}
)} {trigger.source.type === "block_action" && ( -
+
Action - + {trigger.source.actionIds.join(", ")}
)} {trigger.source.type === "view_submission" && ( -
+
Callback IDs - + {trigger.source.callbackIds.join(", ")}
@@ -85,14 +88,39 @@ function SlackInteraction({ function Webhook({ webhook }: { webhook: WebhookEventTrigger }) { return ( <> - + {webhook.name}
{webhook.source && !webhook.manualRegistration && Object.entries(webhook.source).map(([key, value]) => ( -
+
+ + {key} + + {value} +
+ ))} +
+ + ); +} + +function IntegrationWebhook({ + webhook, +}: { + webhook: IntegrationWebhookEventTrigger; +}) { + return ( + <> + + {webhook.name} + +
+ {webhook.source && + Object.entries(webhook.source).map(([key, value]) => ( +
{key} @@ -110,7 +138,7 @@ function CustomEvent({ event }: { event: CustomEventTrigger }) { Name - + {event.name} @@ -153,11 +181,11 @@ function RateOfScheduled({ source }: { source: ScheduleSourceRate }) { : source.rateOf.days; return ( -
+
Runs - + Every {value} {unit}
@@ -173,7 +201,7 @@ function AtScheduled({ source }: { source: ScheduleSourceCron }) { {cronstrue.toString(source.cron, { throwExceptionOnParseError: false, @@ -188,7 +216,7 @@ function AtScheduled({ source }: { source: ScheduleSourceCron }) { {source.cron} From 923d5720e109234221abc7a47a3a4bfc2e470015 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 18:05:10 +0000 Subject: [PATCH 072/113] Much better Typeform icon --- apps/webapp/public/integrations/typeform.png | Bin 13981 -> 14683 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/apps/webapp/public/integrations/typeform.png b/apps/webapp/public/integrations/typeform.png index 27c66e2897feb0fba126303a850f5dc0ac11b5ca..effd9748487685c5b2c3c8580eb051f69475eb9d 100644 GIT binary patch literal 14683 zcmW+-1yEaE6UAKu6n805+}+(N?(Po7LUDH}?ogl_x+hk-XxQm z`|i!|*|TR)qCcz1qN5O@KtVyF%gafr1J{fHo=6D5tBBT7GH^k5mD6*Ff*91eK<{^Sf_p{D>vgUks zTC^(d4bHf^R%sfc%tj-=eG6ZkhfhCQ?-*stfn$SX%bEQ7?SkfnmIkiAc8VqV+wVRe z9%l;TQJH4TQSF*i`O=K6w)b;6FSO<5daZ;X_xD1(oSdb9!Bh7IE&kG`5D&5aOE4Nn zq-23gX}o>YANp~7Sc`h&Vk{Cq8=Vg`v`F=OCF+EiU%QHsyo6kY2M!rRDBv#mn8ul? zkQAiS_syi$d~iSRFCBTz=qkm;m$J z$TcbkwS~@OhxKX{(oh;38__t;$0(p}ppO@;H16;24oq8!sLFArwWD9L#X;B0QBh7{ zE;Eh9zt<1bL*!|@{favj@O^{vGR1HXc?afr(oN=dnaK#D;sS5?JD08YV6ZN%1LIgd z4MM1-ISuwUFEr_{h`v{L~H~(ym1pIN-C|51utcqVJEi@iKF+e?L3(S{Tg5 zWpc^&YK(OHTz}cR3P3wM(^vbTElJ=`fqizDy%LqlftTh2BF48vtM(}S{@u0ghov(U z9i7h9__$V|zQcrdtaj;K4Ct3J>O~nT`!LmCMOM63uqN9@&ySInOa{qP|Zu?@K-}P>YHg@YM#5Avscq4JTCbYB` zwPw}r@9#pE+!O-#!f!!z(fi{W4ibf+mLFE21!>zGVu~QtndPb%n=S1R^gKDt=1uw^ zV+SiIvN-90*hwz@^XJdQTAO>57nI^*2#cp9cJS|kBss_0ni`wdk`k@53g6+yW$=iA zkPr<5jJTPt?FhZR-K|>%^EgUn;|0c@Nq;oyLr)X#hYvR{>k5lLos`h3Y*995Xy~qy z3yf}H_Ap;)vhkVTh0eN)h3v+;Ba)$G^~Xn_>=MO{2s~C}5>^(L#hgiNOk*3%6dmI_T43Vy{;`(krlvtcb{1gM zQPQz^S-(eg2L2dB&lsasXhO3Kv>J?8F|Ta~1LuKYmNm)E&CQ^z8_~KDht@#mqEmMS zt7AvP?$O%SmDhE@;T!$*^z=||)WHnmRP9Elo`RRGSLBOp^$}$0LrtdXf}f!ya5MfE zG@SK#edwUJs0Y9F;Nsc}ok5UgF~~fx0ABp|`QTuPciE)g3PL~$orsw| zJ39;0q~AhzcWaI0iGE|hHMwA3C!?qkvzuXb7u|PU(_?)4rS0HqsX;HKA9XAsaJXSw zq@wd`%)#gM)CoS~t3sD=nQzksOP)=shxyj672 zi593PjhKjQs4zSG-(I`t@ovG(o)*f^nx7D_LzpiEOt9FYLrqt@-%&}%#O*CQUh6u- zMh0BQc%s7{k@MG{gh6xPZ?_n1JCzjB1=PjWSHs%~0T|7e!iN1qt^Eu%mFD@3mP@?u6Z6hp2m$sD5oh%9D z*~?m3SR`YSBO^bMh`o9x$P_=L5UnfQCc7`osnR!__J!Ql_@6o);WDQCn!3ePXIbxX z(IoA~kc#+$A2NDgtiHa#c^_^?jMU)Uk4vD2y>KOvyEr+WT0-n7p$mjzus=V7U(kdO z1x-Bk&izJsDI(WvBOVaYjfLmwDZuFC@NbQ2l<%b^C14 z3pZJdw)M+E%eq&^eexL-R8P~CZ z5xGksHPJBNP_0OdoM|OsmFd*{R1;P7&zWSAO09(9)2Gw+!+c)}9h28l63fggAs!1z zs(GERhhjQYM5cRJ8L@+T9UnO_dX1dc?w9?>!-KEwh=_?5972K#FAUbxPLsv|``o>iH-q6(K z88nG)-2jir$arWHME*vmyX0_Dmc?00{}9gVXZEmY@V@BCMRXcBqW>+&m4Xh72!>wJ zZs#(LkawHAmGJn~Yqd~}f{k%!NAHuV$cPAC=>^`r7w^sml_M3luG8k@lsBQFb*W4- z<+vdF?<0?cCWobexhhLyMn-vLgbuLIka3DVn3mP9&BJT-I>M<+9JX^U_~{3{my!30 zOv6xeL%puAT9|9>PQc^Lk(`}t67+3;HZ>#T7(gt+4WC0&Cnh}3ev}OA0R9+ zSeDw~-ycsp>5viSnSjZS)p_}}&(u|BYM9#r&QM$1h%si&yKu(9wd@lU(~bY@u?eQ% zk)p|$t$S}a^FN{W1@J7M56gAUaymMt$nx?c%;zX!Qlx`}gUnrBU7XHr5Jyn0uCZ~0 zelZp~15SJfR6OF|QBeF@L5MaH>Nz)_x8`i-wg=Pia`>UQ% zKGDSZxLvlL)z2&z)4Iw^$1Htj=l(YVk-t#syboRH>-hRzUp-kMikD{-p|QF>9!KiT z*z>~i@$o9T?o>;4>ggrW5D2;>0=or#ZcdH^15>VVF-2Jb`t~B#opOyyPxpD=%XI182~{rb!w^oH-s{8Z!;i4}l@jGqdLUR?GVs=0 zbB=R+If}#-(}$rbz41%4Xk6Sh+53|fi-h6bsie&16280yJ7Sz^BV+VpvA7WxNM4WuG!&8bsByMcMdZ~EVal3 z|KUC3cmIWghH%=ljj?IG2rhu3B1Y(#2-pyDVda4x9vNm+{2sM{Bial2`#0!qib3z3V`gAo6EO z`}eD2b=b%bGHC9^k;NC4*&44*{j(~_r^njxW^-#N5PDHZM_-=^d^Jkkr7Oy)df(wVHEoi( z`+g&ya!u=Sc7hPH(yyqru%IPVFfICfejai>$Rhsvmuw`}UA$=@dHaQ6Ihy1&)I^)EAk_q)LalY6?7R^3IxFo8 zP0lIBF$zKd`@%oj*475w;dQz=Y|ail#jM>V&m1qthwMw?biwA6m?3q@ou*PMl!uKDfUa(*Q_$TU8p53QrEolePq zOVB*M{W;WPGeuQ|5a7l6lBh9QIME6v>NSRK{poU$j^krureqr20a(M6OYnw_I%CB_ z?vw&$oX4!`{kAn2y%R4fBL;LW17KH%s;9Ae^5@9{Q4>2yKi1`$88h*YoC>JOfja6O z1QE-;pvPXg)Pru=ybV|NJl-$?7mNj;=us(D?Mhv&@`_b_asq-aSn@F|JrxQIqYUN- zL+i94MFoYMuU(fpt)ET$DanJ#R~nD{pba4~zpk-U(C_a)%W$->J8uFoFh669mafYr zt^M?E`q05jPizsX_2*Ao^1@+iIfAtaNm6rT(SMx*t?bwIt4d0^h7c<&E4-Y^KN=<` zE@IXK_*zNu&Mg(y&COoltE!w7o|SCEgOW1GWV=pRU9)?BF&Ad zP(euJEOy>+6kN7z6#+wKoPiim*SczY8OoYMTY@Q=;#=+qGPv^u%Zyz zJxl9cs3S@yHnjUC)vDid)V`IzNaVu0_vXHAb6X~`<#9FY@-%xpyW8t0wlM`VX*0Jf z?FMQR4ArlJNAmb==VZwD4-O1z4}n&CZWk-mk8mExOEsnZl~H!kf6CoPlLs%E4Vs5S z`=C_q)3(==fDVc@>!kAL2MTz--SgjPdXF^vU)`}x#+2qLM|Z0(F3`s6nfe<;sesMKkb5R)CDPs5m>7fPw0y9U7R=Kw`1p(&WfMTOymu>jSLk1{MzD|L! zO9jpNaQ!BVOaK66%`EwX)H3U2RK7L310b@DGzxlTx2kdEqNRR>M0=P?iTzA0+9 zS3Ertks*ukuvAR|pBW5UR)=0UK1?@Ej>qW7474?%QPPKdWsw1KqD5ua$gd+~74tA% z&L%6S&l!A6BQwVt2}8=P`9Lo}`#Lgalqh){gUg7}{d#&{c71(qIIk9(S-!WwPq-y> zPr^UD1CkDA<=DD^^b=f$<2Zw1VPN3ca=yWB#WE3RGM${B#@uwD7A}0ecKBkaOTnHZ z-hmIo9A9neA(VZI{lhly*=A@!v4fnW=+FsY$wE)x8a_=G&3ewn#B}w3Q!0ARV%%94 z$HdA$x9zmHds$}I8nNk9It8VZ9T^+$T4j<`)>bmCr3o~~_~RVUbmE_L@nW4G05*=! zq|4Tmiv?i{o+fdh%OX^ItQl4ql__>-A~&u{R%v zNV|`#J6On_;oBx5l`wcqTOI-(%}%Sv&J!&0y zIW?BGd-+}`@K(nw+4&AMQJrnWesyJx2yUL~dQ}j~{Y`P=NL1U)!err!Xk5R|LSxPZe@E+Q1sQ@Dq`U z9O><_oA#ef$S>v!y1S2O6?yqCK76b~3W=xZ5f$BR4tN!iuhPDZ-iobVhYZy{xvQ|V zomWD4$DeyMayb4%C+6{Z9q(B?lDV54Lki&wRw&sy{)+Ch`Idfi|I85^dAJ9@^Xb~a z;K9fp&l8jKdbDWmSqt(vGB!3o`I+OaPO0o{2`BD{)UulAzG6j=`R}%!tMZGQ0J8}? zrkA0$5otpZK8v9)()hFI$<(e1lK4|^Hg^SSqdA3mE>ZV~vq|1fM<#}BVzD$W*jK}< z1$!SRzl}V>AsSPfGA??hK$4D(>wrms&%L&+eL+>%hQ;jvg9_UR$F0&PIGKJ(R6+OU0-w8(YV^p7v@?mmlIKL;tJ8f0DD41WS;fWa@F zh~#j*{=&|SELW}9H3d*-@5Yyn(C_uSU#?W)SUOHPM5dAi96=C*U@RWLx9bAMjP!I2 zYU;^>*`D&UvNE&7kt{f-Or@U;G*u6VEl)*7{M$7Fw-s({!b-rF++jwUmXbdzMyM$y ze^zG*&S$YaToyd0-qh68{IO)q8{xjr}QTeo$#F8>Q z**S+G!WFQfrNb~HGxw(pjy)lB()tvg*N+GOQQ@~fR^`=##Y>dNaKpB1t5OLzYsfA4 z!QLL4%W|!_#Eg%jjOqkO>Sy}B)h=IeZy~aRTW(6YpNsq`A1V?qOl_hr8F5F0D?A#iRxH4~bMbgW?M<|moBS$IU=Ng&UMBIa9>ntB2PT&SZ zV7B{9s{+1Z1)KbI*^R$|ZP#)0T^xFM=hwJ&67%7b&+Wgo_3-fUK_C>OC3KtYOFrxB zf(C?D(ATT#^s8)yT^66=CTx&{z^p@v`&$X0Ongt9{1BkCSFxeK}mMTlt|_uD{DgbwE8VM)Yda7XoEXDJBwy#)kUX4y|C5NjuUiae8spT zdc8tDuDIuwW-Wpd0R2xNUh*)56IbFB;tX8(TzY&I;nI!BJ=9N4ohs|Wffd>%;x6H4rIPA$3__Lf~UIBfe8f9p?R(bvp5IL-w?nHD{?@4J43 zHEs>`b#)qxUV3`okuc$Zy!}cI6l2E!}Uo=#}(uG+{saIN|~ zA9nlr^2nw}XfF9j7E?n}S*#|*M{?hg6-R5b#KX?RijN$kazA0QIbwG#*D+ zEU??}P1ARFeI#@fc*xcJ2b3OH9UXkpN&ve2giDG`eFto_=(S*3{}eCS&jHMi7-GRs zJp}8vQeQH}yScWAZ04!bsGA@7_PB=`a1m5KKOc)S7X#tK&OV+IDAf2aQ%2;O=>s%<1%j_V#c@L7&h}x(C6s} zAd8qxQ^c&Sv<9L|M17%;Jp@XC-#YwUw?E2JOvAt+M~a2v;QCSNfmvsFjkRu2_0}BA zTMDPyXL+e&fuXIaD5PCQMI(81FEdo>?2BSDB?BgvbJYSHI6)@}7Lt-tm z?_(%_f^5~ifp9_3R-!#4YIEz{@mR4nmZ|U6^nHL{J0ze+G9N3iGP0dNx-sk((6iPW zktz6s4Tr`4jab?ORg|8!K-P#3nF_Ub#Zh{2(EW9dGeU$>jZk2}bB1a@50Ts;QYvE4 zm9Oj`SKJcXkK_#~a-p3?P}BwtG3K-=0BEvBfzqvQ&fZukNk_nrc$$n=KR|E+QnwE{raV=t8mMFb`@ z)6$ zkRA-Vv96{jL`N3+3a*j9ehjl)W`e+`7hcKT8AnQ+@;e6&)iVikeCVOYCin^!JRCpK zDM(Lpt%Uz6lcF9ew2$Ioe;;*if+6PfkELT_I?-wP6B0rXmN*|aK5-BZD!HVv_ZbOJ zK?TO$LWIIhe@a1VbqZY4x~+nOf;vK|NU*;!&2x8>JdJ6{i1~x%>Bo|}|u;!G38rfC%P?!SKhQt|k^rT3RC-%o{h&TxdrI%I?+SEY2u zoc$WEfhfAtoWN@7^6IANz8z_+xJ~}p0OJS#wMja}cUGa@^>JKQC6g(?<+5!$BR}69*20~pmR7FaU+JbqIzs` zOG=guMaGz{A}j@Y1!oNn4eMk%ES9hf*&yc3zN>09p ziOTcNjOVzvpuDbp`2IJQf^G7`m3|613WYE3*BoRVSK2%@xw3|~@iHf& z@CjGRt}ZUDgTPixQd2*W^VWJndZ}5s2qa8}AiG<4cV5{VkreeGEQ>f3J2_>kC=*+M zM@vzm;kRd?wiXulCAiOjjHRgmwzl>%bK99^Ttbu;r!K`dfuob9{-2JIH7p5abmf30 z$HkO3N&zD(=GwBg;or=n5m=-+-1!jYZP(>-;NAp2EA04lgGnZs-K-gy)M}O_dldxl zQjQuS?HwI<;S#_Rv<8{^7yCUiihs5mf{O)oRe5PFgIaPx5bU4I6TJOz8Oe$TBA|UA z>O~1j)*Ch;;Rgv8{sX~PinwkGJ7<@ZDS`A5;3^sE>G|?4r+)m9MP&Wap@xdlo2KpQ z(MVV{WBUzAAFT_O-!jGQgZD`d9M{8Ys7z=awBDw?q!_Zxy}e=~|9wNO7o{M};)acr zmXCVt=g*%YsTYjq%+2$q#iga|LIp0q|FR^%lOtzxc0`2uNWtetzIEF3ffp-U>IUEq z*h$s2jKIBw=~ro!V93h!{ysKI)+H(HFiu~AA{$IdnBvEJR@O@xyT^M zgyqeio|u8$Cz3kM^`;$k?8)Fr;ko%CZ(&jP1X@LKam>`XO_B+E&BKZ#ZpoAaBu@|8 z&^A3IgEc|LXjsSYVQZFQM?`28k=GWeG!Zz_aC$)YF(fFe^S5CLNeGZSgyL>Y-MF|0%8CMbudvM+_4L|(pXR07hNtfC?oJNrCT$iFVf$UP z+TqPw5F3eyNgGv8w<~rH$`H+WX6KYw`(blgL`hTU;nLN_Nt!rpw}KmzDe;-myl<

mHF~Jca?KVEmODZX#*_VHJD?-Tgi+DpEj< z1Xt$pQCtb@$U~oyjEw9^;uAyZq(lJ)cJza^+6yaqs{HLOU>X<+&j7iSi49sD0>)0V zIyNBA>z2SDLB77ek0+_CwM|zS_icyy_ggGtq=HE1C~~wZY9baGOGOm)S-6@I&Q4h# zqWDNP@vrGUJ;lY7FE?|l0MW4n*!mB^oM7Rn&tyD1==CpOm;47Xwuy;cx{L^R<*W2P zYdc(%l#~qk?~5?d)X_|~Nx=u(t}>xEAJ`B_E7rl(=XoESn#r0RSDTfK5=i0L+rVAj z5L?;5VfxH|9;6SJAil_LuXk47Rr-%d&5kSC5v*hYW+@Q~3$G7*x7|(UhKpoT%VLOz zCeIesA=h+2*`MXObRR{MmbSBrD`6`uPe#nFLrc$Cqy5!G&9rJaVdx3{cqgx}|Gbx? zT3=XbMpPmNN`XxtA;s&aMk*3bBAD6Gg`1dLJ|C&C&+;y-tPy3i8Bgc^3Zw-NMkDX? z=BCTeM;hs*&LaA&y{lz7Lv{5KUEK#4KN-5p+JEJx`Bya9$k^=SN^ApAdVeR%#I~eA z($6t|QG(fM_jLGU&Dj-?`N(V%0Z(W*hZ*=V&`KlUNb*TsiK42i3R%|-OV8G_NUJIq zkC~_g{@|j$mV!PojBW!jakvR+A{0~<6;aO@rK!`9%tHXrKoGRNg|Vc>mBQbHq0|EM zh9G|XrYED;nV$U$LJTxC0$!K5E*PEcO5iAvCKxuWS*j2}L4{^iOH)|z ze&Od9l+`!D^wQSSa*|L#ZUJOYuTB5WYvHSr>7vKSM{OA;WUr3(TJu4acip0_kdTnD zLGu}QDu<)9vjl3p@J%`Kc6nzEgh*AIglWCrV#mHnku#>%`d z=!f-9^fgNqeOrAwIH1mp%fzOTdKn2Zi_0N%(PF1!6bGj`Itu+j5106A{1_Z{pZD_O zgG?|&uSzO2_b5yxF@H?T_3~F%l!Ho8xq=@A;R}Lj6*V+)2BS3+nJ36$`=0L|PV4km z0{s}Re7OllZvc0aoB}W~@DRFNwqSn||7R@^Iz;{@#F0D{@{KTp=48oUZ+vvRpe2aE z3>I@|H!vje_+ak0$o(3*=Wqh)u43cwep@)V1lQM_yF1z>NPS{{`62H26cbJsm;(y3 z0FCq#lMB(9@2g#QbCM`8UfGJ-6jNB>Cc9J{{~6o)u-8-?tD(J~L^m9^Zx{D(LBl$= z$n-*oB7l9uRvs^ePxhOl`D%05rv!{0m$V;JbBHFK`7j5s+y+_PiN zo1NFcMhSpHkY(|!UoPhxU4zsq%h9X@*uJ6<*>1ROyTz~Yg?h=Un_>{G9?|d5Z};!a z_$Fb~o09APNakqsOG}uF$v+Np$>fv0=jZ4B=-GwNZhQLr#79rPnszom$B7CBg25wD zI=wyClSFw4K&_ZUGT$gfBm;k51@cP!Lz|kKX5!iE{avKQ>}7K=VRlYVmwwgLrt1=4 zkn(LmD(itWu#Xf4ML0LFo0}U?!2YB!^Hh#{9&P@V`uGDGi|r5!Bz?zx(i}Np_A2^* zEsE>3*`4Rz|8s>2d53z7vGC=eP7fD4I(+LhNl=7Iu$qw7VHq+G8{*ruLH)#AULf*( zWIU$miw3E^{=8x=g-D1g+h6Gyhsb*diHW?B?aE>5nPlK^g zJPzBi>2DD_`7zk#+d>h?)y5-AcL2(HsgXh+U*8H#^S_Sq2u!L8H)l-UDKHP%iJ)Md3uBAadY3shB4+%VXuKd-smPLQHy**bl>5%^t$sB znctw{-WtPK-)BR5!bqJeeOy3!=se>t=fw>fL3nz8UhRIIbU7F{R}&^jO;u?)Z))bj z%sukgpu*eGQ2a3XtVX>tka&L{$b0_0`QAbUAvK3%9}lX?eONz#QxvZs3#xP{8FEsj z-#Zn~xmQ^+lmj`i@$w#0bo()59FhREC+3gNMY1AGbj5-_4t12Cgs<;&?{vUj)a3Ck z5$KIa9Opge;%a%N(_4X#lQT<6yh(onM%EM;L)ev?s}(hTvD%2SS7J`H6cUH%=1dY@ zu?&>kGXlN)DB)1c8=NxOf(6jpCtSAoDL8#@Fc(lmYF^#{aw}HB_)&hxf!WS1 zs|yvMWquAMW&RTzBeFPA_-=VCU$`Uo_gxC;A`ydB;O0tKgxcT$R-0mnx)uT}ClRQW ztgf<_brThin9gcaT@pPUoi%cIx|%5ba-n+oW6loU@Gyhs)9WkX2oXx39{GvfmA1CF zW<1|ZVQ!|ykyQ`mTUnF-DO3xD#@w8?Z)u_XdP*?9?D-F_^hGpP$2l-x^Iahr{YCf) z&DNe7}0?zuPYIrvSh-H+WI!wNjo#-Q z-O4#UJ|KjDAHqEg^;~i}ZKgT^!_6T#SwMRw>i98ak|pDq&0@!VuMjnXOxRx7@4?k^ zH2GryfRk202lu_|>8$5Hz{$Ws(4|xy>4C1E$!P-^TJm>H4QHvK3Nj*u7OGY(a8X?x z!cw3BZS0>=L`)hyCS8z6$GRUBT-%(KcCeEBLy{~R;h%1Q*#sJSA=KB1B00<}T;UZy zwkmDwLwDHA?m4nV--@CUIk*vNKcP!v7f1PybutscASY)@+vqZATy@&`_sb)eoJ5c7EUG(fF-=eGKX;Tu~+XXC4 zObS|>z06Pu?TIv$l#oF#d%Qi5%3CwC@6>cjQP)#M%%F=r*TR-d5e!F?tY(;lE%UH- zXC2sN81}XG^uj4?@!++!jSWJ>W=A_XA|Cau=uAs>gBE8}zlZGt{q0ZLYW&-Z#V@8{ z@ZWn3nfnid7ujGS@bHlg>IYh;?{PQZ3#4>*;r;Mn`V zLkML%jyGG~iqTJJBkuU<<&U0$qDUsr;vj){mvaUq0?neEGqBA+v1`6|i(+0^=0BX! za#K5z_wnOLqK%`_nLQ{7T;E`a)i~aHD5gkRq|IL`jnI89vf#)EKr>v*MEsP?3^-{> zdNx->QJdlMRYQ&^5G67JR5<7R^5dhfkr6i(VAPxB1ay!WP>7A&OSbqo;Uj+_Q|n&DGwR z0@Qf&r%BNla9Zn1OFvSWTfnw0Kvsevn!f-;$a^0mZ(WA**ETUV%j!bvi~a5j^=Q?z z&7MH@jLE!9m;Ube_^tvG6^N3LePFj5t|l;WTI?u2C4I>q{H;a7Zo zkTO<7KTIH0e)*YHo1LInifaX`>r@0yhQ)Y#)zHR9zB5g$IzK-@+Xw@Txx$x8b5pC` zC_BWYvKWe0!I!l}=;=}EyWrKl#=F(gzkkiW*s*fjq!I>??D+u*Rz=s@ z$`(SI@pun##flv_{3Oi+FFc5pnu03VGs;it>DsT|{+{|mo3Ve~K1lG+r8YMpv=tW@ z@4r2tXB7Ax=<#9~;=NpzS=OG)>A#}>>5n}J{N12&m@@HvDFB6LtQ(A?1y6Oh^lOHS zD5m$vv04J7+%R&;hY(#dR>}0T;!~34!*FLr1jRzR8&YyoWDT>N2n9CX%to~T= zp2owzI8vj0tAb#H%PGo4Vmr?54Oz%g8KaUyK|U`U1?@cT&g%lyOkY@vMHc6<2+cI# zf%YyF44Ad!{D$VFs0w%YsgS@KMMyoVKjw*n?lX@`krFzPOF~U8X~U93E2;<#Zyx~S zFyMJg&CSTbXJKMWrPzC8tm&M!<;n4p$r)3fgGvp80h&s$>FK~XcTA4apW8tGV!%Tm zVy&X6QmEY$zjWUMP$*pC`Lz@U`+~q#V7!W-|DWP#$v2X)PNGGAOoXiW3#E#MUZNV8 zo~tp&`PwO!mj``7QwX|{|Gg3%lKlB*xz6I!X|)+$xBv1z{nK4E zzhukmB!52^9=%W@C}Th?-lIO<=<7BdhdK4j(e?z5Shnnz#A~<($aFCrenNt{-;SJw*GrI>wa`8g`xD&A{^E`;pmv?ZqsujnQ%6) zRbib33>hLg67&txjO826{+E$^9M`;YJz6sDRxK5Nk||x41X(d!8Q8x=1dFC?Jdh9<&o@7!!c z{|$PMj(`(_?j7VQopVICII3`q)+s#g9mHF+6+<{{k2k*aaC4KNj=>#|)UGxx&*QC` zfRC;6>{yQ~ZPG`|`3d!e1U^Ds)SjEOPuMiUr^({Xgds9 zL@V80-(HBU&eqy~0#iUwXXk1d@z~lknbv=6r}>k4vNR&k(tIQdH@COQwYez&>alcJ z=7V7ojpz|C_XP%%jz7`3DGQpq8(?jmU`s!G>TdhH7Sj1Q{+5!2$rs`RxwC{BM!gcz zlAnJ)navvYF;2nYzub-E`~=AfN)*Q55N*yUI@YgR}H z=3zF)jj@n$wL7~F4$aml)5oj*?7~9I{LhzSVep_+b)jl8*vg?c1+_i->ZF1Q)NF4i zF=hd?CVdToJQa4L_>ex+Z;XtL5?Wddh4uCInt*`;g@vz1?|Q=w!*Pzb`5?4R*qSxy&|9 zDdjv|SeCuRu_<6UZwJIhhrqxdLcFD`3~1`HzwgnX_;5qDsUNN>{k+Jh$ilXWzcDOF zXOM`m^GsNOqS<1KKqcyTv+%~S)TE6WGvwMbSJS*CGjZ*JCnjppNcXY99x8 zc1;QA!>*CnWm;@puvfI>vPUkd3X>^LJM|(CtF%T4%@;rEmplKQwat$eqH}$yB9m;% zBP0YdG72BZ*bIdah5ne9{1E11&PAk+jvmehs>WL}_2kIf;-z<7JAL2smZB1~=E#rT z;l@H*N^}qK+ZWGu=(7-<>WL(lVtm7dU0G)JVW5CkWet0I@q>jxB6;+Ge5B> literal 13981 zcmW+-1yCE`*Tprs1$TFMx8f8lUR;V7DDJMsio3P}f;+{6yF+o;AMXC;|7B*glbzY* z?R)3ld+xa>F`DX%7-%GDFfcF}N}uGkpy$i~9Vkf9cM09&6zB=n^^<`+3=BHn{|;D~ z>|7x9BCNZXq6`dplI$4z0l`*UO&SKK?kD=IIU)><0FRQKw2n9ISstptv31+WX2WDk zlhQ*Y-#Qa^dzpO-M`O5Fn~o+nGsl+hniPIAYjm`hn{;Pv>(1ZcqmOzd#Ik8EgxPd~ zi4A^4)OF_d6oFMoTc4?q2P-Xvc6z6DrE7mlGMmZqtmD1hhX;vOzl|?As(rgY`C29> zFySz~mnk27*;`1xtqTb%k-z?vQ~&C!ff8$+9U}%5pG$7|b_=?bM{Rb@*R3aF&U*e7#3R zk0m3q8pYeeQHgy6C8t{r+?|*+u?+t223FP`6ahSQj} z6H&^S%wQQ|uq&Da-<|={hmI(`Seyw9d`@EFe83l4b7Ji)Q=UKCpLO;(1^C|)WCj_W z{PCIvwxz>q4t)9s6fe_B2cl$5JJPT6k9~L$r!KAYk<6bjKamGx4L$N>m;}r8-LC{u zI;Bvs`)lytlU)4^$Upqgi|jM3n@a;*r2wtv`D8BH0IurKUbu64suhp1@0{Ug->DO2 zqJQA;2_b~450+h_Y600;P!~Pv1sG$OFlFWLyidvf50b#F7s||rROJwC@8No@FwiJa zhctA|VXk{uC^l?2ujB&^R+(r<+;Bb>^N{CG5t~vEAyC)FcR~qN6xkpSy#OW#`N2tu z;=k+_zg!yqX(*hUIoN4wlsZ@33Z?AhZt{N8g=n&#oSgh%H|@+ESevK~_KV)xv2a>z zbqg!Za7(l#$S&`Kfy+egjgOA&qg6SP7E8dEb6~Tf#q>1aPa}!8AZLdYhk<;S(?o*0+7$J#BSB>=)B42mgM`!K$ z+66`Z9^dOM{qDW65cGT2RqgHVVXzF^&vRgl2n*}JqE!k|B;@@^X~0c-eu5)*9un-; z+rF^%H>j5ujE(@;fyX@>HTf`Hzdvs`Bx74-4`rtP`ji5AKxXF1tBX8%o$sZ4eYDQ?1U zxuz(2sqd^>cJ>5D!W{^%V0}hOqYm1RIFV9Na11v`Fi+k$_RyKz;_m6ttapo6AKG?t zj$8;t{&&4^_oHThX|*hlkU#+aAl?kti`(_rL{-&)H?M(b?w^=UqB9uG(X|d@b`{oc!1pug`OZ-DSML#s>Dp5|F0y@Sdr@2K+n9v?+`UK~1?37;vu$y}BxqGvRgt0L9PFlTz|pGwR7z`G;3G$+@Zzi=t{JeH zAwb6Ld>NHeJ};y@Amy45?&H(ef}JxS}j4oV*;Rk!2!*s#Kj**J1n$JfBIVM^fa{%;T6QZrJG!7au~`i z{~*!di<`c+Dcl_^9R;>69U-Zh6&Bn--Db2lues^>RG`v-Pf49a$6jBD8RJGyxMZVq z#@=kN#&#j*d&O@CxwifxR3cU6a?%u#5EacqDjC<)wZswW`f09GVJI-UX&w$7(|q*p z`{L^iJRjBMicAnE^vnv2=Nm@hI$*Gz+ zZUCtR+zRYi+PR&82$!yS0c19uR~ONl+Qh?wZR%W%;fQOfdNrov2>W=^dj13z=WE{a zt9o!N;q7O#(HEvtfF-(2_0PJx1agY4FiPF0nnqo~LwD?7MXrJNJ)=KA8wA2eogF+r z>g)HA7lOf)OKWRlJq^^IO?Yh4e@!V6?8fzFOw`tSlzI9zEzpqb??zF zb(_N$gxA+6l<-Y-5dHn2>2C_#A=dU2KWPa9L}VA7I)rgNqwxuqcKV}_eqU7e$d%O9 z<<9yxjO~V}tQq7^_Vi-VaQzJd0{6}}@4Z-MkeZ*C=1ab|m$S|AbI1WV!M5O3L_<)3 zqRn=@FM{mw9{bY|>u|^nC(V*8JJ0;#EVhnu;`)(hP~yt-&C}D9Uq4JF;w$y&D9Dxy zDeR@(6nPu7SEX7=?Ua1zsiZuHNLXp%rqJpT3rYL%wEdYs`muzMjDW_O4)*2k;6c;b zR}rA8-*c9D64Vr2YnSsYm`dC#Qha)3(1V_Q#QIkR-3;_8;`% z2`-f728iz;Al>g9FG%IXN;S%$6Ar zqXfoDVy~+8Vr0A0Z=EFsT>Gvju1i|TvYfTmj%CHf>d}?yhN9zYsocwt{ukEBXw-m4z zPGLgNq;_j|B(VERn*;)=tlX{Js9%#jY4=8{J9qA-Qa954Adz^6M11cRwcbujj+&Gtr*@fp4fh03i=2iRA5P%7GX?`ByW^!R0 z?Jk)>N3dhkw9tGO)wjL)lH5yHTNeE;V{dn zD=TTqX<+NziS3LM^3{rj;{#IIyJQL7GRreg`_Z9PXIr+-D>jiU^+Y;TSp#{-6Jr=M zR$yp_@LA9n$*z`P2Mde9+qh?5wEf9uxI9J3l1rQ%n<-x%n5wLS-t=O2C$(wKlm!uHV=!P{P4R8Sc8OFh}kG?97$v|5k5p{im36 z`T{}Kvv(Wv>l9x;%zNLXb3Q!oJ}vFusYr9quou9jX<`?S{^p>27Z_?X>SZN0*n&lD zu{KR9w{~H%B}H|26YbTNP(f=?&4u!yB-WkbEL!sTi3=XHJ*=v^`F?8Kbv{(|%|U3E z*p5^Xi~OX7Sm)V8b3tvrtA%+m$~cP#ZA?v2u)s zhd-*Gj~^ZGv-{VCn3o9jx98Iwq&Bc0tM7u*-$#<{sJf5fDO;_J(H-jzTI|a=RJA== z-7*3SW(K_r6r`{MqdE)ul%ud)AJ`fLZC)N`r40~B0ub3P?f?H^1ZD5bf$2h5; zSK6uE-dq$Cy?^ubw_GcuHNy#!1Qg|`gX~~d36^JIfB;h9-NKisvQj|1(NYuX=gm7; z?tAZiKfx5;AVR>LG^kRL%62CJM}v2}tw}`vKM*7etLB7tZs}eLU3G_?&u%&|yF3tW zr%ZK+LVuG|rhf`8@)%*}_qEEN8pV)yc94j{+&HDR4Q7rk`eKZPR6#?}{{FtDuI@{E z`SI5tXP)Nj#NBsjtSQpKXgt=*1e-%5F$~h_gNi{r+4ln@OTPK;4$jWbYQ-58FKLLT z^;R*MR~w1m`{+m1sdfBq;A`4eaW>O~#;2FfkFKfaJY=&eQ-^}9?+m3^ccY`DpJ{rJ zc?nxfORc=QGQYRjlL!tA8I^gQGchrFf96spl5%3Br+=e#ExW0$q!BVYxUpYixK_pv z=!2^<>G)yy{rgJZCw-IMp09%{A2NzhVac?LT@1kTI3^aB6)cErOWMZ4qcXO|XEvLl zE-;wGJj$4%Gnn~+Uv1OmlYRi~)i9MKe`1OM)P3HrP&^#eH}`^< zVt`@iE(?%-xvn*L$~q257si7w;&IsmEe~&)WUx2$K^fx7kDZ{F@m%2>pI)wY0J{`L zj9eEcx<99dIUa>)nbT^^R5rhR*(WO8S-2YgI*X&N-jU6Lkq)F4`MfXdv}M;NvQe1T z_<%Y1q$p(8SFZT;Q@%x*h0?6yUVqM+o$c_3o<<5zims4?dr!wbfo|BACn5s_+5ElC zjAMIc71kRy?H9!FoJ57<%4uvDa{jNYa#>WI+iYCEojI2c&f%*m@$9kBYZ_(o_1;;g z)a>l7u=}IPR9obBc_8!5uQE&zBXTiOc!O{*D~dPiiPrMXF zfVsG7HQs;!cDsr}&t4HpC7=8JX-Pbt^Y~dG2pX46O>nrW*|^r@T@0@Ea^pD%FAjC@ zWjY_`mnijFfaMuQ`v#?|eq`y7Zo0bL^rP+oNJmj)qeuLawXaD}qaj??ncAoIps+>% zh-j~NusdaflWC*f=LWM(gu+@^3wJ)y1{OpsMgT;G`5wJ_(XDpN^OwVH=}rPG&X2X3 z?>}Gg={t|G@S|;_PnMkJM(3JrZP&wW=Nw81e9}|}3(L2I7}L@vi>;KDl)bdH#+qVY zha4RMW7&r1zBnSHPd5P|wXiUL&%sXUnmA1;sF=wD!O;z40A2M4 z3lVPQBS!M^^o)~#=V{9PX8|@KwMR8qh?_yqjM!p317E%=XM;?=^7DxodrJZwLrP+il4c#Nk zb5}%Dln+^Kfj}&>%GR)K7re`Adb(u;Zk@AI|cZ29k8g~rN|0|9pc`JOY`+`L|i38$i# zKy17RW?w(&+_c#Yyhmm5ml`n1_RSNeeEkUzT_ygKryh;V-BVv*p9mr6+}GiW3Gr~% z+o^4HuuO*ngJB>IiKpcIQ3-wE%!Efy@NsjGlvD?K#JNm(+weTI^&|X+^nGH(glab} zC#Oq}6Ki*`b~ZBuUgXL1)h@hkoO8Jmg0ZP-zWwS3JBS5bri*tuYjdmV)zWAM#skc0 z{QJA=k9hW0_V}G$S(?ghgQ-1>gXl6}+z$@)jZFqi?nd8w2kT!P8+mm~SNm@}M;$Iz zN$aZ}va#m%&7x|Tut>GN05CHZFx2!z>1sy|>Zj$kJ-DXx7!NkT z|L-4;?p-&6kzSa|AN%K5O{V9%a}b7CR&ZryC8J&Tlk7Z%!AvmH<2f}s`Ubg|3qF2r z?WS2Y@g``xPg;Msw;dd0GymHSPhN1E9xm`^LQq>wqXTx)DUE$F zy%De%U?s$68jk$Tvi=H%H9nmik!Ij04{lpFC=5Z3<>k{8k6D7Vd#BNUOTb89*}%X+ z_BZNKb0jKxd7rzYq(XWZ((q|)^wY1Ru7&22M;4R%Jz&;Y50e+%=R7Ke)uZc*aI-t#t;7)jRlOkP~q7qUsOZDborKzZv!@8V)-5K5%^N-zgS zXmksUn}n``fv}PXbp`v@&W<78d2fbUK!x^p_M)C=?y{x4{9n-t1_&L{#e!AAn>b8; zR$SxB@rzBVhDy&P_j9XT9jV89>z{z`(fTzPB0@rE0sy2_(bUuw&-k!=$NtZ0dp_u7 zDUnq0{2H7M?3#lcl&mVY3iqw~PF_DDd)Yb!WvLz}i>Q(2i9-TI$u)M_i=kE*Oms~W zUC^A%H-qS5*mJqvK($h{bAM`Ni4cbNSq%C_}EvD&$M4PJ*Haj(m7G^N+`fa$XX%qFNitlEziPCR* zo-SI8CO%lof7UL$B_SJXw}cj1qKFVK#)x#=KQ)q%AEh3G5O;pfx+lKIG|tH+O!Q0! zi!ZuoNRL-cMoumDO|_l7d}@+ALg((~ z$Bx_fZoqPPs^lh8!bcxyB_x-7;HiyNc8#&rWD1DN37Rsn zjXV~Mh=`bAV*VTL>q_uLTumEXS+(Z6Qg_LWn42Z+pHdvHv2Blw`-NQ#^z)hp4dDKK z)c(-yG&EY4W);yOt`UeJ%wUp>RDoY>|1G2Ux%mNm1AW`|{97;AxIO#@fBfTv4{&gO zn6b<*TR$^9JDXiSEEP>Cu%PC_pue5rz3A<7i}J8;65xJ-5Z24WJRnkbrT};6$o%Wi zm#+by6+@p2G<*2AM946M43-jbOZHTj<&Z@}Xo9Xq zH=oqgkLVcjFPH058G23v0snZEy)ODxKG;~Y7wLeJ$GC}P!mY3d$JNUIQu|`7>3R8z z&#iEY$n)2hN5qq1=;V=qzHZ;xFJSX!BtUsmVF>x}ehCbmj%h-Snocc`lwF%He~C@5 zTQnkw=cL@RU6i%Y$M9GV39f1dGv{Ws%-@^Oj!H+I$garCglF<>tj~5D9Nqtr^<&Py z4l5KyDUK>ImWef;gL77#YYb`wKUD3u+U`Du@9pi4U0!RGzrAw9ad2`*F)tDARBF#` zIU=k~P37lJg$bzRnJkg#D#mq|hOnD4W5>#u-MRtqCCb%u7Ii*<{#<_ACA&<%?K4VG zD(Gx1;`wbzY{SyR>;!SzXp%Mv8MO+d{Li(o0$@&U+SN+OPe55on_C5oJdpan!t?g# zr0(nQWN$@3kCwV(aA9!+6sfC19(G64Q`(hwSAN5o^z@#AiZ1sb!NE9EFUhUNZc`*{ zc`e3E2gD4-4>OJ8KkuJ3!QUS+L z5exZ%?Q)u6=V?#R-4uEiZ|hzT7)-T{@t#e|%SYo}xFy}OA_zI3E#ZD?Y+T$#D*2`W z?pX5~K$pM%YF_FZw9#y7gfK@h)x#p9XmVUs?k7_6H;v-a?bd}Uc8R@m{(&(iW!#Hg zQLpcp1Zjn%%#R=UOr4!?azibsKqtrea%S5BjrtB}Xm0aEoTG1SY)pgJPi->MzeD!q zS}_pr9n|YUyD=UT#ZNhv=0bV3oPK{xL2y@oP{#OGS-rgp+Fu#8B!|rj} zO&nmtk0_Mg3J~D$)!?hvq^71?{>u2$jml2Z?~Df4kk-{*C{X94(GvGxR+H%w!vTMZ zwf@I(ZO{~YT+$kOB!)(U-qDOI$9Hn>VbWF|;CTDw8qbh>r0+S5%^M6~?}o80;Zx0L znGc2K5>WX2wDgqwW^~O~AwXKyzb}V$esEABEwLXVHZUn95WPHG@hi6~Cy(2X9Ii8S zJWKe07?C0D;iTkZ8+9yglh_w1EEEtp7a{=UR-`CtE!N5k{`Oeb)UwkYNIWE(NT^I2 z?>k4uBH5^6I>e>QxqE}LiDcqjc8egk%UxYPGczQrF2C(9#O5NU{G}MF^D7jlr{nqJ zBBAY1zP^~dB06*P+(S8nhWr2*As!PFWz_1};s!*U%y8+hSS!K_{VYsajgQ5au3z`t zv^w%LJUb6mEapRQqzDi$)R4`KO+<(PO%&Ak6XcO8Nt=i&ig$Zw=vK^DaKDGsF8i0HMRaySr2Sjo?ydoya$FiEdu- z@&2F--Hv_r-xgR@Mwd+un?mj}WJ#fy4SJw8#Ppg6=)~`f?!xn9IP-Tg)0YRw`eN~z z0WMXGVh~4l*1Vh>SGbsOZz$pg#veIy{iJq#rZO7?LL;k4C9b3rkv*aNK(X23Bkpzz zvcOyMQJI#B;7B%)Z)}93dCUgTB%(kzWFIPnB~=MFKlS+0E?r+H#*evx9CVcelv8CX45oV%lG!#gnjvxgu?Ygow^ngWCx||z8T@}*TQk3a zEHe?p%NJv6w%7u++GW!@zdC~gyD8!H9_Hf7z1=UvQSo^G2YE%llV;7nEM=u>$CK$I zS$=-FEs={mF=py5eEhfuC^bNhGLN=d@+|RIHs!G{!r;e7k)v8ayR4uEfoNIT2mgoZ zWE-8>K0aA`T*HubLKGoJ#-UJ<7lcKy{|l3jjixIbFj9%h%+Wry17#t!Xs$60A0=}m z*c*!`VgbA0Nj<9-$_DBF_q11Q?o+)gggDAp)K97n-}@1(?60Xz3(Mr8TxzJfv40X5 zieP*`NkTdj=K@+0U|bVAuxZPN+BjQmCG=5f_96<7?Mib_hm}$c$Nxse^l$BbJZkON^9J1yaHV5!j)!{?&(4;+#QT*;S5uNX zE?}>cWOc}~)Qoonul6v@if2sC8pu*JOG-aA> zV*A<*MS;2ZCX*5#wE01`^(dn}N@D1Y&tIM#*ezmMt+HsM-CYOZ{G zhXxSiL>#Vf5K&#->ex*ow(@+>MFX)JatIyM5Q-2!NYZMx9^ctRb%`H8?hf&P0Pk_2 zM8PmL`Qny{a~VNo3e?smx-;|S9O#>Vq=&wY)h#j+V5m7TwhEK=*(C}HMHPC|$`zjM zXgy5f>r@IfI8hK%{-N=z!olpW=&h7ldC=`J4Vg^)jixc*C0b@kkMl(gq5KX|hqkVm zq2WNc)c+!D_rc-16)w`%E%Tnmx}**f8+|H4j%F7M*S~0Fd-!GSkSabyXq~_)!iBFK zH0QSF*+_`Kc6^0>YZaZPq6}4pq~e?!_N5@rr^-GuutWq22_Vozw>OD4z7tbg(8BZG z=@TY>hD1nPIKP~s1S%my(ZO(TSd+dpe@fok`flQahdAk4 z!s+|8&rb`5rFi1zg+{q&r~SSDl)F)IfHLgGYRiQh^ZL+db+qGlZZYxoj|D|a_A7Mg zcc$6#Wy6YQuMwi6*9c>y=vUxh?q__ZP{4IaDF3rcZI!M0Tz@k~=>dkOWW}o||6>$; zHGOkrimUCasw!%JeH#dZNvDz?mU+lf&$ZsTSgq6!$z8Fx= zqh5q=tIl#rVcV-4aPv3A-xV^=IX*dg&{jfRjvT@$mV0g;d{>6+LQAoZiJCb)HD$8h ze!t7LjW#c7qBdO4WC3+-?3 z|F(CF>;sKm_Hgl`2V)9oRL^$<6&9V_@BY6Q^WM1K7CM&0KcF9f|HpiVztah18XrBf zckQ5nWD;&mwc!}p#(YS=UUP~q6z#H(jg9$;n@1ko=q!*&W_oe0@0kqlO1*><-ir!A_uIx!gRJ$-R5a#w^QgydOmwlQDy zr;0qqP0W@jU@ATlXwpqYp5T@-`*z( zJ$9RROF4#i+cq!9d8ZzS;)x|;;V7!?`Qo)IeLh|)2;jR5T!mEKZN=mBcTm)V4{wMC zYfOyzp~Z#!pp~_C8C6Fze9fq<$<%$P{@Kf>q$TWBzPRYlLr#z<*@X)etNhkq6MPgq zFDh1XRp>nmg?+qms8urF?TuuYq|n}xOZUecFCiDV^(cOQ*H5Yv19Y4h0{J&AtFpu0 zCf*-2#5Pp$te?~?|o}{{pRS;A);ShbL%GnUhGGeIg;Komc%ElAOee`>rZ-SOmqI?WdRk}It zUMo7&=0ZwME35SMpheJenM)eVeyO3-N!WFAYi2$qm42*4f|K(ilO!kuJ(G!z%~9d! zRdm|a1jaXcZ!f?xe=SIpD7LOrlSgnW?o_Be>+|7X;B#4ciKo$yz27o+tBOKfN4VP&1=7 zdUxM&HL!M~5Oj1uo~v6D^I3qA!qn)5#sav)rDEYlO4wHvtIbDX$qVnHACWUVVPdb#;AW?n)k?i;5_Vvu4_1Fi>QyZ;=S1k7^!HJxcl~aMNsnR{G&hriPv1~X zdjp48bnxHM1B0&bYDdNINr4PAGoE)^z}A`CE^zsuppu*j^&kE}V=HQ16^Pj`G%n$> z%v5**Z#e`61aZ*7XmPgEB>UOfq>71U0({-<#LAg>!Yl6lW@z-QLR0G*p3McAH%?{p zunv_2+ccqCBC=sCzTN}d(l5T~D*}k?hbL(2cJy)(8e>W+#q>V{<|DdczL;YN4iZwY ztu{NY-jiqyK>%`#)s+%o<~qBnZp82iTPK^>r||Lj^zu&J|KbKEl8ZKTliX2A**w=Y z{#0Fk(qi$7rx15;H_L=o(AE6~3;%;aX0(p$?`P(`CTO$Aw}ZCetO;TE6>3|cTJOL? z&ls!_)IA`Myp}TfH~1N4+W;g8!JkzRuY?~W!(4bK1#g4 zeV;j)Waaf-?`kM7w~2=Sl9cYkMj_}q)(leq8wBoo2FJ?LREj=7nR0I9eqzyx=0WHg%DYQI$Tr9AkAy3Kv3Ay@1cJUom6k?G0THT{v~=&Y>+&Sm%cKLAQ{rMqaVnf2#y;kMi2**^&nV#z%9}uYjE+uD?21y| z2tnfhOk;{H5iX}l9b9^H0%TL^2BuFkx1 zeAU`d@u|GXc6~q$n6a!eu*>h^{Oqg}i%Yejtg(^LEc+lJw%7#g>cs9w!^WyKsInyM z@FCSziRM)rT)y8$823+7QTj!#ol$FU-oazNGXQE@`xk2d%;o9nDWS&8i7WHL^dr>{ zJ9T$hGB43PCVc$*V4wM3^a9}>2W_Ng$kIZZEh4QHQYGtISZbDlFC`yPZsWGR?p7}$?aR8oHnxxP-YM1moe6Pky`=qEN2b_`=a@rqCn=j~iHs5WAu--P`!ZlKV93$i=Qd9mzrL zE6PJYDjvf)9w2oqX@;2B#vfr^3Wp)Aebo zNwjDavC$%@JO*tw{h<=-4$11r1-eH#jGX9;8TJ$Bun9l(ih}SPaE;hPS z##B``WcG_cm(+9esO@5Lu~<%1%sZ=(}(gD$zCZ{58y zIbrJ_jvVTH7sgAz_;o{sB)06pa?(QX$%KT2jKa4!oHG{$Q#`oNEJ1%{*mR@}J=KplPzivAF-%{2Jv^%@qYxc~ks@;LYFN8nOkNC5u73^Qz z_RpZnO!|Erk9~ERt0ENlcha=R3|JxxEgGxNnK!(Hjxg@+N=K#GgW#=eUdzZR2M5#W zYp8lRpl;SgwXx?>J@+yy*_DZdE!UJ0Se{yCs4KwDJn|v0x?o}qr>jd&w>M? zji91s3Ce$c$sTb;xW=M(&NM?fSn?$aFQUAHoO9hpqTA3;i{iKJ3l-PY?kM%IQA=c= zCZ7}UZ<_l0*3>l=mUIEj+mUHo%F4=bSSCv@idZ7)gcL(#xI{M0CxaR}kjcQ3(Bu^pm3Zi zWZ+v5#Nm^Nc!zt%hj8|WBGl)zr_Pfk+9tpBOGEiMFM+Kga*|?E&!^w>th;c~4;Xd# z4Owyvu@lO4Jh%H;k#ov4claEHYtDECd=%w zN>uR+mDZ%Goumb*FRp3`(VF{#H#SZM-g5Bqx^Uq%dFvH{{tx!e?5D2v-}+*X2HT1U z6FFX==&;$gcK_cac{TB?HJUPvzT9m=N#_JI;256y5j(y+md!8uuQPnM4?+KhG(&l0l)?hr;l6{K6gJykW-n@)_5Dz|FUqCXL2*!s15?qUvCAoNO-sr*mrUpV%O&yX8M<5?rS`(geZ4K9$-m67TT zD?k68R_juM)ImE8_Z1K&o3H{m(Q@vxZ36q+5=>gHK>Q8a_&=n4O)Bof{`p7@(pg8N zTx57Z=I^9&ZvO_i*$s1sd->Pm5?c|>=QyD)96hM*nQd#Xu&N3$g27L@AMuk)<%zQO zQYTP34hyBo)6|+=-HAEH%sP>Flwcsx3o7?3%5i3pA<=lGic=u5#!4VAS!0SZpnS=a z(q8XbLG$SOkO{4a>*K(T=v*S=7|S%lvl z2JQvII|)`r8Z+*uz0@=?e^CCGYTYBwi~H|NahrjtXGc9!GirOLR1B$KW$dmqzJ3}n zvdD2{Y^;(f0GrU2sMc}_6Ke8KfbdUHlz^Ufy^rDMQ>WxF&S|MF8P^9#7jingW)<+!i9ZpBy5(*O)mj$kW@q-P7|84T zoQ(6U&CWlJPi<+Hl#*X>p86LA+rJ_0ULx9$GVxy`%@D`fcdzF+rHgP#!i%(a(8TxD z2sI524a|r=;mGZTL6u>kAD+3rQY)=nq8(fiiCM{DB@AZPYFN@GiLy|MmL{g##me6f zXTP9(EB&6oFfqi=-$nYfW1XrFj}K`|@-Eu1jrnHD__Tsn>9C5OgcE;ASDNdmpoFiT z2s!g&F!ZkSp(6}D=q5FGR}`FO5#jJPg0%+0FmH&F!| z=r=Z^i1N;f4W<+|Tq>4;b{FL zupx7+VyIb+dO8F(JMx!;6uoSf;mZV_6E_=%ALNwV-xCGSsc*BD^2MbXZ#CLWfCfij zJP9v^Z3`iijUR|K#tTPiBSx_;!eZ-?9Tne_54-v+@*ZQ1KGZvWLC@bwxLyFA-~;p9 z`o07mc<`hRvPffIWRY{698Hcrw Date: Mon, 6 Mar 2023 18:07:32 +0000 Subject: [PATCH 073/113] Added displayProperties to external source and display them --- apps/integrations/src/core/action/types.ts | 7 ++++ .../src/core/webhook/subscribe/index.ts | 5 +++ .../src/core/webhook/subscribe/types.ts | 2 ++ apps/integrations/src/core/webhook/types.ts | 6 ++-- .../typeform/webhooks/webhooks.ts | 13 +++++-- .../src/trigger/sdk/generateService.ts | 2 +- .../app/components/triggers/Trigger.tsx | 22 +++++++++--- apps/webapp/app/models/workflow.server.ts | 1 + .../presenters/workflowsPresenter.server.ts | 35 +++++++++++++++++-- .../workflows/$workflowSlug.tsx | 14 ++++++++ .../workflows/$workflowSlug/index.tsx | 6 +++- .../workflows/$workflowSlug/runs/$runId.tsx | 16 +++++++-- .../registerExternalSource.server.ts | 1 + .../app/services/integrationsClient.server.ts | 4 ++- .../migration.sql | 2 ++ apps/webapp/prisma/schema.prisma | 1 + 16 files changed, 120 insertions(+), 17 deletions(-) create mode 100644 apps/webapp/prisma/migrations/20230306173131_add_externalsource_displayproperties/migration.sql diff --git a/apps/integrations/src/core/action/types.ts b/apps/integrations/src/core/action/types.ts index 3d4d5c0a578..c59285365f1 100644 --- a/apps/integrations/src/core/action/types.ts +++ b/apps/integrations/src/core/action/types.ts @@ -1,6 +1,7 @@ import { CacheService } from "core/cache/types"; import { EndpointSpec } from "core/endpoint/types"; import { HTTPMethod, RequestData, RequestResponse } from "core/request/types"; +import { z } from "zod"; export type InputSpec = { security?: EndpointSpec["security"]; @@ -14,8 +15,14 @@ export type OutputSpec = { export type Metadata = Record; +export type DisplayProperty = { + key: string; + value: string | number | boolean; +}; + export type DisplayProperties = { title: string; + properties?: DisplayProperty[]; }; export type Action = { diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index c8f6e3290d5..65f133cbae5 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -65,6 +65,8 @@ export class SubscribeToWebhook { }; } + const displayProperties = event.displayProperties(input.data); + //is there an existing webhook? const existingWebhookRow = await this.#getWebhookRow({ consumerId: input.consumerId, @@ -85,6 +87,7 @@ export class SubscribeToWebhook { return { success: true, destinationSecret: destination.destinationSecret, + displayProperties, result: { type: "service", webhookId: existingWebhookRow.id, @@ -131,6 +134,7 @@ export class SubscribeToWebhook { return { success: true, destinationSecret: destination.destinationSecret, + displayProperties, result: { type: "service", webhookId: newWebhookRow.id, @@ -208,6 +212,7 @@ export class SubscribeToWebhook { return { success: true, destinationSecret: destination.destinationSecret, + displayProperties, result: { type: "service", webhookId: newWebhookRow.id, diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index 7ef510e4e09..b56456fc7cf 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -1,3 +1,4 @@ +import { DisplayProperties } from "core/action/types"; import { z } from "zod"; const OAuthSchema = z.object({ @@ -62,6 +63,7 @@ export type SubscribeResult = | { success: true; destinationSecret: string; + displayProperties: DisplayProperties; result: | { type: "service"; diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 5ee9cb2ff0a..c0c173690e6 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -78,7 +78,8 @@ export interface WebhookSpecSubscribeAutomatic { type: "automatic"; requiresSecret: boolean; create: EndpointSpec; - //todo delete: EndpointSpec; + //todo unregistering a webhook + //todo updating a webhook to add more events } export type WebhookSubscriptionRequest = { @@ -127,6 +128,7 @@ export type WebhookEvent = { examples: any[]; /** This will be used to identify this event, you should use template language but inside a double quoted string */ key: string; + displayProperties: (inputData: Record) => DisplayProperties; matches: (data: { subscriptionData: Record; request: WebhookIncomingRequest; @@ -136,7 +138,7 @@ export type WebhookEvent = { export type WebhookEventMetadata = { description: string; - displayProperties: DisplayProperties; + title: string; tags: string[]; }; diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 774aca8c143..51eada44ac5 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -12,15 +12,22 @@ const baseUrl = "https://api.typeform.com"; export const formResponseEvent: WebhookEvent = { name: "form_response", metadata: { + title: "Form response", description: "A form response was submitted", - displayProperties: { - title: "New response", - }, tags: ["form"], }, schema: formEventSchema, examples: [example], key: "${params.form_id}", + displayProperties: (data) => ({ + title: `New response for form ${data.form_id}`, + properties: [ + { + key: "Form ID", + value: data.form_id, + }, + ], + }), matches: () => true, process: async (data: WebhookReceiveRequest) => [ { diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index d2a8afdfa9f..7a0d25941ac 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -217,7 +217,7 @@ export async function ${action.name}( inputSpec.title = `${typeName}Input`; const outputSpec = event.schema; outputSpec.title = `${typeName}Output`; - const title = event.metadata.displayProperties.title; + const title = event.metadata.title; const functionName = toCamelCase(`${typeName}Event`); const friendlyName = toFriendlyTypeName(functionName); diff --git a/apps/webapp/app/components/triggers/Trigger.tsx b/apps/webapp/app/components/triggers/Trigger.tsx index 88b233eebe3..0316f8362d3 100644 --- a/apps/webapp/app/components/triggers/Trigger.tsx +++ b/apps/webapp/app/components/triggers/Trigger.tsx @@ -8,11 +8,18 @@ import type { TriggerMetadata, WebhookEventTrigger, } from "@trigger.dev/common-schemas"; +import type { DisplayProperties } from "@trigger.dev/integration-sdk"; +import cronstrue from "cronstrue"; import { Body } from "../primitives/text/Body"; import { Header2 } from "../primitives/text/Headers"; -import cronstrue from "cronstrue"; -export function TriggerBody({ trigger }: { trigger: TriggerMetadata }) { +export function TriggerBody({ + trigger, + displayProperties, +}: { + trigger: TriggerMetadata; + displayProperties?: DisplayProperties; +}) { switch (trigger.type) { case "WEBHOOK": return ; @@ -25,7 +32,12 @@ export function TriggerBody({ trigger }: { trigger: TriggerMetadata }) { case "SLACK_INTERACTION": return ; case "INTEGRATION_WEBHOOK": - return ; + return ( + + ); default: break; } @@ -109,13 +121,15 @@ function Webhook({ webhook }: { webhook: WebhookEventTrigger }) { function IntegrationWebhook({ webhook, + displayProperties, }: { webhook: IntegrationWebhookEventTrigger; + displayProperties?: DisplayProperties; }) { return ( <> - {webhook.name} + {displayProperties?.title ?? webhook.name}

{webhook.source && diff --git a/apps/webapp/app/models/workflow.server.ts b/apps/webapp/app/models/workflow.server.ts index 7020ae89f9f..7a2e86bdcde 100644 --- a/apps/webapp/app/models/workflow.server.ts +++ b/apps/webapp/app/models/workflow.server.ts @@ -35,6 +35,7 @@ export function getWorkflowFromSlugs({ service: true, manualRegistration: true, secret: true, + displayProperties: true, }, }, externalServices: { diff --git a/apps/webapp/app/presenters/workflowsPresenter.server.ts b/apps/webapp/app/presenters/workflowsPresenter.server.ts index 4aee6c9b6e5..32859333b46 100644 --- a/apps/webapp/app/presenters/workflowsPresenter.server.ts +++ b/apps/webapp/app/presenters/workflowsPresenter.server.ts @@ -4,7 +4,10 @@ import { SlackInteractionSourceSchema, } from "@trigger.dev/common-schemas"; import cronstrue from "cronstrue"; -import type { DisplayProperties } from "@trigger.dev/integration-sdk"; +import { + DisplayProperties, + DisplayPropertiesSchema, +} from "@trigger.dev/integration-sdk"; import * as github from "@trigger.dev/github/internal"; import invariant from "tiny-invariant"; import { triggerLabel } from "~/components/triggers/triggerLabel"; @@ -83,6 +86,7 @@ function getWorkflows( select: { service: true, source: true, + displayProperties: true, }, }, schedulerSources: { @@ -124,7 +128,10 @@ function getWorkflows( function triggerProperties( workflow: Pick, - externalSource?: Pick, + externalSource?: Pick< + ExternalSource, + "service" | "source" | "displayProperties" + >, schedulerSource?: Pick, internalSource?: Pick ): { @@ -165,6 +172,30 @@ function triggerProperties( properties: displayProperties.properties, }; } + case "INTEGRATION_WEBHOOK": { + invariant( + externalSource, + "External source is required for integration webhook" + ); + + const displayPropertiesResult = DisplayPropertiesSchema.safeParse( + externalSource.displayProperties + ); + if (!displayPropertiesResult.success) { + return { + type: workflow.type, + typeTitle: triggerLabel(workflow.type), + title: workflow.type, + }; + } else { + return { + type: workflow.type, + typeTitle: triggerLabel(workflow.type), + title: displayPropertiesResult.data.title, + properties: displayPropertiesResult.data.properties, + }; + } + } case "SCHEDULE": { if (!schedulerSource) { return { diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug.tsx index 93376cff9cd..48902960b72 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug.tsx @@ -4,6 +4,10 @@ import { ManualWebhookSourceSchema, TriggerMetadataSchema, } from "@trigger.dev/common-schemas"; +import { + DisplayProperties, + DisplayPropertiesSchema, +} from "@trigger.dev/integration-sdk"; import { typedjson } from "remix-typedjson"; import invariant from "tiny-invariant"; import { Container } from "~/components/layout/Container"; @@ -149,11 +153,21 @@ export const loader = async ({ request, params }: LoaderArgs) => { } } + //external source displayProperties + const parsedDisplayProperties = DisplayPropertiesSchema.safeParse( + workflow.externalSource?.displayProperties + ); + let triggerDisplayProperties: DisplayProperties | undefined = undefined; + if (parsedDisplayProperties.success) { + triggerDisplayProperties = parsedDisplayProperties.data; + } + return typedjson({ workflow: { ...workflow, rules, externalSourceConfig, + triggerDisplayProperties, }, connectionSlots, }); diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx index a0e56a24584..3f136dfc204 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx @@ -9,6 +9,7 @@ import { InformationCircleIcon, } from "@heroicons/react/24/outline"; import type { LoaderArgs } from "@remix-run/server-runtime"; +import { DisplayPropertiesSchema } from "@trigger.dev/integration-sdk"; import classNames from "classnames"; import { typedjson, @@ -179,7 +180,10 @@ export default function Page() { startedAt={null} finishedAt={null} /> - +
{connectionSlots.source && diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx index da513785e31..e68c51f8c11 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx @@ -19,6 +19,7 @@ import { import { useFetcher } from "@remix-run/react"; import type { LoaderArgs } from "@remix-run/server-runtime"; import type { Delay, Scheduled } from "@trigger.dev/common-schemas"; +import { DisplayProperties } from "@trigger.dev/integration-sdk"; import type { schemas as resendSchemas } from "@trigger.dev/resend/internal"; import classNames from "classnames"; import humanizeDuration from "humanize-duration"; @@ -165,7 +166,10 @@ export default function Page() { )} - + {run.steps .filter((s) => s.type !== "OUTPUT") @@ -292,7 +296,13 @@ const workflowNodeUppercaseClasses = "uppercase text-slate-400 tracking-wider"; const workflowNodeDelayClasses = "flex rounded-md bg-[#0F172A] pl-4 p-3 font-mono"; -function TriggerStep({ trigger }: { trigger: Trigger }) { +function TriggerStep({ + trigger, + displayProperties, +}: { + trigger: Trigger; + displayProperties?: DisplayProperties; +}) { return ( <> @@ -311,7 +321,7 @@ function TriggerStep({ trigger }: { trigger: Trigger }) { // name="Initial wait" // integration={trigger.type === "WEBHOOK"} /> - + {trigger.input && ( Date: Mon, 6 Mar 2023 18:07:38 +0000 Subject: [PATCH 074/113] Updated the example form --- examples/typeform/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/typeform/src/index.ts b/examples/typeform/src/index.ts index 6488c3c5206..7b41a2bac94 100644 --- a/examples/typeform/src/index.ts +++ b/examples/typeform/src/index.ts @@ -2,13 +2,13 @@ import { Trigger } from "@trigger.dev/sdk"; import { events } from "@trigger.dev/typeform"; new Trigger({ - id: "typeform-webhook", + id: "typeform-webhook-3", name: "Typeform webhook example", apiKey: "trigger_dev_zC25mKNn6c0q", endpoint: "ws://localhost:8889/ws", logLevel: "debug", on: events.formResponseEvent({ - form_id: "XHfDDtcu", + form_id: "Wu9xVIt6", }), run: async (event, ctx) => { await ctx.logger.info(`Action was ${event.event_id}`, event.form_response); From 05592e8cc01b18e1a17c320d1b2435e5ab3884b0 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 18:23:46 +0000 Subject: [PATCH 075/113] Added changeset for the sdk and typeform packages --- .changeset/many-needles-jam.md | 5 +++++ .changeset/serious-maps-exercise.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/many-needles-jam.md create mode 100644 .changeset/serious-maps-exercise.md diff --git a/.changeset/many-needles-jam.md b/.changeset/many-needles-jam.md new file mode 100644 index 00000000000..3c1d0d31b79 --- /dev/null +++ b/.changeset/many-needles-jam.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/sdk": patch +--- + +Added support for INTEGRATION_WEBHOOK trigger type diff --git a/.changeset/serious-maps-exercise.md b/.changeset/serious-maps-exercise.md new file mode 100644 index 00000000000..312ce19315f --- /dev/null +++ b/.changeset/serious-maps-exercise.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/typeform": patch +--- + +First release of the Typeform integration, with webhook support From 1558b9e28c1f744783cfc72e746cf567084c12c2 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 19:14:28 +0000 Subject: [PATCH 076/113] Added instructions and examples --- .../src/core/webhook/subscribe/index.ts | 7 +++++++ .../src/core/webhook/subscribe/types.ts | 2 ++ apps/integrations/src/core/webhook/types.ts | 1 + .../integrations/typeform/webhooks/webhooks.ts | 2 ++ apps/webapp/app/models/workflow.server.ts | 1 + .../webapp/app/presenters/testPresenter.server.ts | 14 ++++++++++++-- .../workflows/$workflowSlug/index.tsx | 15 ++++++++++++--- .../workflows/$workflowSlug/test.tsx | 4 +++- .../registerExternalSource.server.ts | 2 ++ .../app/services/integrationsClient.server.ts | 6 ++++-- .../migration.sql | 3 +++ apps/webapp/prisma/schema.prisma | 2 ++ examples/typeform/src/index.ts | 4 ++-- 13 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 apps/webapp/prisma/migrations/20230306185203_added_externalsource_instructions_examples/migration.sql diff --git a/apps/integrations/src/core/webhook/subscribe/index.ts b/apps/integrations/src/core/webhook/subscribe/index.ts index 65f133cbae5..0f9feed4b8e 100644 --- a/apps/integrations/src/core/webhook/subscribe/index.ts +++ b/apps/integrations/src/core/webhook/subscribe/index.ts @@ -66,6 +66,7 @@ export class SubscribeToWebhook { } const displayProperties = event.displayProperties(input.data); + const instructions = event.instructions(input.data); //is there an existing webhook? const existingWebhookRow = await this.#getWebhookRow({ @@ -88,6 +89,8 @@ export class SubscribeToWebhook { success: true, destinationSecret: destination.destinationSecret, displayProperties, + instructions, + examples: event.examples, result: { type: "service", webhookId: existingWebhookRow.id, @@ -135,6 +138,8 @@ export class SubscribeToWebhook { success: true, destinationSecret: destination.destinationSecret, displayProperties, + instructions, + examples: event.examples, result: { type: "service", webhookId: newWebhookRow.id, @@ -213,6 +218,8 @@ export class SubscribeToWebhook { success: true, destinationSecret: destination.destinationSecret, displayProperties, + instructions, + examples: event.examples, result: { type: "service", webhookId: newWebhookRow.id, diff --git a/apps/integrations/src/core/webhook/subscribe/types.ts b/apps/integrations/src/core/webhook/subscribe/types.ts index b56456fc7cf..a6403c4fe97 100644 --- a/apps/integrations/src/core/webhook/subscribe/types.ts +++ b/apps/integrations/src/core/webhook/subscribe/types.ts @@ -64,6 +64,8 @@ export type SubscribeResult = success: true; destinationSecret: string; displayProperties: DisplayProperties; + instructions: string; + examples: any[]; result: | { type: "service"; diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index c0c173690e6..3b57e6d7ff2 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -125,6 +125,7 @@ export type WebhookEvent = { name: string; metadata: WebhookEventMetadata; schema: JSONSchema; + instructions: (inputData: Record) => string; examples: any[]; /** This will be used to identify this event, you should use template language but inside a double quoted string */ key: string; diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index 51eada44ac5..e5b37308d75 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -17,6 +17,8 @@ export const formResponseEvent: WebhookEvent = { tags: ["form"], }, schema: formEventSchema, + instructions: (data) => + `Fill in your Typeform (${data.form_id}) as a real user would`, examples: [example], key: "${params.form_id}", displayProperties: (data) => ({ diff --git a/apps/webapp/app/models/workflow.server.ts b/apps/webapp/app/models/workflow.server.ts index 7a2e86bdcde..bacfe2fbba8 100644 --- a/apps/webapp/app/models/workflow.server.ts +++ b/apps/webapp/app/models/workflow.server.ts @@ -36,6 +36,7 @@ export function getWorkflowFromSlugs({ manualRegistration: true, secret: true, displayProperties: true, + instructions: true, }, }, externalServices: { diff --git a/apps/webapp/app/presenters/testPresenter.server.ts b/apps/webapp/app/presenters/testPresenter.server.ts index bff62d7e982..118f8197979 100644 --- a/apps/webapp/app/presenters/testPresenter.server.ts +++ b/apps/webapp/app/presenters/testPresenter.server.ts @@ -1,9 +1,10 @@ import type { Workflow, WorkflowRun } from ".prisma/client"; import { TriggerMetadataSchema } from "@trigger.dev/common-schemas"; import { JSONSchemaFaker } from "json-schema-faker"; +import { z } from "zod"; import type { PrismaClient } from "~/db.server"; import { prisma } from "~/db.server"; -import type { EventRule } from "~/models/workflow.server"; +import type { EventRule, ExternalSource } from "~/models/workflow.server"; import { WebhookExamplesPresenter } from "./webhookExamplePresenter.server"; export class WorkflowTestPresenter { @@ -77,7 +78,7 @@ export class WorkflowTestPresenter { } async #getPayload( - workflow: Workflow, + workflow: Workflow & { externalSource: ExternalSource | null }, lastRun?: WorkflowRun & { event: { payload: any } }, rule?: EventRule ) { @@ -119,6 +120,15 @@ export class WorkflowTestPresenter { }); } + if (workflow.type === "INTEGRATION_WEBHOOK") { + const examples = z + .array(z.any()) + .safeParse(workflow.externalSource?.examples); + if (examples.success) { + return examples.data[0]; + } + } + return {}; } } diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx index 3f136dfc204..aa09bf2e7d7 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx @@ -1,4 +1,4 @@ -import { EventRule } from ".prisma/client"; +import { EventRule, ExternalSource } from ".prisma/client"; import { Disclosure } from "@headlessui/react"; import { BeakerIcon, CheckCircleIcon } from "@heroicons/react/20/solid"; import { @@ -411,7 +411,7 @@ export default function Page() {
    -
  1. {howToText(eventRule)}
  2. +
  3. {howToText(eventRule, workflow.externalSource)}
  4. Return here to view the new workflow run.
@@ -549,7 +549,10 @@ type WorkflowEventRule = NonNullable< ReturnType >["rules"][number]; -function howToText(eventRule: WorkflowEventRule) { +function howToText( + eventRule: WorkflowEventRule, + externalSource: ExternalSource +) { if (!eventRule.trigger) { return "This workflow hasn't been connected."; } @@ -560,6 +563,12 @@ function howToText(eventRule: WorkflowEventRule) { return "This workflow will run on the schedule you've defined."; case "CUSTOM_EVENT": return "This workflow will run when you send a custom event."; + case "INTEGRATION_WEBHOOK": { + if (externalSource?.instructions) { + return `${externalSource.instructions}`; + } + return "Run this workflow by triggering the webhook."; + } default: return "This workflow hasn't been connected."; } diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/test.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/test.tsx index 43bcec41d99..c3fbc902ee8 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/test.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/test.tsx @@ -12,7 +12,8 @@ import { Select } from "~/components/primitives/Select"; import { SubTitle } from "~/components/primitives/text/SubTitle"; import { Title } from "~/components/primitives/text/Title"; import { useCurrentOrganization } from "~/hooks/useOrganizations"; -import { CurrentWorkflow, useCurrentWorkflow } from "~/hooks/useWorkflows"; +import type { CurrentWorkflow } from "~/hooks/useWorkflows"; +import { useCurrentWorkflow } from "~/hooks/useWorkflows"; import { getRuntimeEnvironmentFromRequest } from "~/models/runtimeEnvironment.server"; import { WorkflowTestPresenter } from "~/presenters/testPresenter.server"; import { requireUserId } from "~/services/session.server"; @@ -143,6 +144,7 @@ function Tester({ function workflowType(workflow: CurrentWorkflow) { switch (workflow?.type) { case "WEBHOOK": + case "INTEGRATION_WEBHOOK": return "This test will simulate receiving this JSON payload for this webhook."; case "SCHEDULE": return "This test will simulate receiving a scheduled trigger from this datetime string."; diff --git a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts index af3b0d1c7d4..386be9da042 100644 --- a/apps/webapp/app/services/externalSources/registerExternalSource.server.ts +++ b/apps/webapp/app/services/externalSources/registerExternalSource.server.ts @@ -160,6 +160,8 @@ export class RegisterExternalSource { readyAt: new Date(), secret: registrationResponse.destinationSecret, displayProperties: registrationResponse.displayProperties, + instructions: registrationResponse.instructions, + examples: registrationResponse.examples, }, }); diff --git a/apps/webapp/app/services/integrationsClient.server.ts b/apps/webapp/app/services/integrationsClient.server.ts index 9322590151d..9eae8c807b3 100644 --- a/apps/webapp/app/services/integrationsClient.server.ts +++ b/apps/webapp/app/services/integrationsClient.server.ts @@ -1,11 +1,11 @@ import type { IntegrationRequest } from ".prisma/client"; -import { +import type { AccessInfo, DisplayProperties, - DisplayPropertiesSchema, PerformedRequestResponse, ServiceMetadata, } from "@trigger.dev/integration-sdk"; +import { DisplayPropertiesSchema } from "@trigger.dev/integration-sdk"; import { z } from "zod"; import { env } from "~/env.server"; @@ -55,6 +55,8 @@ const SubscriptionResponseSchema = z.discriminatedUnion("success", [ success: z.literal(true), destinationSecret: z.string(), displayProperties: DisplayPropertiesSchema, + instructions: z.string(), + examples: z.array(z.any()), result: z.union([ z.object({ type: z.literal("service"), diff --git a/apps/webapp/prisma/migrations/20230306185203_added_externalsource_instructions_examples/migration.sql b/apps/webapp/prisma/migrations/20230306185203_added_externalsource_instructions_examples/migration.sql new file mode 100644 index 00000000000..1610e808ed6 --- /dev/null +++ b/apps/webapp/prisma/migrations/20230306185203_added_externalsource_instructions_examples/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "ExternalSource" ADD COLUMN "examples" JSONB, +ADD COLUMN "instructions" TEXT; diff --git a/apps/webapp/prisma/schema.prisma b/apps/webapp/prisma/schema.prisma index c3a71ee83d2..3990fabae78 100644 --- a/apps/webapp/prisma/schema.prisma +++ b/apps/webapp/prisma/schema.prisma @@ -229,6 +229,8 @@ model ExternalSource { event String? displayProperties Json? + instructions String? + examples Json? @@unique([organizationId, key]) } diff --git a/examples/typeform/src/index.ts b/examples/typeform/src/index.ts index 7b41a2bac94..7b981b534b6 100644 --- a/examples/typeform/src/index.ts +++ b/examples/typeform/src/index.ts @@ -2,13 +2,13 @@ import { Trigger } from "@trigger.dev/sdk"; import { events } from "@trigger.dev/typeform"; new Trigger({ - id: "typeform-webhook-3", + id: "typeform-webhook-4", name: "Typeform webhook example", apiKey: "trigger_dev_zC25mKNn6c0q", endpoint: "ws://localhost:8889/ws", logLevel: "debug", on: events.formResponseEvent({ - form_id: "Wu9xVIt6", + form_id: "nvK1oxMm", }), run: async (event, ctx) => { await ctx.logger.info(`Action was ${event.event_id}`, event.form_response); From 5e5dff3cddf872956a1848a995005abdbf3a2441 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 6 Mar 2023 19:21:07 +0000 Subject: [PATCH 077/113] Fix for type error --- .../workflows/$workflowSlug/index.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx index aa09bf2e7d7..d9c05e26229 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx @@ -411,7 +411,12 @@ export default function Page() {
    -
  1. {howToText(eventRule, workflow.externalSource)}
  2. +
  3. + {howToText( + eventRule, + workflow.externalSource?.instructions ?? undefined + )} +
  4. Return here to view the new workflow run.
@@ -549,10 +554,7 @@ type WorkflowEventRule = NonNullable< ReturnType >["rules"][number]; -function howToText( - eventRule: WorkflowEventRule, - externalSource: ExternalSource -) { +function howToText(eventRule: WorkflowEventRule, instructions?: string) { if (!eventRule.trigger) { return "This workflow hasn't been connected."; } @@ -564,8 +566,8 @@ function howToText( case "CUSTOM_EVENT": return "This workflow will run when you send a custom event."; case "INTEGRATION_WEBHOOK": { - if (externalSource?.instructions) { - return `${externalSource.instructions}`; + if (instructions) { + return `${instructions}`; } return "Run this workflow by triggering the webhook."; } From 0b35f5f7a06e2781fd122ba34b1f78d7be2f8190 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 7 Mar 2023 13:12:30 +0000 Subject: [PATCH 078/113] =?UTF-8?q?inputSchema=20isn=E2=80=99t=20required?= =?UTF-8?q?=20for=20a=20webhook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/integrations/src/core/webhook/index.ts | 4 ++-- apps/integrations/src/core/webhook/types.ts | 2 +- .../src/trigger/sdk/generateService.ts | 16 +++++++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 7f4ba286011..0f730054ecd 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -27,7 +27,7 @@ export function makeWebhook(input: { | { type: "automatic"; requiresSecret: boolean; - inputSchema: JSONSchema; + inputSchema: JSONSchema | null; /** take the raw data and turn it into the appropriate input for the subscribe request */ preSubscribe: (input: { webhookId: string; @@ -105,7 +105,7 @@ export function makeWebhook(input: { subscription = { type: "automatic", - inputSpec: input.subscription.inputSchema, + inputSchema: input.subscription.inputSchema, requiresSecret: input.subscription.requiresSecret, subscribe: subscribe, }; diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index 3b57e6d7ff2..c99d6d0fc79 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -37,7 +37,7 @@ export type WebhookSubscription = export type WebhookSubscriptionAutomatic = { type: "automatic"; requiresSecret: boolean; - inputSpec: JSONSchema; + inputSchema: JSONSchema | null; subscribe: ( data: WebhookSubscriptionRequest ) => Promise; diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 7a0d25941ac..8ac1d015b14 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -213,8 +213,10 @@ export async function ${action.name}( switch (webhook.subscription.type) { case "automatic": { const typeName = toTitleCase(event.name); - const inputSpec = webhook.subscription.inputSpec; - inputSpec.title = `${typeName}Input`; + const inputSpec = webhook.subscription.inputSchema; + if (inputSpec) { + inputSpec.title = `${typeName}Input`; + } const outputSpec = event.schema; outputSpec.title = `${typeName}Output`; const title = event.metadata.title; @@ -229,8 +231,12 @@ const ${zodSchemaName} = ${zodReturnSchema} ${event.metadata.description ? `/** ${event.metadata.description} */` : ""} function ${functionName}( - /** The params for this call */ - params: Prettify<${inputSpec.title}> + ${ + inputSpec + ? `/** The params for this call */ + params: Prettify<${inputSpec.title}>` + : "" + } ): TriggerEvent { return { metadata: { @@ -255,7 +261,7 @@ function ${functionName}( name: functionName, friendlyName, description: event.metadata.description, - input: inputSpec, + input: inputSpec ?? undefined, output: outputSpec, functionCode, }; From 41a36e76d31bf2d1dff6f643e0ce8ca158aef4a6 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 7 Mar 2023 13:12:36 +0000 Subject: [PATCH 079/113] Removed logs from tests --- .../src/integrations/typeform/tests/webhooks.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts index 1ae109028b8..12e55e051bc 100644 --- a/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/typeform/tests/webhooks.test.ts @@ -730,7 +730,6 @@ describe("typeform.webhooks", async () => { }; const validationResult = await validate(data, events.formResponse.schema); - console.log(validationResult); expect(validationResult).toEqual({ success: true, }); @@ -1289,7 +1288,6 @@ describe("typeform.webhooks", async () => { }; const validationResult = await validate(data, events.formResponse.schema); - console.log(validationResult); expect(validationResult).toEqual({ success: true, }); From 06a9ce719753e5b954d9795512a377945e79ddd5 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 7 Mar 2023 13:12:58 +0000 Subject: [PATCH 080/113] =?UTF-8?q?WIP=20on=20form-urlencoded=20bodies?= =?UTF-8?q?=E2=80=A6=20annoying?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/integrations/src/core/endpoint/types.ts | 17 ++++ .../src/core/request/requestEndpoint.ts | 56 ++++++++++-- .../src/core/request/urlEncode.ts | 89 +++++++++++++++++++ 3 files changed, 156 insertions(+), 6 deletions(-) create mode 100644 apps/integrations/src/core/request/urlEncode.ts diff --git a/apps/integrations/src/core/endpoint/types.ts b/apps/integrations/src/core/endpoint/types.ts index f2a3c11ebad..5899222f75e 100644 --- a/apps/integrations/src/core/endpoint/types.ts +++ b/apps/integrations/src/core/endpoint/types.ts @@ -40,10 +40,27 @@ type EndpointSpecParameterHeader = { interface EndpointSpecRequest { headers?: Record; body?: { + format?: BodyFormat; schema: JSONSchema; }; } +type BodyFormat = JSONBodyFormat | FormEncodedBodyFormat; + +type JSONBodyFormat = { + type: "json"; +}; + +export type FormEncodedBodyFormat = { + type: "form-urlencoded"; + encoding: Record; +}; + +export type FormEncodedBodyFormatEncoding = { + style: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode: boolean; +}; + export interface EndpointSpecResponse { /** If you return true then this response is the relevant one */ matches: ({ diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index 0c21cb06dfd..f572328d5df 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -32,11 +32,6 @@ export async function requestEndpoint( let headers: Record = {}; - //if the body doesn't exist but is required, create it - if (requiresBody && body == null) { - body = {}; - } - // validate and add the parameters if (endpointSpec.parameters != null) { for (const parameter of endpointSpec.parameters) { @@ -96,6 +91,53 @@ export async function requestEndpoint( } } + //create the body + let requestBody: any = undefined; + if (body != null) { + //if the body format is form-urlencoded then we need to encode the body + if (request.body?.format?.type === "form-urlencoded") { + const encoding = request.body.format.encoding; + const encodedBody: Record = {}; + for (const key in body) { + if (Object.prototype.hasOwnProperty.call(body, key)) { + const element = body[key]; + const encodingType = encoding[key]?.style ?? "form"; + switch (encodingType) { + case "form": + encodedBody[key] = element; + break; + case "spaceDelimited": + encodedBody[key] = element.join(" "); + break; + case "pipeDelimited": + encodedBody[key] = element.join("|"); + break; + case "deepObject": + switch (typeof element) { + case "string": + encodedBody[key] = element; + break; + case "object": + encodedBody[key] = Object.entries(element) + .map(([key, value]) => `${key}[${value}]`) + .join(","); + break; + } + break; + } + } + } + + const formElements: string[] = Object.entries(encodedBody).map( + ([key, value]) => + `${encodeURIComponent(key)}=${encodeURIComponent(value)}` + ); + requestBody = formElements.join("&"); + } else { + requestBody = JSON.stringify(body); + } + } + // build the fetch config const url = `${baseUrl}${path}`; let fetchConfig: HTTPRequest = { @@ -104,9 +146,11 @@ export async function requestEndpoint( headers: { ...headers, }, - body: JSON.stringify(body), + body: requestBody, }; + console.log("fetchConfig", JSON.stringify(fetchConfig)); + // apply credentials if (security != null) { if (credentials == null) { diff --git a/apps/integrations/src/core/request/urlEncode.ts b/apps/integrations/src/core/request/urlEncode.ts new file mode 100644 index 00000000000..93bdbd61630 --- /dev/null +++ b/apps/integrations/src/core/request/urlEncode.ts @@ -0,0 +1,89 @@ +import { + FormEncodedBodyFormat, + FormEncodedBodyFormatEncoding, +} from "core/endpoint/types"; +import { URLSearchParams } from "url"; + +function urlEncodeBody(format: FormEncodedBodyFormat, body: any): string { + const parts = new URLSearchParams(); + const encoding = format.encoding; + + for (const name in encoding.e) { + if (!Object.prototype.hasOwnProperty.call(encoding, name)) continue; + + const element = encoding[name]; + const value = body[name]; + + if (value === undefined) { + continue; + } + + switch (element.style) { + case "form": { + if (Array.isArray(value)) { + if (element.explode) { + for (const item of value) { + parts.append(name, item); + } + } else { + parts.append(name, value.join(",")); + } + } else if (typeof value === "object") { + if (element.explode) { + Object.entries(value).forEach(([key, value]) => { + parts.append(`${key}`, `${value}`); + }); + } else { + throw new Error(`Not implemented: ${element.style} explode=false`); + } + } else { + parts.append(name, `${value}`); + } + break; + } + case "spaceDelimited": + delimit(" ", value, element, parts, name); + break; + case "pipeDelimited": + delimit("|", value, element, parts, name); + break; + case "deepObject": + if (Array.isArray(value)) { + throw new Error(`Not implemented: ${element.style} array`); + } else if (typeof value === "object") { + if (element.explode) { + Object.entries(value).forEach(([key, value]) => { + parts.append(`${name}[${key}]`, `${value}`); + }); + } else { + throw new Error(`Not implemented: ${element.style} explode=false`); + } + } else { + parts.append(name, `${value}`); + } + break; + } + } + + return parts.toString(); +} + +function delimit( + delimitter: string, + value: any, + element: FormEncodedBodyFormatEncoding, + parts: URLSearchParams, + name: string +) { + if (Array.isArray(value)) { + if (element.explode) { + for (const item of value) { + parts.append(name, item); + } + } else { + parts.append(name, value.join(delimitter)); + } + } else { + parts.append(name, `${value}`); + } +} From 55f7ca06d702e5ab74c63eb75773cd8ed76dc83b Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 7 Mar 2023 13:35:28 +0000 Subject: [PATCH 081/113] =?UTF-8?q?Moe=20WIP=20on=20form=20urlencoding?= =?UTF-8?q?=E2=80=A6=20this=20is=20a=20pain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/request/requestEndpoint.ts | 40 ++----------------- .../src/core/request/urlEncode.ts | 11 +++-- 2 files changed, 11 insertions(+), 40 deletions(-) diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index f572328d5df..538b1eb8fe0 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -14,6 +14,7 @@ import { } from "./types"; import * as Sentry from "@sentry/node"; import JsonPointer from "json-pointer"; +import { urlEncodeBody } from "./urlEncode"; export async function requestEndpoint( { baseUrl, endpointSpec, authentication }: RequestSpec, @@ -96,43 +97,8 @@ export async function requestEndpoint( if (body != null) { //if the body format is form-urlencoded then we need to encode the body if (request.body?.format?.type === "form-urlencoded") { - const encoding = request.body.format.encoding; - const encodedBody: Record = {}; - for (const key in body) { - if (Object.prototype.hasOwnProperty.call(body, key)) { - const element = body[key]; - const encodingType = encoding[key]?.style ?? "form"; - switch (encodingType) { - case "form": - encodedBody[key] = element; - break; - case "spaceDelimited": - encodedBody[key] = element.join(" "); - break; - case "pipeDelimited": - encodedBody[key] = element.join("|"); - break; - case "deepObject": - switch (typeof element) { - case "string": - encodedBody[key] = element; - break; - case "object": - encodedBody[key] = Object.entries(element) - .map(([key, value]) => `${key}[${value}]`) - .join(","); - break; - } - break; - } - } - } - - const formElements: string[] = Object.entries(encodedBody).map( - ([key, value]) => - `${encodeURIComponent(key)}=${encodeURIComponent(value)}` - ); - requestBody = formElements.join("&"); + const encodedBody = urlEncodeBody(request.body.format, body); + requestBody = encodedBody; } else { requestBody = JSON.stringify(body); } diff --git a/apps/integrations/src/core/request/urlEncode.ts b/apps/integrations/src/core/request/urlEncode.ts index 93bdbd61630..a637a72f848 100644 --- a/apps/integrations/src/core/request/urlEncode.ts +++ b/apps/integrations/src/core/request/urlEncode.ts @@ -4,11 +4,14 @@ import { } from "core/endpoint/types"; import { URLSearchParams } from "url"; -function urlEncodeBody(format: FormEncodedBodyFormat, body: any): string { +export function urlEncodeBody( + format: FormEncodedBodyFormat, + body: any +): string { const parts = new URLSearchParams(); const encoding = format.encoding; - for (const name in encoding.e) { + for (const name in encoding) { if (!Object.prototype.hasOwnProperty.call(encoding, name)) continue; const element = encoding[name]; @@ -49,7 +52,9 @@ function urlEncodeBody(format: FormEncodedBodyFormat, body: any): string { break; case "deepObject": if (Array.isArray(value)) { - throw new Error(`Not implemented: ${element.style} array`); + value.forEach((item) => { + parts.append(`${name}[]`, `${item}`); + }); } else if (typeof value === "object") { if (element.explode) { Object.entries(value).forEach(([key, value]) => { From 203b1bc5d83d9bb5152fbcbee22e899fdc5bc51b Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 7 Mar 2023 14:01:03 +0000 Subject: [PATCH 082/113] Stripe webhook subscribing is working --- apps/integrations/package.json | 2 + .../src/core/request/urlEncode.ts | 66 +- .../fixtures/stripe.webhook.subscribe.json | 62 + .../src/integrations/stripe/authentication.ts | 19 + .../src/integrations/stripe/index.ts | 14 + .../stripe/tests/webhooks.test.ts | 1308 +++++++++++++++++ .../integrations/stripe/webhooks/examples.ts | 274 ++++ .../integrations/stripe/webhooks/schemas.ts | 318 ++++ .../src/integrations/stripe/webhooks/specs.ts | 564 +++++++ .../integrations/stripe/webhooks/webhooks.ts | 112 ++ pnpm-lock.yaml | 4 + 11 files changed, 2680 insertions(+), 63 deletions(-) create mode 100644 apps/integrations/src/fixtures/stripe.webhook.subscribe.json create mode 100644 apps/integrations/src/integrations/stripe/authentication.ts create mode 100644 apps/integrations/src/integrations/stripe/index.ts create mode 100644 apps/integrations/src/integrations/stripe/tests/webhooks.test.ts create mode 100644 apps/integrations/src/integrations/stripe/webhooks/examples.ts create mode 100644 apps/integrations/src/integrations/stripe/webhooks/schemas.ts create mode 100644 apps/integrations/src/integrations/stripe/webhooks/specs.ts create mode 100644 apps/integrations/src/integrations/stripe/webhooks/webhooks.ts diff --git a/apps/integrations/package.json b/apps/integrations/package.json index c0e3ec38045..b1258989772 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -35,6 +35,7 @@ "morgan": "^1.10.0", "node-fetch": "^3.3.0", "node-object-hash": "^2.3.10", + "qs": "^6.11.0", "zod": "^3.20.2" }, "devDependencies": { @@ -45,6 +46,7 @@ "@types/json-pointer": "^1.0.31", "@types/morgan": "^1.9.3", "@types/node": "^18.13.0", + "@types/qs": "^6.9.7", "@typescript-eslint/eslint-plugin": "^5.51.0", "commander": "^9.4.1", "concurrently": "^7.6.0", diff --git a/apps/integrations/src/core/request/urlEncode.ts b/apps/integrations/src/core/request/urlEncode.ts index a637a72f848..e315467850f 100644 --- a/apps/integrations/src/core/request/urlEncode.ts +++ b/apps/integrations/src/core/request/urlEncode.ts @@ -3,74 +3,14 @@ import { FormEncodedBodyFormatEncoding, } from "core/endpoint/types"; import { URLSearchParams } from "url"; +import qs from "qs"; export function urlEncodeBody( format: FormEncodedBodyFormat, body: any ): string { - const parts = new URLSearchParams(); - const encoding = format.encoding; - - for (const name in encoding) { - if (!Object.prototype.hasOwnProperty.call(encoding, name)) continue; - - const element = encoding[name]; - const value = body[name]; - - if (value === undefined) { - continue; - } - - switch (element.style) { - case "form": { - if (Array.isArray(value)) { - if (element.explode) { - for (const item of value) { - parts.append(name, item); - } - } else { - parts.append(name, value.join(",")); - } - } else if (typeof value === "object") { - if (element.explode) { - Object.entries(value).forEach(([key, value]) => { - parts.append(`${key}`, `${value}`); - }); - } else { - throw new Error(`Not implemented: ${element.style} explode=false`); - } - } else { - parts.append(name, `${value}`); - } - break; - } - case "spaceDelimited": - delimit(" ", value, element, parts, name); - break; - case "pipeDelimited": - delimit("|", value, element, parts, name); - break; - case "deepObject": - if (Array.isArray(value)) { - value.forEach((item) => { - parts.append(`${name}[]`, `${item}`); - }); - } else if (typeof value === "object") { - if (element.explode) { - Object.entries(value).forEach(([key, value]) => { - parts.append(`${name}[${key}]`, `${value}`); - }); - } else { - throw new Error(`Not implemented: ${element.style} explode=false`); - } - } else { - parts.append(name, `${value}`); - } - break; - } - } - - return parts.toString(); + //todo only supports deep object right now + return qs.stringify(body); } function delimit( diff --git a/apps/integrations/src/fixtures/stripe.webhook.subscribe.json b/apps/integrations/src/fixtures/stripe.webhook.subscribe.json new file mode 100644 index 00000000000..a4d0ae8e655 --- /dev/null +++ b/apps/integrations/src/fixtures/stripe.webhook.subscribe.json @@ -0,0 +1,62 @@ +[ + { + "scope": "https://api.stripe.com:443", + "method": "POST", + "path": "/v1/webhook_endpoints", + "body": "description=Trigger.dev%20webhook%20for%20events%20checkout.session.completed&enabled_events%5B0%5D=checkout.session.completed&url=https%3A%2F%2Fexample.com", + "status": 200, + "response": { + "id": "we_1Mj137GHlQRWA8CggGfaBkhz", + "object": "webhook_endpoint", + "api_version": null, + "application": null, + "created": 1678197569, + "description": "Trigger.dev webhook for events checkout.session.completed", + "enabled_events": [ + "checkout.session.completed" + ], + "livemode": false, + "metadata": {}, + "secret": "whsec_4gm8qR9cYScNcvMZKUgwhtkzwoNY0NhB", + "status": "enabled", + "url": "https://example.com" + }, + "rawHeaders": [ + "Server", + "nginx", + "Date", + "Tue, 07 Mar 2023 13:59:29 GMT", + "Content-Type", + "application/json", + "Content-Length", + "430", + "Connection", + "close", + "Access-Control-Allow-Credentials", + "true", + "Access-Control-Allow-Methods", + "GET, POST, HEAD, OPTIONS, DELETE", + "Access-Control-Allow-Origin", + "*", + "Access-Control-Expose-Headers", + "Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required", + "Access-Control-Max-Age", + "300", + "Cache-Control", + "no-cache, no-store", + "Idempotency-Key", + "e8ac06e5-f582-4e18-9efa-ed0c9348df02", + "Original-Request", + "req_wat7ygbANPveOQ", + "Request-Id", + "req_wat7ygbANPveOQ", + "Stripe-Should-Retry", + "false", + "Stripe-Version", + "2022-11-15", + "Strict-Transport-Security", + "max-age=63072000; includeSubDomains; preload" + ], + "responseIsBinary": false + } +] \ No newline at end of file diff --git a/apps/integrations/src/integrations/stripe/authentication.ts b/apps/integrations/src/integrations/stripe/authentication.ts new file mode 100644 index 00000000000..64a43d17fd1 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/authentication.ts @@ -0,0 +1,19 @@ +import { IntegrationAuthentication } from "core/authentication/types"; + +export const authentication: IntegrationAuthentication = { + apiKey: { + type: "api_key", + placement: { + in: "header", + type: "bearer", + key: "Authorization", + }, + documentation: `1. [Log in to the API keys page](https://dashboard.stripe.com/apikeys) on Stripe. +2. Create a restricted API key with only the permissions you need. +3. Copy the token and paste it into the field below.`, + scopes: { + //todo needs filling out + "webhooks:write": "webhooks:write", + }, + }, +}; diff --git a/apps/integrations/src/integrations/stripe/index.ts b/apps/integrations/src/integrations/stripe/index.ts new file mode 100644 index 00000000000..33ded0584d5 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/index.ts @@ -0,0 +1,14 @@ +import { Service } from "core/service/types"; +import { authentication } from "./authentication"; +import { webhooks } from "./webhooks/webhooks"; + +export const stripe: Service = { + name: "Stripe", + service: "stripe", + version: "0.1.21", + baseUrl: "https://api.stripe.com/v1", + live: true, + authentication, + webhooks, + retryableStatusCodes: [408, 429, 500, 502, 503, 504], +}; diff --git a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts new file mode 100644 index 00000000000..2d979480b96 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts @@ -0,0 +1,1308 @@ +import { validate } from "core/schemas/validate"; +import { startNock, stopNock } from "testing/nock"; +import { describe, expect, test } from "vitest"; +import { webhooks, events } from "../webhooks/webhooks"; + +const authToken = () => process.env.STRIPE_API_KEY ?? ""; + +describe("stripe.webhooks", async () => { + test("subscribe", async () => { + const accessToken = authToken(); + + const subscription = webhooks.webhook.subscription; + expect(subscription.type).toEqual("automatic"); + if (subscription.type !== "automatic") { + throw new Error("Invalid subscription type"); + } + + const nockDone = await startNock("stripe.webhook.subscribe"); + const result = await subscription.subscribe({ + webhookId: "abcdefghijklmnopqrstuvwxyz", + callbackUrl: "https://example.com", + events: ["checkout.session.completed"], + secret: "123456", + inputData: {}, + credentials: { + type: "api_key", + name: "apiKey", + api_key: accessToken, + scopes: ["webhooks:write"], + }, + }); + + expect(result.success).toEqual(true); + expect(result).toMatchInlineSnapshot(` + { + "callbackUrl": "https://example.com", + "data": { + "api_version": null, + "application": null, + "created": 1678197569, + "description": "Trigger.dev webhook for events checkout.session.completed", + "enabled_events": [ + "checkout.session.completed", + ], + "id": "we_1Mj137GHlQRWA8CggGfaBkhz", + "livemode": false, + "metadata": {}, + "object": "webhook_endpoint", + "secret": "whsec_4gm8qR9cYScNcvMZKUgwhtkzwoNY0NhB", + "status": "enabled", + "url": "https://example.com", + }, + "events": [ + "checkout.session.completed", + ], + "headers": { + "access-control-allow-credentials": "true", + "access-control-allow-methods": "GET, POST, HEAD, OPTIONS, DELETE", + "access-control-allow-origin": "*", + "access-control-expose-headers": "Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required", + "access-control-max-age": "300", + "cache-control": "no-cache, no-store", + "connection": "close", + "content-length": "430", + "content-type": "application/json", + "date": "Tue, 07 Mar 2023 13:59:29 GMT", + "idempotency-key": "e8ac06e5-f582-4e18-9efa-ed0c9348df02", + "original-request": "req_wat7ygbANPveOQ", + "request-id": "req_wat7ygbANPveOQ", + "server": "nginx", + "strict-transport-security": "max-age=63072000; includeSubDomains; preload", + "stripe-should-retry": "false", + "stripe-version": "2022-11-15", + }, + "secret": "whsec_4gm8qR9cYScNcvMZKUgwhtkzwoNY0NhB", + "status": 200, + "success": true, + } + `); + stopNock(nockDone); + }); + + // test("receiving (correct signature)", async () => { + // const accessToken = authToken(); + + // //explicitly pass in a payload (this is hardcoded, not from a request) + // try { + // const result = await webhooks.formResponse.receive({ + // credentials: { + // type: "api_key", + // name: "accessToken", + // api_key: accessToken, + // scopes: ["webhooks:write"], + // }, + // secret: "123456", + // subscriptionData: { + // id: "01GTH8BG8S4KK1XW38SNDN1SRV", + // form_id: "NclFXN1d", + // tag: "myTag", + // url: "https://example.com", + // enabled: true, + // verify_ssl: true, + // secret: "123456", + // created_at: "2023-03-02T13:32:00.154368Z", + // updated_at: "2023-03-02T15:08:01.697884Z", + // }, + // request: { + // method: "POST", + // searchParams: new URLSearchParams(), + // headers: { + // "content-type": "application/json", + // "typeform-signature": + // "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", + // }, + // body: events.formResponse.examples[0], + // rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), + // }, + // }); + + // expect(result).toMatchInlineSnapshot(` + // { + // "eventResults": [ + // { + // "displayProperties": { + // "title": "New response", + // }, + // "event": "form_response", + // "payload": { + // "event_id": "LtWXD3crgy", + // "event_type": "form_response", + // "form_response": { + // "answers": [ + // { + // "field": { + // "id": "DlXFaesGBpoF", + // "type": "long_text", + // }, + // "text": "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", + // "type": "text", + // }, + // { + // "email": "laura@example.com", + // "field": { + // "id": "SMEUb7VJz92Q", + // "type": "email", + // }, + // "type": "email", + // }, + // { + // "field": { + // "id": "JwWggjAKtOkA", + // "type": "short_text", + // }, + // "text": "Laura", + // "type": "text", + // }, + // { + // "date": "2005-10-15", + // "field": { + // "id": "KoJxDM3c6x8h", + // "type": "date", + // }, + // "type": "date", + // }, + // { + // "choices": { + // "labels": [ + // "London", + // "Sydney", + // ], + // }, + // "field": { + // "id": "PNe8ZKBK8C2Q", + // "type": "picture_choice", + // }, + // "type": "choices", + // }, + // { + // "field": { + // "id": "Q7M2XAwY04dW", + // "type": "number", + // }, + // "number": 5, + // "type": "number", + // }, + // { + // "boolean": true, + // "field": { + // "id": "gFFf3xAkJKsr", + // "type": "legal", + // }, + // "type": "boolean", + // }, + // { + // "choice": { + // "label": "London", + // }, + // "field": { + // "id": "k6TP9oLGgHjl", + // "type": "multiple_choice", + // }, + // "type": "choice", + // }, + // { + // "boolean": false, + // "field": { + // "id": "RUqkXSeXBXSd", + // "type": "yes_no", + // }, + // "type": "boolean", + // }, + // { + // "field": { + // "id": "NRsxU591jIW9", + // "type": "opinion_scale", + // }, + // "number": 2, + // "type": "number", + // }, + // { + // "field": { + // "id": "WOTdC00F8A3h", + // "type": "rating", + // }, + // "number": 3, + // "type": "number", + // }, + // { + // "field": { + // "id": "pn48RmPazVdM", + // "type": "number", + // }, + // "number": 4, + // "type": "number", + // }, + // { + // "field": { + // "id": "M5tXK5kG7IeA", + // "ref": "readable_ref_calendly", + // "type": "calendly", + // }, + // "type": "url", + // "url": "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", + // }, + // ], + // "calculated": { + // "score": 9, + // }, + // "definition": { + // "endings": [ + // { + // "id": "dN5FLyFpCMFo", + // "properties": { + // "button_mode": "default_redirect", + // "button_text": "Create a typeform", + // "share_icons": true, + // "show_button": true, + // }, + // "ref": "01GRC8GR2017M6WW347T86VV39", + // "title": "Bye!", + // "type": "thankyou_screen", + // }, + // ], + // "fields": [ + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "DlXFaesGBpoF", + // "ref": "readable_ref_long_text", + // "title": "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", + // "type": "long_text", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "SMEUb7VJz92Q", + // "ref": "readable_ref_email", + // "title": "If you're OK with our city management following up if they have further questions, please give us your email address.", + // "type": "email", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "JwWggjAKtOkA", + // "ref": "readable_ref_short_text", + // "title": "What is your first name?", + // "type": "short_text", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "KoJxDM3c6x8h", + // "ref": "readable_ref_date", + // "title": "When did you move to the place where you live?", + // "type": "date", + // }, + // { + // "allow_multiple_selections": true, + // "allow_other_choice": false, + // "id": "PNe8ZKBK8C2Q", + // "ref": "readable_ref_picture_choice", + // "title": "Which pictures do you like? You can choose as many as you like.", + // "type": "picture_choice", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "Q7M2XAwY04dW", + // "ref": "readable_ref_number1", + // "title": "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", + // "type": "number", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "gFFf3xAkJKsr", + // "ref": "readable_ref_legal", + // "title": "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", + // "type": "legal", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "k6TP9oLGgHjl", + // "ref": "readable_ref_multiple_choice", + // "title": "Which of these cities is your favorite?", + // "type": "multiple_choice", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "RUqkXSeXBXSd", + // "ref": "readable_ref_yes_no", + // "title": "Do you have a favorite city we haven't listed?", + // "type": "yes_no", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "NRsxU591jIW9", + // "ref": "readable_ref_opinion_scale", + // "title": "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", + // "type": "opinion_scale", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "WOTdC00F8A3h", + // "ref": "readable_ref_rating", + // "title": "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", + // "type": "rating", + // }, + // { + // "allow_multiple_selections": false, + // "allow_other_choice": false, + // "id": "pn48RmPazVdM", + // "ref": "readable_ref_number2", + // "title": "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", + // "type": "number", + // }, + // { + // "id": "M5tXK5kG7IeA", + // "properties": {}, + // "ref": "readable_ref_calendly", + // "title": "Book a time with me", + // "type": "calendly", + // }, + // ], + // "id": "lT4Z3j", + // "title": "Webhooks example", + // }, + // "ending": { + // "id": "dN5FLyFpCMFo", + // "ref": "01GRC8GR2017M6WW347T86VV39", + // }, + // "form_id": "lT4Z3j", + // "hidden": { + // "user_id": "abc123456", + // }, + // "landed_at": "2018-01-18T18:07:02Z", + // "submitted_at": "2018-01-18T18:17:02Z", + // "token": "a3a12ec67a1365927098a606107fac15", + // "variables": [ + // { + // "key": "score", + // "number": 4, + // "type": "number", + // }, + // { + // "key": "name", + // "text": "typeform", + // "type": "text", + // }, + // ], + // }, + // }, + // }, + // ], + // "response": { + // "headers": {}, + // "status": 200, + // }, + // "success": true, + // } + // `); + // } catch (e) { + // console.error(e); + // expect(true).toBe(false); + // } + // }); + + // test("receiving (bad signature)", async () => { + // const accessToken = authToken(); + + // //explicitly pass in a payload (this is hardcoded, not from a request) + // try { + // const result = await webhooks.formResponse.receive({ + // credentials: { + // type: "api_key", + // name: "accessToken", + // api_key: accessToken, + // scopes: ["webhooks:write"], + // }, + // secret: "123", + // subscriptionData: { + // id: "01GTH8BG8S4KK1XW38SNDN1SRV", + // form_id: "NclFXN1d", + // tag: "myTag", + // url: "https://example.com", + // enabled: true, + // verify_ssl: true, + // secret: "123456", + // created_at: "2023-03-02T13:32:00.154368Z", + // updated_at: "2023-03-02T15:08:01.697884Z", + // }, + // request: { + // method: "POST", + // searchParams: new URLSearchParams(), + // headers: { + // "content-type": "application/json", + // "typeform-signature": + // "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", + // }, + // body: events.formResponse.examples[0], + // rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), + // }, + // }); + + // expect(result).toMatchInlineSnapshot(` + // { + // "error": "Invalid signature", + // "response": { + // "headers": {}, + // "status": 401, + // }, + // "success": false, + // } + // `); + // } catch (e) { + // console.error(e); + // expect(true).toBe(false); + // } + // }); + + // describe("schemas", async () => { + // test("formResponse 1", async () => { + // const data = { + // event_id: "LtWXD3crgy", + // event_type: "form_response", + // form_response: { + // answers: [ + // { + // field: { + // id: "DlXFaesGBpoF", + // type: "long_text", + // }, + // text: "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", + // type: "text", + // }, + // { + // email: "laura@example.com", + // field: { + // id: "SMEUb7VJz92Q", + // type: "email", + // }, + // type: "email", + // }, + // { + // field: { + // id: "JwWggjAKtOkA", + // type: "short_text", + // }, + // text: "Laura", + // type: "text", + // }, + // { + // date: "2005-10-15", + // field: { + // id: "KoJxDM3c6x8h", + // type: "date", + // }, + // type: "date", + // }, + // { + // choices: { + // labels: ["London", "Sydney"], + // }, + // field: { + // id: "PNe8ZKBK8C2Q", + // type: "picture_choice", + // }, + // type: "choices", + // }, + // { + // field: { + // id: "Q7M2XAwY04dW", + // type: "number", + // }, + // number: 5, + // type: "number", + // }, + // { + // boolean: true, + // field: { + // id: "gFFf3xAkJKsr", + // type: "legal", + // }, + // type: "boolean", + // }, + // { + // choice: { + // label: "London", + // }, + // field: { + // id: "k6TP9oLGgHjl", + // type: "multiple_choice", + // }, + // type: "choice", + // }, + // { + // boolean: false, + // field: { + // id: "RUqkXSeXBXSd", + // type: "yes_no", + // }, + // type: "boolean", + // }, + // { + // field: { + // id: "NRsxU591jIW9", + // type: "opinion_scale", + // }, + // number: 2, + // type: "number", + // }, + // { + // field: { + // id: "WOTdC00F8A3h", + // type: "rating", + // }, + // number: 3, + // type: "number", + // }, + // { + // field: { + // id: "pn48RmPazVdM", + // type: "number", + // }, + // number: 4, + // type: "number", + // }, + // { + // field: { + // id: "M5tXK5kG7IeA", + // ref: "readable_ref_calendly", + // type: "calendly", + // }, + // type: "url", + // url: "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", + // }, + // ], + // calculated: { + // score: 9, + // }, + // definition: { + // endings: [ + // { + // id: "dN5FLyFpCMFo", + // properties: { + // button_mode: "default_redirect", + // button_text: "Create a typeform", + // share_icons: true, + // show_button: true, + // }, + // ref: "01GRC8GR2017M6WW347T86VV39", + // title: "Bye!", + // type: "thankyou_screen", + // }, + // ], + // fields: [ + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "DlXFaesGBpoF", + // ref: "readable_ref_long_text", + // title: + // "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", + // type: "long_text", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "SMEUb7VJz92Q", + // ref: "readable_ref_email", + // title: + // "If you're OK with our city management following up if they have further questions, please give us your email address.", + // type: "email", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "JwWggjAKtOkA", + // ref: "readable_ref_short_text", + // title: "What is your first name?", + // type: "short_text", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "KoJxDM3c6x8h", + // ref: "readable_ref_date", + // title: "When did you move to the place where you live?", + // type: "date", + // }, + // { + // allow_multiple_selections: true, + // allow_other_choice: false, + // id: "PNe8ZKBK8C2Q", + // ref: "readable_ref_picture_choice", + // title: + // "Which pictures do you like? You can choose as many as you like.", + // type: "picture_choice", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "Q7M2XAwY04dW", + // ref: "readable_ref_number1", + // title: + // "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", + // type: "number", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "gFFf3xAkJKsr", + // ref: "readable_ref_legal", + // title: + // "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", + // type: "legal", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "k6TP9oLGgHjl", + // ref: "readable_ref_multiple_choice", + // title: "Which of these cities is your favorite?", + // type: "multiple_choice", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "RUqkXSeXBXSd", + // ref: "readable_ref_yes_no", + // title: "Do you have a favorite city we haven't listed?", + // type: "yes_no", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "NRsxU591jIW9", + // ref: "readable_ref_opinion_scale", + // title: + // "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", + // type: "opinion_scale", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "WOTdC00F8A3h", + // ref: "readable_ref_rating", + // title: + // "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", + // type: "rating", + // }, + // { + // allow_multiple_selections: false, + // allow_other_choice: false, + // id: "pn48RmPazVdM", + // ref: "readable_ref_number2", + // title: + // "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", + // type: "number", + // }, + // { + // id: "M5tXK5kG7IeA", + // properties: {}, + // ref: "readable_ref_calendly", + // title: "Book a time with me", + // type: "calendly", + // }, + // ], + // id: "lT4Z3j", + // title: "Webhooks example", + // }, + // ending: { + // id: "dN5FLyFpCMFo", + // ref: "01GRC8GR2017M6WW347T86VV39", + // }, + // form_id: "lT4Z3j", + // hidden: { + // user_id: "abc123456", + // }, + // landed_at: "2018-01-18T18:07:02Z", + // submitted_at: "2018-01-18T18:17:02Z", + // token: "a3a12ec67a1365927098a606107fac15", + // variables: [ + // { + // key: "score", + // number: 4, + // type: "number", + // }, + // { + // key: "name", + // text: "typeform", + // type: "text", + // }, + // ], + // }, + // }; + + // const validationResult = await validate(data, events.formResponse.schema); + // console.log(validationResult); + // expect(validationResult).toEqual({ + // success: true, + // }); + // }); + + // test("formResponse 2", async () => { + // const data = { + // event_id: "01GTSD5R1YKSV4DE4YH0WTHDSJ", + // event_type: "form_response", + // form_response: { + // token: "hphw0h2xjkq50gx81hphwiu6jkh43j6b", + // ending: { id: "DefaultTyScreen", ref: "default_tys" }, + // answers: [ + // { + // type: "number", + // field: { + // id: "w4L7U4WU7USv", + // ref: "2c62a515-ef36-438e-a4a4-222a39e2e99e", + // type: "nps", + // }, + // number: 5, + // }, + // { + // text: "fghhfg", + // type: "text", + // field: { + // id: "zU5ISuBXtB56", + // ref: "01E0D1GYEQKP759R4NP94X7V1D", + // type: "long_text", + // }, + // }, + // { + // type: "choice", + // field: { + // id: "VLghy7KPHsxX", + // ref: "01E0D1GYEQSC82ZJHD7NFF072Q", + // type: "multiple_choice", + // }, + // choice: { label: "35 to 44" }, + // }, + // { + // type: "choice", + // field: { + // id: "AddS20Xg25Qm", + // ref: "01E0D1GYEQK8THD0P29B10ADRQ", + // type: "dropdown", + // }, + // choice: { label: "Albania" }, + // }, + // { + // type: "choice", + // field: { + // id: "HGOZa4w1y0KA", + // ref: "01E0D1GYEQD9BB15HQM3GHTP48", + // type: "dropdown", + // }, + // choice: { label: "Airlines / Aviation" }, + // }, + // { + // type: "choice", + // field: { + // id: "KvMvx4hBtOcV", + // ref: "01E0D1GYEQ17BCE98BZPASH3K6", + // type: "multiple_choice", + // }, + // choice: { label: "51 to 200" }, + // }, + // ], + // form_id: "KywLXMeB", + // landed_at: "2023-03-05T17:29:54Z", + // definition: { + // id: "KywLXMeB", + // title: "Net Promoter Score® (copy)", + // fields: [ + // { + // id: "w4L7U4WU7USv", + // ref: "2c62a515-ef36-438e-a4a4-222a39e2e99e", + // type: "nps", + // title: + // "How likely are you to recommend us to a friend or colleague?", + // properties: {}, + // }, + // { + // id: "zU5ISuBXtB56", + // ref: "01E0D1GYEQKP759R4NP94X7V1D", + // type: "long_text", + // title: "Why did you choose ?", + // properties: {}, + // }, + // { + // id: "VLghy7KPHsxX", + // ref: "01E0D1GYEQSC82ZJHD7NFF072Q", + // type: "multiple_choice", + // title: "What's your age?", + // choices: [ + // { id: "SQsDGQMdaGn2", label: "Under 18" }, + // { id: "PldS57HPKq31", label: "18 to 24" }, + // { id: "h9xZWNI7wyDt", label: "25 to 34" }, + // { id: "cgDtmheGvgXA", label: "35 to 44" }, + // { id: "Xu9RKmULlXxA", label: "45 to 54" }, + // { id: "3xGelJVg6BQ3", label: "55 to 64" }, + // { id: "yO8pK25uvTED", label: "65 to 74" }, + // { id: "Y4mxwlJH0IsU", label: "75 or older" }, + // ], + // properties: {}, + // }, + // { + // id: "AddS20Xg25Qm", + // ref: "01E0D1GYEQK8THD0P29B10ADRQ", + // type: "dropdown", + // title: "What's your country of residence?", + // choices: [ + // { id: "ggpVHxwo5xyY", label: "Afghanistan" }, + // { id: "mOP9eVTnIJCC", label: "Albania" }, + // { id: "KNOnnKx2exYM", label: "Algeria" }, + // { id: "457irbXVMAVL", label: "Andorra" }, + // { id: "5GwOYQdjunSR", label: "Angola" }, + // { id: "GgfrKlBo3rRE", label: "Antigua and Barbuda" }, + // { id: "g6MVZiPUIMdV", label: "Argentina" }, + // { id: "snLjlzg7V2FO", label: "Armenia" }, + // { id: "OwfIvcYYDQD9", label: "Aruba" }, + // { id: "KskA2KLyDNGr", label: "Australia" }, + // { id: "wQ4o0wrPUuV6", label: "Austria" }, + // { id: "Orp7HpktRv4O", label: "Azerbaijan" }, + // { id: "TFP5A8J08YxC", label: "Bahamas" }, + // { id: "BK7RXLCdYvlB", label: "Bahrain" }, + // { id: "Dtzd0fty095k", label: "Bangladesh" }, + // { id: "tbMJa4OHwMpe", label: "Barbados" }, + // { id: "AvVzIoDDPVHJ", label: "Belarus" }, + // { id: "IAXpsFx2yj09", label: "Belgium" }, + // { id: "fF5aHJmR3WS6", label: "Belize" }, + // { id: "M45AobghyYUL", label: "Benin" }, + // { id: "E66Q0BZ8iqh4", label: "Bhutan" }, + // { id: "ua2XJ0Mj0QFi", label: "Bolivia" }, + // { id: "a1BvdshzHVuU", label: "Bosnia and Herzegovina" }, + // { id: "mOqNmwmDV5bb", label: "Botswana" }, + // { id: "Do2TnRVgf1YO", label: "Brazil" }, + // { id: "FXfkCxsLSUvU", label: "Brunei" }, + // { id: "zsIw5gE2DDUH", label: "Bulgaria" }, + // { id: "XoMFygcC8MGc", label: "Burkina Faso" }, + // { id: "xPk1ogSDfO4V", label: "Burma" }, + // { id: "osLlzk1Zj3B8", label: "Burundi" }, + // { id: "dsvh9KcqcwW1", label: "Cambodia" }, + // { id: "xC8nBXYLAGRk", label: "Cameroon" }, + // { id: "GYfkjM0QJhPx", label: "Canada" }, + // { id: "bfcfNu4sGQTJ", label: "Cape Verde" }, + // { id: "u5e9EdEoaKOB", label: "Central African Republic" }, + // { id: "pA0gp2dLXVnm", label: "Chad" }, + // { id: "cldLTkwvMcnv", label: "Chile" }, + // { id: "vcS7F8eVdzst", label: "China" }, + // { id: "5pyvWuSkh3v6", label: "Colombia" }, + // { id: "L1RHnTrgnyFa", label: "Comoros" }, + // { + // id: "XiO6zcYufsT7", + // label: "Democratic Republic of the Congo", + // }, + // { id: "bZQXYgBHlXkd", label: "Costa Rica" }, + // { id: "yv8sBfGnZuNn", label: "Cote d'Ivoire" }, + // { id: "QqFHSnlHa1BT", label: "Croatia" }, + // { id: "gf5mNngs9Szn", label: "Cuba" }, + // { id: "sSQmANHUeCU5", label: "Curacao" }, + // { id: "cdySLFXuAqPK", label: "Cyprus" }, + // { id: "w9ITvUlq00zk", label: "Czech Republic" }, + // { id: "DQXayFU1WOMd", label: "Denmark" }, + // { id: "915jWua5Y6UO", label: "Djibouti" }, + // { id: "FEOBwmkZh5jR", label: "Dominica" }, + // { id: "PbABWSJmsXxp", label: "Dominican Republic" }, + // { id: "Sm3isUQqRPU3", label: "East Timor" }, + // { id: "KTBj6pfJkUgT", label: "Ecuador" }, + // { id: "2kRpeiExhDMg", label: "Egypt" }, + // { id: "rkOERPwZUQ6q", label: "El Salvador" }, + // { id: "Xyoe3jrO6h7E", label: "Equatorial Guinea" }, + // { id: "maJ0pI5bdirI", label: "Eritrea" }, + // { id: "X31dYiw25wmD", label: "Estonia" }, + // { id: "9pd1nKNrQ0GL", label: "Ethiopia" }, + // { id: "DgZs5L5B2Hqi", label: "Fiji" }, + // { id: "ZZAvbCBbNAJH", label: "Finland" }, + // { id: "IuXU5KZ2VN91", label: "France" }, + // { id: "OnZSAKWaJIU8", label: "Gabon" }, + // { id: "cmHEGf3NH2sA", label: "Gambia" }, + // { id: "xDYXjww9Xtgo", label: "Georgia" }, + // { id: "NuBE9QCiSDc2", label: "Germany" }, + // { id: "RrIlTGlQRKSE", label: "Ghana" }, + // { id: "XqQ1PXOzsJUG", label: "Greece" }, + // { id: "RkMh2hl4WXh0", label: "Grenada" }, + // { id: "6oQwzPhJrj7R", label: "Guatemala" }, + // { id: "5afXBrBpRN0w", label: "Guinea" }, + // { id: "qFvl0OVqT5Or", label: "Guinea-Bissau" }, + // { id: "3tZqajnmemz0", label: "Guyana" }, + // { id: "yhpg38rY1jFJ", label: "Haiti" }, + // { id: "0H7Oa3hmtNpW", label: "Holy See" }, + // { id: "75OSvjbpTbNV", label: "Honduras" }, + // { id: "TaefzvkdvTg4", label: "Hong Kong" }, + // { id: "AeMRpGZgcyVG", label: "Hungary" }, + // { id: "KBJizGOFHAMl", label: "Iceland" }, + // { id: "DIDO3s3yBl8t", label: "India" }, + // { id: "EJ8pibBAPXGB", label: "Indonesia" }, + // { id: "sOjRUeecgUSF", label: "Iran" }, + // { id: "Hur1mJ1bmQAc", label: "Iraq" }, + // { id: "X7GjPWpIfA5w", label: "Ireland" }, + // { id: "qklzBVYmx3JQ", label: "Israel" }, + // { id: "pfKzb57zkhxz", label: "Italy" }, + // { id: "PeMKcsNVsE67", label: "Jamaica" }, + // { id: "dtLFo2hjuayU", label: "Japan" }, + // { id: "M7rMlJaKyepP", label: "Jordan" }, + // { id: "5w05kNWyDhSk", label: "Kazakhstan" }, + // { id: "jb3Or7SlMrEL", label: "Kenya" }, + // { id: "0vGWD1l9eyRC", label: "Kiribati" }, + // { id: "hRmyNAMQg7Wx", label: "Kosovo" }, + // { id: "EAWjwqRsXpUN", label: "Kuwait" }, + // { id: "AKydA2diOPJ9", label: "Kyrgyzstan" }, + // { id: "Y3BwdRzjzg4w", label: "Laos" }, + // { id: "azcPEY3tw8zB", label: "Latvia" }, + // { id: "iaDA1gcwvLok", label: "Lebanon" }, + // { id: "99NiMd7U6MNH", label: "Lesotho" }, + // { id: "0kvw7ftffYNV", label: "Liberia" }, + // { id: "71pMBrCicOjj", label: "Libya" }, + // { id: "gzamHsfQuqHJ", label: "Liechtenstein" }, + // { id: "wusYAZJ9AOPU", label: "Lithuania" }, + // { id: "3TT3T1ctU7cu", label: "Luxembourg" }, + // { id: "iKKZEARJNWnH", label: "Macau" }, + // { id: "pwYlUwiMDsMn", label: "Macedonia" }, + // { id: "SJ4LJtOUhi8T", label: "Madagascar" }, + // { id: "0lV7E5J5BjL2", label: "Malawi" }, + // { id: "D3hxSqJ3ecGI", label: "Malaysia" }, + // { id: "MD9vfEtORl5I", label: "Maldives" }, + // { id: "lm0qiEoUyWJQ", label: "Mali" }, + // { id: "pY1svv8Wmmik", label: "Malta" }, + // { id: "Vyxcknp5FxkZ", label: "Marshall Islands" }, + // { id: "Et2OIYo09lFh", label: "Mauritania" }, + // { id: "TTFv8wWUGxrL", label: "Mauritius" }, + // { id: "V700pfY1WmiR", label: "Mexico" }, + // { id: "yOSMmEdLCCuv", label: "Micronesia" }, + // { id: "gsu3MFEl8w3Y", label: "Moldova" }, + // { id: "cTaKbfzMbd4E", label: "Monaco" }, + // { id: "ilsmf1EByAby", label: "Mongolia" }, + // { id: "mjyCLTqOBBzD", label: "Montenegro" }, + // { id: "45QMORuJSJqs", label: "Morocco" }, + // { id: "UPKZfXtHAtL4", label: "Mozambique" }, + // { id: "6JGAFZWk2F0c", label: "Namibia" }, + // { id: "RAzzAwKCHVWV", label: "Nauru" }, + // { id: "VLIdG7FehvOA", label: "Nepal" }, + // { id: "nfkjJlekuBL5", label: "Netherlands" }, + // { id: "ZX4R5DSFr0JB", label: "Netherlands Antilles" }, + // { id: "vD0epxjGd9mx", label: "New Zealand" }, + // { id: "MEwOvWXLx3oY", label: "Nicaragua" }, + // { id: "L4h3KmLJH7jS", label: "Niger" }, + // { id: "jPUbeuiEYe0b", label: "Nigeria" }, + // { id: "uPlyhEafOdQp", label: "North Korea" }, + // { id: "WFyflJIL33Fj", label: "Norway" }, + // { id: "YjjYDLM8FqUF", label: "Oman" }, + // { id: "EncJ3TVvCLQv", label: "Pakistan" }, + // { id: "vBSEk4bamECF", label: "Palau" }, + // { id: "AxxDvya6pDlt", label: "Palestinian Territories" }, + // { id: "WCeodSquLgpb", label: "Panama" }, + // { id: "ataYnxT13TvK", label: "Papua New Guinea" }, + // { id: "J2jKGUzmjf4S", label: "Paraguay" }, + // { id: "VcwyY6ff1u7d", label: "Peru" }, + // { id: "EVmEBkD5Xix2", label: "Philippines" }, + // { id: "iF5y1bW1v8hm", label: "Poland" }, + // { id: "v40zNHMaqbr7", label: "Portugal" }, + // { id: "VvuFo8NEWwHr", label: "Qatar" }, + // { id: "88CwuIlqIV7Y", label: "Romania" }, + // { id: "lxh51YkksSoN", label: "Russia" }, + // { id: "np8fMzz33Dok", label: "Rwanda" }, + // { id: "ZIlLXuzLa5n0", label: "Saint Kitts and Nevis" }, + // { id: "PLf7ZfXhuHmh", label: "Saint Lucia" }, + // { + // id: "H2esyJBCWQ66", + // label: "Saint Vincent and the Grenadines", + // }, + // { id: "e0srYwLU8IsT", label: "Samoa" }, + // { id: "dYfyeFXfqgne", label: "San Marino" }, + // { id: "y25FmWFP3iVv", label: "Sao Tome and Principe" }, + // { id: "NLCwpMSpZmio", label: "Saudi Arabia" }, + // { id: "qO9XHeoBSRni", label: "Senegal" }, + // { id: "o5zx2a2buPSe", label: "Serbia" }, + // { id: "vV3nsJDxtDoU", label: "Seychelles" }, + // { id: "LCNpig2cPPRY", label: "Sierra Leone" }, + // { id: "eXHNHTIlWwlR", label: "Singapore" }, + // { id: "qVlfEHaLx4wk", label: "Sint Maarten" }, + // { id: "j1mHj03aq7cA", label: "Slovakia" }, + // { id: "0capewNWlzMn", label: "Slovenia" }, + // { id: "Eaanmrqauymz", label: "Solomon Islands" }, + // { id: "pQfkoAzDEra2", label: "Somalia" }, + // { id: "ymlXBNG9kQ45", label: "South Africa" }, + // { id: "VZMvFMKde19O", label: "South Korea" }, + // { id: "N9x58Op8Y57d", label: "South Sudan" }, + // { id: "c5EmR4eZ0wuC", label: "Spain" }, + // { id: "piVS3FMOVDKT", label: "Sri Lanka" }, + // { id: "epQb60K5Af7c", label: "Sudan" }, + // { id: "1vHyzuFIvA8q", label: "Suriname" }, + // { id: "GuWeqIDLSFRK", label: "Swaziland" }, + // { id: "slJUXW371ZF9", label: "Sweden" }, + // { id: "HvFLKGb0BruO", label: "Switzerland" }, + // { id: "hMLZFBhUCWbj", label: "Syria" }, + // { id: "WlEH0Xc5b6QP", label: "Taiwan" }, + // { id: "AjkPdFBfoUrg", label: "Tajikistan" }, + // { id: "i14Hxyqtsrwb", label: "Tanzania" }, + // { id: "gMzxmmeYfNRs", label: "Thailand" }, + // { id: "OAtKqjECvKJi", label: "Togo" }, + // { id: "i2pUEWLq2Pg7", label: "Tonga" }, + // { id: "u6cZtgnU4bXf", label: "Trinidad and Tobago" }, + // { id: "0xUYURCIqgsb", label: "Tunisia" }, + // { id: "ciTWM7yCnAJ0", label: "Turkey" }, + // { id: "EALLOUAoWToz", label: "Turkmenistan" }, + // { id: "0yfWs9vbLJm6", label: "Tuvalu" }, + // { id: "Wp47o77MuFlH", label: "Uganda" }, + // { id: "1wduuBAdGHpv", label: "Ukraine" }, + // { id: "0faSCuoqHr5d", label: "United Arab Emirates" }, + // { id: "Xur3acA5TU9L", label: "United Kingdom" }, + // { id: "lvQrSWcgW31q", label: "United States of America" }, + // { id: "GRfsHMa5nQs2", label: "Uruguay" }, + // { id: "Wrkp5dvgu18A", label: "Uzbekistan" }, + // { id: "imCoEDqhKcS4", label: "Vanuatu" }, + // { id: "aDaPDPlWAsTJ", label: "Venezuela" }, + // { id: "qn70yN7yXmng", label: "Vietnam" }, + // { id: "hBnBHj91cw6J", label: "Yemen" }, + // { id: "gZm8uBgeQ2lN", label: "Zambia" }, + // { id: "sABMpOSW32x1", label: "Zimbabwe" }, + // ], + // properties: {}, + // }, + // { + // id: "HGOZa4w1y0KA", + // ref: "01E0D1GYEQD9BB15HQM3GHTP48", + // type: "dropdown", + // title: "Which industry do you work in?", + // choices: [ + // { id: "77lPtDHFiOzB", label: "Accounting" }, + // { id: "KX8Kme95lkS6", label: "Airlines / Aviation" }, + // { + // id: "EIyBdznqN1Gw", + // label: "Alternative Dispute Resolution", + // }, + // { id: "e84axRfJwxq8", label: "Alternative Medicine" }, + // { id: "5fuLx4qlpNPk", label: "Animation" }, + // { id: "1n6J5yJJzcse", label: "Apparel & Fashion" }, + // { id: "PnN0H8tdTB80", label: "Architecture & Planning" }, + // { id: "D34NLCmd23YZ", label: "Arts & Crafts" }, + // { id: "lYITB5VoOIcF", label: "Automotive" }, + // { id: "H5NC4pjcbCqV", label: "Aviation & Aerospace" }, + // { id: "2gFWS40gDg1A", label: "Banking" }, + // { id: "54GpagRojhHs", label: "Biotechnology" }, + // { id: "ZwG1VhxHNjst", label: "Broadcast Media" }, + // { id: "9pAePnDgsiw1", label: "Building Materials" }, + // { + // id: "4cnAiFIKDufn", + // label: "Business Supplies & Equipment", + // }, + // { id: "AXEa04WRZI8r", label: "Capital Markets" }, + // { id: "XWuVYl07gv3O", label: "Chemicals" }, + // { id: "bEwdkJHDML1x", label: "Civic & Social Organization" }, + // { id: "M7kxd79NpPo9", label: "Civil Engineering" }, + // { id: "YJl3aVWCQjiN", label: "Commercial Real Estate" }, + // { id: "pkvJ75nOYtez", label: "Computer & Network Security" }, + // { id: "j0oQIfxom25I", label: "Computer Games" }, + // { id: "s9gvhKjKl7NF", label: "Computer Hardware" }, + // { id: "NMTGWsKzo4gm", label: "Computer Networking" }, + // { id: "6WmYi5g83Kvx", label: "Computer Software" }, + // { id: "MDRi2eq5efa6", label: "Construction" }, + // { id: "7GjU5OcS2aD3", label: "Consumer Electronics" }, + // { id: "jOvy0iZ8LH1l", label: "Consumer Goods" }, + // { id: "XSyoiJHLzQvS", label: "Consumer Services" }, + // { id: "6bNIAAJGHpa1", label: "Cosmetics" }, + // { id: "gEUe3ZwU4uZH", label: "Dairy" }, + // { id: "615eY7EoT3OG", label: "Defense & Space" }, + // { id: "vX4yklDQXKYd", label: "Design" }, + // { id: "3XMkqTwR010U", label: "Education Management" }, + // { id: "tUqTNp80txlK", label: "E-Learning" }, + // { + // id: "WbKX6hdmikja", + // label: "Electrical / Electronic Manufacturing", + // }, + // { id: "kWq8zLpPXGWr", label: "Entertainment" }, + // { id: "3zdElcaTLqmO", label: "Environmental Services" }, + // { id: "OncO5lcBVRQZ", label: "Events Services" }, + // { id: "Glob2ZFgGlqI", label: "Executive Office" }, + // { id: "Xm0uvRO2LaCV", label: "Facilities Services" }, + // { id: "Ol75oYMO79Iv", label: "Farming" }, + // { id: "UO6ohgvOipmx", label: "Financial Services" }, + // { id: "TimuH2bxqtxR", label: "Fine Art" }, + // { id: "2C8avtFKfKgZ", label: "Fishery" }, + // { id: "YfFbdsRqFfAy", label: "Food & Beverages" }, + // { id: "DfeP1p9yQK8J", label: "Food Production" }, + // { id: "ZGUWXE62lOvf", label: "Fund-Raising" }, + // { id: "X1ZMol7KUWiT", label: "Furniture" }, + // { id: "Ke7yN9v817OJ", label: "Gambling & Casinos" }, + // { id: "TWr7lQ63TtqR", label: "Glass, Ceramics & Concrete" }, + // { id: "s5KwhlZXQZ5U", label: "Government Administration" }, + // { id: "BgwNUDeFX5dl", label: "Government Relations" }, + // { id: "Y0DwYfctqkox", label: "Graphic Design" }, + // { id: "mqX4N97ZzYGp", label: "Health, Wellness & Fitness" }, + // { id: "ojcG3WKf9av0", label: "Higher Education" }, + // { id: "0iPTcSwStPZR", label: "Hospital & Health Care" }, + // { id: "JsRJNwBz3lLr", label: "Hospitality" }, + // { id: "D1UM3Rf5qKUv", label: "Human Resources" }, + // { id: "YDIlUGJwrCsV", label: "Import & Export" }, + // { id: "BkvHblIr6YuV", label: "Individual & Family Services" }, + // { id: "NVqagPACTmu4", label: "Industrial Automation" }, + // { id: "f3knBiVcAXSe", label: "Information Services" }, + // { + // id: "D3Aoe6Aurir2", + // label: "Information Technology & Services", + // }, + // { id: "Gc5Epj3X6KA7", label: "Insurance" }, + // { id: "grB5kmdsQYq0", label: "International Affairs" }, + // { + // id: "YTGDn3WbKltc", + // label: "International Trade & Development", + // }, + // { id: "Dw9bWINQWTaP", label: "Internet" }, + // { id: "e18g5yqMuBej", label: "Investment Banking" }, + // { id: "hS3hgRf2YQPi", label: "Investment Management" }, + // { id: "LlZWE1u749ZK", label: "Judiciary" }, + // { id: "jsH5mWxEAhtK", label: "Law Enforcement" }, + // { id: "iLqzLB8ZRgzA", label: "Law Practice" }, + // { id: "1TVvDiHJCaIj", label: "Legal Services" }, + // { id: "X4p2nuvWW8N6", label: "Legislative Office" }, + // { id: "PWMMKGTwJoRw", label: "Leisure, Travel & Tourism" }, + // { id: "89gZFc6LHyZ5", label: "Libraries" }, + // { id: "WkHt2RG6Jl3X", label: "Logistics & Supply Chain" }, + // { id: "hBFJmaZswc9n", label: "Luxury Goods & Jewelry" }, + // { id: "hjCMl5N8afHM", label: "Machinery" }, + // { id: "VbV1uW52jmny", label: "Management Consulting" }, + // { id: "xhlgTG3dYPMb", label: "Maritime" }, + // { id: "16vkJZrkXlca", label: "Market Research" }, + // { id: "qZGO9vzmNPq2", label: "Marketing & Advertising" }, + // { + // id: "rHm0Nt3uZl7F", + // label: "Mechanical or Industrial Engineering", + // }, + // { id: "OwP4JeBr0j0G", label: "Media Production" }, + // { id: "miMRHxk0l959", label: "Medical Devices" }, + // { id: "Hhn53Eclnas6", label: "Medical Practice" }, + // { id: "BMagEysbHmMK", label: "Mental Health Care" }, + // { id: "u7lU7MTxsunj", label: "Military" }, + // { id: "WfRuLtRj7BKP", label: "Mining & Metals" }, + // { id: "tc01goGeJFVW", label: "Motion Pictures & Film" }, + // { id: "bBYBSyukCAFY", label: "Museums & Institutions" }, + // { id: "6yR1VeBfFhEh", label: "Music" }, + // { id: "fuoMnv0V0nMT", label: "Nanotechnology" }, + // { id: "rDcUbjtUm5yv", label: "Newspapers" }, + // { + // id: "aHKguzWt7l0K", + // label: "Non-Profit Organization Management", + // }, + // { id: "t3ZEhGezG7Z3", label: "Oil & Energy" }, + // { id: "WcbW8j48MxMT", label: "Online Media" }, + // { id: "Tpdw3tCpKAsK", label: "Outsourcing / Offshoring" }, + // { id: "5fBlSGSpjVEo", label: "Package / Freight Delivery" }, + // { id: "uQNe1hNahQCB", label: "Packaging & Containers" }, + // { id: "lIFZqYG6cUxq", label: "Paper & Forest Products" }, + // { id: "TUboFmLiI4fV", label: "Performing Arts" }, + // { id: "uxvAp7acAWCK", label: "Pharmaceuticals" }, + // { id: "0IZadLrSljxJ", label: "Philanthropy" }, + // { id: "J3xo4a1qXYIx", label: "Photography" }, + // { id: "Vqsx9VF52ZOh", label: "Plastics" }, + // { id: "A7vMqTFmkSKF", label: "Political Organization" }, + // { + // id: "tfnLrZhqcvoW", + // label: "Primary / Secondary Education", + // }, + // { id: "SDnZiz1dQXuz", label: "Printing" }, + // { + // id: "TtfgJ7RpkdHu", + // label: "Professional Training & Coaching", + // }, + // { id: "k5SJTP7RmrNh", label: "Program Development" }, + // { id: "X63sl3HMjPyj", label: "Public Policy" }, + // { + // id: "5GrlMfOFNzS2", + // label: "Public Relations & Communications", + // }, + // { id: "ZOBYjPzQhqoR", label: "Public Safety" }, + // { id: "To7iwxoFrHt2", label: "Publishing" }, + // { id: "rrsI1xfb0KAA", label: "Railroad Manufacture" }, + // { id: "7fOAZo2pinlk", label: "Ranching" }, + // { id: "LVLKDGbCYEBG", label: "Real Estate" }, + // { + // id: "3qSlgYAnDkrA", + // label: "Recreational Facilities & Services", + // }, + // { id: "jpTqr5Nkura9", label: "Religious Institutions" }, + // { id: "jI33Ui8fMR5O", label: "Renewables & Environment" }, + // { id: "F1JLKQA8txk0", label: "Research" }, + // { id: "mCegzlG9vO6i", label: "Restaurants" }, + // { id: "zO2BvtMerVjf", label: "Retail" }, + // { id: "ofW7YoOUSrCC", label: "Security & Investigations" }, + // { id: "4Haufz0JrTDE", label: "Semiconductors" }, + // { id: "N736YR9XCjmr", label: "Shipbuilding" }, + // { id: "rT2McpSoy9xW", label: "Sporting Goods" }, + // { id: "eUUVflIOrpq8", label: "Sports" }, + // { id: "rlOHaqkctWFN", label: "Staffing & Recruiting" }, + // { id: "EJa1VQzU6JYe", label: "Supermarkets" }, + // { id: "JcU4vLD0iwFZ", label: "Telecommunications" }, + // { id: "Bwf7wu42B9K6", label: "Textiles" }, + // { id: "NoNKVyUKPoDy", label: "Think Tanks" }, + // { id: "YpkOGvOfOYzT", label: "Tobacco" }, + // { id: "B3HgG19r8Gnm", label: "Translation & Localization" }, + // { + // id: "LGKGVHIqZdzl", + // label: "Transportation / Trucking / Railroad", + // }, + // { id: "QYKm7bOiYdpM", label: "Utilities" }, + // { + // id: "lyFfiqHrW6sM", + // label: "Venture Capital & Private Equity", + // }, + // { id: "l54TIxHhz7KG", label: "Veterinary" }, + // { id: "UN9mqjfN48EA", label: "Warehousing" }, + // { id: "3Ev9drZtCCqr", label: "Wholesale" }, + // { id: "K90mh5ZHv2Tn", label: "Wine & Spirits" }, + // { id: "Oxp0WyLxlufQ", label: "Wireless" }, + // { id: "UjXQa2oSLSz4", label: "Writing & Editing" }, + // ], + // properties: {}, + // }, + // { + // id: "KvMvx4hBtOcV", + // ref: "01E0D1GYEQ17BCE98BZPASH3K6", + // type: "multiple_choice", + // title: "How many employees does your organization have?", + // choices: [ + // { id: "Z6TiX8WFahlL", label: "It's just me :)" }, + // { id: "lJahxmsyIRN4", label: "2 to 10" }, + // { id: "PzrS0m4d6kUb", label: "11 to 50" }, + // { id: "FC2uIYYNxVT9", label: "51 to 200" }, + // { id: "z15fSBWwILmr", label: "500 or more" }, + // ], + // properties: {}, + // }, + // ], + // endings: [ + // { + // id: "DefaultTyScreen", + // ref: "default_tys", + // type: "thankyou_screen", + // title: + // "Thanks for completing this typeform\nNow *create your own* — it's free, easy, & beautiful", + // attachment: { + // href: "https://images.typeform.com/images/2dpnUBBkz2VN", + // type: "image", + // }, + // properties: { + // button_mode: "default_redirect", + // button_text: "Create a *typeform*", + // share_icons: false, + // show_button: true, + // }, + // }, + // ], + // }, + // submitted_at: "2023-03-05T17:30:09Z", + // }, + // }; + + // const validationResult = await validate(data, events.formResponse.schema); + // console.log(validationResult); + // expect(validationResult).toEqual({ + // success: true, + // }); + // }); + // }); +}); diff --git a/apps/integrations/src/integrations/stripe/webhooks/examples.ts b/apps/integrations/src/integrations/stripe/webhooks/examples.ts new file mode 100644 index 00000000000..4cc995ca143 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/webhooks/examples.ts @@ -0,0 +1,274 @@ +export const example = { + event_id: "LtWXD3crgy", + event_type: "form_response", + form_response: { + form_id: "lT4Z3j", + token: "a3a12ec67a1365927098a606107fac15", + submitted_at: "2018-01-18T18:17:02Z", + landed_at: "2018-01-18T18:07:02Z", + calculated: { + score: 9, + }, + variables: [ + { + key: "score", + type: "number", + number: 4, + }, + { + key: "name", + type: "text", + text: "typeform", + }, + ], + hidden: { + user_id: "abc123456", + }, + definition: { + id: "lT4Z3j", + title: "Webhooks example", + fields: [ + { + id: "DlXFaesGBpoF", + title: + "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", + type: "long_text", + ref: "readable_ref_long_text", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "SMEUb7VJz92Q", + title: + "If you're OK with our city management following up if they have further questions, please give us your email address.", + type: "email", + ref: "readable_ref_email", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "JwWggjAKtOkA", + title: "What is your first name?", + type: "short_text", + ref: "readable_ref_short_text", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "KoJxDM3c6x8h", + title: "When did you move to the place where you live?", + type: "date", + ref: "readable_ref_date", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "PNe8ZKBK8C2Q", + title: + "Which pictures do you like? You can choose as many as you like.", + type: "picture_choice", + ref: "readable_ref_picture_choice", + allow_multiple_selections: true, + allow_other_choice: false, + }, + { + id: "Q7M2XAwY04dW", + title: + "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", + type: "number", + ref: "readable_ref_number1", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "gFFf3xAkJKsr", + title: + "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", + type: "legal", + ref: "readable_ref_legal", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "k6TP9oLGgHjl", + title: "Which of these cities is your favorite?", + type: "multiple_choice", + ref: "readable_ref_multiple_choice", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "RUqkXSeXBXSd", + title: "Do you have a favorite city we haven't listed?", + type: "yes_no", + ref: "readable_ref_yes_no", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "NRsxU591jIW9", + title: + "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", + type: "opinion_scale", + ref: "readable_ref_opinion_scale", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "WOTdC00F8A3h", + title: + "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", + type: "rating", + ref: "readable_ref_rating", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "pn48RmPazVdM", + title: + "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", + type: "number", + ref: "readable_ref_number2", + allow_multiple_selections: false, + allow_other_choice: false, + }, + { + id: "M5tXK5kG7IeA", + title: "Book a time with me", + type: "calendly", + ref: "readable_ref_calendly", + properties: {}, + }, + ], + endings: [ + { + id: "dN5FLyFpCMFo", + ref: "01GRC8GR2017M6WW347T86VV39", + title: "Bye!", + type: "thankyou_screen", + properties: { + button_text: "Create a typeform", + show_button: true, + share_icons: true, + button_mode: "default_redirect", + }, + }, + ], + }, + answers: [ + { + type: "text", + text: "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", + field: { + id: "DlXFaesGBpoF", + type: "long_text", + }, + }, + { + type: "email", + email: "laura@example.com", + field: { + id: "SMEUb7VJz92Q", + type: "email", + }, + }, + { + type: "text", + text: "Laura", + field: { + id: "JwWggjAKtOkA", + type: "short_text", + }, + }, + { + type: "date", + date: "2005-10-15", + field: { + id: "KoJxDM3c6x8h", + type: "date", + }, + }, + { + type: "choices", + choices: { + labels: ["London", "Sydney"], + }, + field: { + id: "PNe8ZKBK8C2Q", + type: "picture_choice", + }, + }, + { + type: "number", + number: 5, + field: { + id: "Q7M2XAwY04dW", + type: "number", + }, + }, + { + type: "boolean", + boolean: true, + field: { + id: "gFFf3xAkJKsr", + type: "legal", + }, + }, + { + type: "choice", + choice: { + label: "London", + }, + field: { + id: "k6TP9oLGgHjl", + type: "multiple_choice", + }, + }, + { + type: "boolean", + boolean: false, + field: { + id: "RUqkXSeXBXSd", + type: "yes_no", + }, + }, + { + type: "number", + number: 2, + field: { + id: "NRsxU591jIW9", + type: "opinion_scale", + }, + }, + { + type: "number", + number: 3, + field: { + id: "WOTdC00F8A3h", + type: "rating", + }, + }, + { + type: "number", + number: 4, + field: { + id: "pn48RmPazVdM", + type: "number", + }, + }, + { + type: "url", + url: "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", + field: { + id: "M5tXK5kG7IeA", + type: "calendly", + ref: "readable_ref_calendly", + }, + }, + ], + ending: { + id: "dN5FLyFpCMFo", + ref: "01GRC8GR2017M6WW347T86VV39", + }, + }, +}; diff --git a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts new file mode 100644 index 00000000000..1f2a4cedf4f --- /dev/null +++ b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts @@ -0,0 +1,318 @@ +import { + makeArraySchema, + makeBooleanSchema, + makeNumberSchema, + makeObjectSchema, + makeOneOf, + makeStringSchema, +} from "core/schemas/makeSchema"; + +//Payload reference here +//https://www.typeform.com/developers/webhooks/example-payload/ + +function makeAnswerField(types: string[]) { + let typeField = makeStringSchema("type", `The type of the field`); + if (types.length === 1) { + typeField = makeStringSchema("type", `The type of the field`, { + const: types[0], + }); + } else if (types.length > 1) { + typeField = makeStringSchema("type", `The type of the field`, { + enum: types, + }); + } + + return makeObjectSchema("field", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the field`), + type: typeField, + }, + optionalProperties: { + ref: makeStringSchema("ref", `The ref of the field`), + }, + }); +} + +const TextAnswer = makeObjectSchema("text answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "text", + }), + text: makeStringSchema("text", `The value of the answer`), + field: makeAnswerField(["short_text", "long_text"]), + }, +}); + +const EmailAnswer = makeObjectSchema("email answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "email", + }), + email: makeStringSchema("email", `The value of the answer`), + field: makeAnswerField(["email"]), + }, +}); + +const DateAnswer = makeObjectSchema("date answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "date", + }), + date: makeStringSchema("date", `The value of the answer`), + field: makeAnswerField(["date"]), + }, +}); + +const ChoicesAnswer = makeObjectSchema("choices answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "choices", + }), + choices: makeObjectSchema("choices", { + requiredProperties: { + labels: makeArraySchema( + "labels", + makeStringSchema("label", `The label of the choice`) + ), + }, + optionalProperties: { + other: makeStringSchema( + "label", + `What the user typed in to the "other" field` + ), + }, + }), + field: makeAnswerField(["picture_choice", "dropdown", "multiple_choice"]), + }, +}); + +const ChoiceAnswer = makeObjectSchema("choice answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "choice", + }), + choice: makeObjectSchema("choice", { + optionalProperties: { + label: makeStringSchema("label", `The label of the choice`), + other: makeStringSchema( + "label", + `What the user typed in to the "other" field` + ), + }, + }), + field: makeAnswerField(["picture_choice", "dropdown", "multiple_choice"]), + }, +}); + +const BooleanAnswer = makeObjectSchema("boolean answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "boolean", + }), + boolean: makeBooleanSchema("boolean", `The value of the answer`), + field: makeAnswerField(["legal", "yes_no"]), + }, +}); + +const UrlAnswer = makeObjectSchema("url answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "url", + }), + url: makeStringSchema("url", `The value of the answer`), + field: makeAnswerField(["website", "calendly"]), + }, +}); + +const NumberAnswer = makeObjectSchema("number answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "number", + }), + number: makeNumberSchema("number", `The value of the answer`), + field: makeAnswerField([]), + }, +}); + +const FileUrlAnswer = makeObjectSchema("file url answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "file_url", + }), + file_url: makeStringSchema("file_url", `The value of the answer`), + field: makeAnswerField(["file_upload"]), + }, +}); + +const PaymentAnswer = makeObjectSchema("payment answer", { + requiredProperties: { + type: makeStringSchema("type", `The type of the answer`, { + const: "payment", + }), + payment: makeObjectSchema("payment", { + requiredProperties: { + amount: makeNumberSchema("amount", `The amount of the payment`), + last4: makeStringSchema("last4", `The last 4 digits of the card`), + name: makeStringSchema("name", `The name of the credit card`), + success: makeBooleanSchema("success", `Whether the payment succeeded`), + }, + }), + field: makeAnswerField(["payment"]), + }, +}); + +const Answers = [ + TextAnswer, + ChoiceAnswer, + ChoicesAnswer, + EmailAnswer, + DateAnswer, + BooleanAnswer, + UrlAnswer, + NumberAnswer, + FileUrlAnswer, + PaymentAnswer, +]; + +export const formEventSchema = makeObjectSchema("form_response", { + requiredProperties: { + event_id: makeStringSchema( + "event_id", + `The ID of the event that triggered this webhook` + ), + event_type: makeStringSchema( + "event_type", + `The type of event, always "form_response"`, + { const: "form_response" } + ), + form_response: makeObjectSchema("form_response", { + requiredProperties: { + form_id: makeStringSchema( + "form_id", + `The ID of the form that was submitted` + ), + token: makeStringSchema("token", `The unique token for this response`), + submitted_at: makeStringSchema( + "submitted_at", + `The date and time the response was submitted` + ), + landed_at: makeStringSchema( + "landed_at", + `The date and time the respondent landed on the form` + ), + definition: makeObjectSchema("definition", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the form`), + title: makeStringSchema("title", `The title of the form`), + fields: makeArraySchema( + "fields", + makeObjectSchema("field", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the field`), + title: makeStringSchema("title", `The title of the field`), + type: makeStringSchema("type", `The type of the field`), + ref: makeStringSchema( + "ref", + "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + ), + }, + optionalProperties: { + allow_multiple_selections: makeBooleanSchema( + "allow_multiple_selections", + "Whether or not the field allows multiple selections" + ), + allow_other_choice: makeBooleanSchema( + "allow_other_choice", + "Whether or not the field allows an 'other' choice" + ), + choices: makeArraySchema( + "choices", + makeObjectSchema("choice", { + requiredProperties: { + label: makeStringSchema( + "label", + "The label of the choice" + ), + id: makeStringSchema("id", "The ID of the choice"), + }, + }) + ), + }, + }) + ), + }, + optionalProperties: { + endings: makeArraySchema( + "endings", + makeObjectSchema("ending", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the ending`), + ref: makeStringSchema( + "ref", + "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + ), + title: makeStringSchema("title", `The title of the ending`), + type: makeStringSchema("type", `The type of the ending`), + }, + additionalProperties: true, + }) + ), + }, + }), + answers: makeArraySchema("answers", makeOneOf("answer", Answers)), + ending: makeObjectSchema("ending", { + requiredProperties: { + id: makeStringSchema("id", `The ID of the ending`), + ref: makeStringSchema( + "ref", + "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." + ), + }, + additionalProperties: true, + }), + }, + optionalProperties: { + calculated: makeObjectSchema("calculated", { + requiredProperties: { + score: makeNumberSchema( + "score", + `The score of the response, if the form has a score field` + ), + }, + }), + variables: makeArraySchema( + "variables", + makeOneOf("variable", [ + makeObjectSchema("number variable", { + requiredProperties: { + key: makeStringSchema( + "key", + `The unique identifier for the variable` + ), + type: makeStringSchema("type", `The type of the variable`, { + const: "text", + }), + text: makeStringSchema("text", `The value of the variable`), + }, + }), + makeObjectSchema("number variable", { + requiredProperties: { + key: makeStringSchema( + "key", + `The unique identifier for the variable` + ), + type: makeStringSchema("type", `The type of the variable`, { + const: "number", + }), + number: makeNumberSchema("number", `The value of the variable`), + }, + }), + ]) + ), + hidden: makeObjectSchema("hidden", { + additionalProperties: true, + }), + }, + }), + }, +}); diff --git a/apps/integrations/src/integrations/stripe/webhooks/specs.ts b/apps/integrations/src/integrations/stripe/webhooks/specs.ts new file mode 100644 index 00000000000..d6fafd0010b --- /dev/null +++ b/apps/integrations/src/integrations/stripe/webhooks/specs.ts @@ -0,0 +1,564 @@ +import { createJSONPointer } from "core/common/pointer"; +import { EndpointSpec } from "core/endpoint/types"; +import { WebhookSpec } from "core/webhook/types"; + +const createEndpoint: EndpointSpec = { + method: "POST", + path: "/webhook_endpoints", + metadata: { + name: "Create webhook", + description: "Create a webhook for a form", + displayProperties: { + title: "Create webhook", + }, + tags: ["webhook"], + }, + security: { + apiKey: ["webhooks:write"], + }, + request: { + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + body: { + format: { + type: "form-urlencoded", + encoding: { + enabled_events: { + style: "deepObject", + explode: true, + }, + expand: { + style: "deepObject", + explode: true, + }, + metadata: { + style: "deepObject", + explode: true, + }, + }, + }, + schema: { + additionalProperties: false, + properties: { + api_version: { + description: + "Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.", + enum: [ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15", + ], + maxLength: 5000, + type: "string", + "x-stripeBypassValidation": true, + }, + connect: { + description: + "Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.", + type: "boolean", + }, + description: { + description: + "An optional description of what the webhook is used for.", + maxLength: 5000, + type: "string", + }, + enabled_events: { + description: + "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + items: { + enum: [ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "invoiceitem.updated", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "order.created", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "sku.created", + "sku.deleted", + "sku.updated", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + ], + type: "string", + "x-stripeBypassValidation": true, + }, + type: "array", + }, + expand: { + description: + "Specifies which fields in the response should be expanded.", + items: { + maxLength: 5000, + type: "string", + }, + type: "array", + }, + metadata: { + anyOf: [ + { + additionalProperties: { + type: "string", + }, + type: "object", + }, + { + enum: [""], + type: "string", + }, + ], + description: + "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + }, + url: { + description: "The URL of the webhook endpoint.", + type: "string", + }, + }, + required: ["enabled_events", "url"], + type: "object", + }, + }, + }, + responses: [ + { + success: true, + name: "Success", + matches: ({ statusCode }) => statusCode >= 200 && statusCode < 300, + schema: { + type: "object", + description: + "You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).", + properties: { + api_version: { + description: + "The API version events are rendered as for this webhook endpoint.", + maxLength: 5000, + nullable: true, + type: "string", + }, + application: { + description: "The ID of the associated Connect application.", + maxLength: 5000, + nullable: true, + type: "string", + }, + created: { + description: + "Time at which the object was created. Measured in seconds since the Unix epoch.", + format: "unix-time", + type: "integer", + }, + description: { + description: + "An optional description of what the webhook is used for.", + maxLength: 5000, + nullable: true, + type: "string", + }, + enabled_events: { + description: + "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", + items: { + maxLength: 5000, + type: "string", + }, + type: "array", + }, + id: { + description: "Unique identifier for the object.", + maxLength: 5000, + type: "string", + }, + livemode: { + description: + "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + type: "boolean", + }, + metadata: { + additionalProperties: { + maxLength: 500, + type: "string", + }, + description: + "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + type: "object", + }, + object: { + description: + "String representing the object's type. Objects of the same type share the same value.", + enum: ["webhook_endpoint"], + type: "string", + }, + secret: { + description: + "The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.", + maxLength: 5000, + type: "string", + }, + status: { + description: + "The status of the webhook. It can be `enabled` or `disabled`.", + maxLength: 5000, + type: "string", + }, + url: { + description: "The URL of the webhook endpoint.", + maxLength: 5000, + type: "string", + }, + }, + required: [ + "created", + "enabled_events", + "id", + "livemode", + "metadata", + "object", + "status", + "url", + ], + title: "NotificationWebhookEndpoint", + "x-expandableFields": [], + "x-resourceId": "webhook_endpoint", + }, + }, + { + success: false, + name: "Error", + matches: ({ statusCode }) => statusCode < 200 || statusCode >= 300, + schema: { + type: "object", + description: "An error response from the Stripe API", + properties: { + error: { + type: "object", + additionalProperties: true, + }, + }, + required: ["error"], + }, + }, + ], +}; + +export const webhookSpec: WebhookSpec = { + id: "webhook", + metadata: { + name: "Stripe webhooks", + description: "An event happened in your Stripe account", + tags: ["stripe"], + }, + subscribe: { + type: "automatic", + requiresSecret: true, + create: createEndpoint, + }, +}; diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts new file mode 100644 index 00000000000..6bf6c3bc14c --- /dev/null +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -0,0 +1,112 @@ +import { makeWebhook } from "core/webhook"; +import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; +import crypto from "node:crypto"; +import { authentication } from "../authentication"; +import { example } from "./examples"; +import { formEventSchema } from "./schemas"; +import { webhookSpec } from "./specs"; + +const baseUrl = "https://api.stripe.com/v1"; + +export const checkoutCompleted: WebhookEvent = { + name: "checkout.session.completed", + metadata: { + title: "Checkout session completed", + description: "A form response was submitted", + tags: ["checkout"], + }, + schema: formEventSchema, + instructions: (data) => + `Fill in your Typeform (${data.form_id}) as a real user would`, + examples: [example], + key: "checkout.session.completed", + displayProperties: (data) => ({ + title: `New response for form ${data.form_id}`, + properties: [ + { + key: "Form ID", + value: data.form_id, + }, + ], + }), + matches: () => true, + process: async (data: WebhookReceiveRequest) => [ + { + event: "checkout.session.completed", + displayProperties: { + title: "New response", + }, + payload: data.request.body, + }, + ], +}; + +const webhook = makeWebhook({ + data: { + baseUrl, + spec: webhookSpec, + authentication, + }, + events: [checkoutCompleted], + subscription: { + type: "automatic", + requiresSecret: true, + inputSchema: null, + preSubscribe: (input) => { + return { + body: { + description: `Trigger.dev webhook for events ${input.events.join( + ", " + )}`, + enabled_events: input.events, + url: input.callbackUrl, + }, + }; + }, + postSubscribe: (result) => { + //get the secret from the response and add it to the result + if (result.success) { + result.secret = result.data.secret; + } + return result; + }, + }, + preProcess: async (data) => { + if (data.secret) { + //https://stripe.com/docs/webhooks/signatures#verify-manually + const signatureHeader = data.request.headers["stripe-signature"]; + const elements = signatureHeader.split(","); + const timestamp = elements[0].split("=")[1]; + const signature = elements[1].split("=")[1]; + const contentToEncode = `${timestamp}.${data.request.rawBody}`; + const hash = crypto + .createHmac("sha256", data.secret) + .update(contentToEncode) + .digest("base64"); + + if (signature !== `sha256=${hash}`) { + return { + success: false, + processEvents: false, + error: "Invalid signature", + response: { + status: 401, + headers: {}, + }, + }; + } + } + + return { + success: true, + processEvents: true, + response: { + status: 200, + headers: {}, + }, + }; + }, +}); + +export const webhooks = { webhook }; +export const events = { checkoutCompleted }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c968e4f552..259a3fe0416 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,6 +48,7 @@ importers: '@types/json-pointer': ^1.0.31 '@types/morgan': ^1.9.3 '@types/node': ^18.13.0 + '@types/qs': ^6.9.7 '@typescript-eslint/eslint-plugin': ^5.51.0 ajv: ^8.12.0 body-parser: ^1.20.2 @@ -74,6 +75,7 @@ importers: node-object-hash: ^2.3.10 nodemon: ^2.0.19 prisma: ^4.3.0 + qs: ^6.11.0 rimraf: ^4.1.2 tiny-invariant: ^1.2.0 ts-json-schema-generator: ^1.2.0 @@ -102,6 +104,7 @@ importers: morgan: 1.10.0 node-fetch: 3.3.0 node-object-hash: 2.3.10 + qs: 6.11.0 zod: 3.20.2 devDependencies: '@apidevtools/json-schema-ref-parser': 10.1.0 @@ -111,6 +114,7 @@ importers: '@types/json-pointer': 1.0.31 '@types/morgan': 1.9.4 '@types/node': 18.14.0 + '@types/qs': 6.9.7 '@typescript-eslint/eslint-plugin': 5.53.0_bzepuo66bcyj4mepwnxofjvdli commander: 9.5.0 concurrently: 7.6.0 From c65ab2a5ea2f8ec282923c3cd5693de199af420a Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 7 Mar 2023 18:57:37 +0000 Subject: [PATCH 083/113] Work on the event schema --- .../src/integrations/stripe/README.md | 13 + .../stripe/tests/webhooks.test.ts | 295 +----------- .../integrations/stripe/webhooks/examples.ts | 344 ++++---------- .../integrations/stripe/webhooks/schemas.ts | 419 +++++------------- .../integrations/stripe/webhooks/webhooks.ts | 10 +- 5 files changed, 215 insertions(+), 866 deletions(-) create mode 100644 apps/integrations/src/integrations/stripe/README.md diff --git a/apps/integrations/src/integrations/stripe/README.md b/apps/integrations/src/integrations/stripe/README.md new file mode 100644 index 00000000000..a5cd94aa601 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/README.md @@ -0,0 +1,13 @@ +# Local development + +## Webhooks + +### Setup + +1. Create a new Stripe account +2. Create a new Stripe API key +3. Download the Stripe CLI: https://github.com/stripe/stripe-cli + +### Write tests that subscribe and receive payloads + +This guide is useful for triggering webhooks: https://stripe.com/docs/webhooks/quickstart diff --git a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts index 2d979480b96..093a27bfa1a 100644 --- a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts @@ -85,10 +85,10 @@ describe("stripe.webhooks", async () => { // //explicitly pass in a payload (this is hardcoded, not from a request) // try { - // const result = await webhooks.formResponse.receive({ + // const result = await webhooks.webhook.receive({ // credentials: { // type: "api_key", - // name: "accessToken", + // name: "apiKey", // api_key: accessToken, // scopes: ["webhooks:write"], // }, @@ -112,297 +112,12 @@ describe("stripe.webhooks", async () => { // "typeform-signature": // "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", // }, - // body: events.formResponse.examples[0], - // rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), + // body: events.checkoutCompleted.examples[0], + // rawBody: Buffer.from(JSON.stringify(events.checkoutCompleted.examples[0])), // }, // }); - // expect(result).toMatchInlineSnapshot(` - // { - // "eventResults": [ - // { - // "displayProperties": { - // "title": "New response", - // }, - // "event": "form_response", - // "payload": { - // "event_id": "LtWXD3crgy", - // "event_type": "form_response", - // "form_response": { - // "answers": [ - // { - // "field": { - // "id": "DlXFaesGBpoF", - // "type": "long_text", - // }, - // "text": "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", - // "type": "text", - // }, - // { - // "email": "laura@example.com", - // "field": { - // "id": "SMEUb7VJz92Q", - // "type": "email", - // }, - // "type": "email", - // }, - // { - // "field": { - // "id": "JwWggjAKtOkA", - // "type": "short_text", - // }, - // "text": "Laura", - // "type": "text", - // }, - // { - // "date": "2005-10-15", - // "field": { - // "id": "KoJxDM3c6x8h", - // "type": "date", - // }, - // "type": "date", - // }, - // { - // "choices": { - // "labels": [ - // "London", - // "Sydney", - // ], - // }, - // "field": { - // "id": "PNe8ZKBK8C2Q", - // "type": "picture_choice", - // }, - // "type": "choices", - // }, - // { - // "field": { - // "id": "Q7M2XAwY04dW", - // "type": "number", - // }, - // "number": 5, - // "type": "number", - // }, - // { - // "boolean": true, - // "field": { - // "id": "gFFf3xAkJKsr", - // "type": "legal", - // }, - // "type": "boolean", - // }, - // { - // "choice": { - // "label": "London", - // }, - // "field": { - // "id": "k6TP9oLGgHjl", - // "type": "multiple_choice", - // }, - // "type": "choice", - // }, - // { - // "boolean": false, - // "field": { - // "id": "RUqkXSeXBXSd", - // "type": "yes_no", - // }, - // "type": "boolean", - // }, - // { - // "field": { - // "id": "NRsxU591jIW9", - // "type": "opinion_scale", - // }, - // "number": 2, - // "type": "number", - // }, - // { - // "field": { - // "id": "WOTdC00F8A3h", - // "type": "rating", - // }, - // "number": 3, - // "type": "number", - // }, - // { - // "field": { - // "id": "pn48RmPazVdM", - // "type": "number", - // }, - // "number": 4, - // "type": "number", - // }, - // { - // "field": { - // "id": "M5tXK5kG7IeA", - // "ref": "readable_ref_calendly", - // "type": "calendly", - // }, - // "type": "url", - // "url": "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", - // }, - // ], - // "calculated": { - // "score": 9, - // }, - // "definition": { - // "endings": [ - // { - // "id": "dN5FLyFpCMFo", - // "properties": { - // "button_mode": "default_redirect", - // "button_text": "Create a typeform", - // "share_icons": true, - // "show_button": true, - // }, - // "ref": "01GRC8GR2017M6WW347T86VV39", - // "title": "Bye!", - // "type": "thankyou_screen", - // }, - // ], - // "fields": [ - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "DlXFaesGBpoF", - // "ref": "readable_ref_long_text", - // "title": "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", - // "type": "long_text", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "SMEUb7VJz92Q", - // "ref": "readable_ref_email", - // "title": "If you're OK with our city management following up if they have further questions, please give us your email address.", - // "type": "email", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "JwWggjAKtOkA", - // "ref": "readable_ref_short_text", - // "title": "What is your first name?", - // "type": "short_text", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "KoJxDM3c6x8h", - // "ref": "readable_ref_date", - // "title": "When did you move to the place where you live?", - // "type": "date", - // }, - // { - // "allow_multiple_selections": true, - // "allow_other_choice": false, - // "id": "PNe8ZKBK8C2Q", - // "ref": "readable_ref_picture_choice", - // "title": "Which pictures do you like? You can choose as many as you like.", - // "type": "picture_choice", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "Q7M2XAwY04dW", - // "ref": "readable_ref_number1", - // "title": "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", - // "type": "number", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "gFFf3xAkJKsr", - // "ref": "readable_ref_legal", - // "title": "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", - // "type": "legal", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "k6TP9oLGgHjl", - // "ref": "readable_ref_multiple_choice", - // "title": "Which of these cities is your favorite?", - // "type": "multiple_choice", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "RUqkXSeXBXSd", - // "ref": "readable_ref_yes_no", - // "title": "Do you have a favorite city we haven't listed?", - // "type": "yes_no", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "NRsxU591jIW9", - // "ref": "readable_ref_opinion_scale", - // "title": "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", - // "type": "opinion_scale", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "WOTdC00F8A3h", - // "ref": "readable_ref_rating", - // "title": "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", - // "type": "rating", - // }, - // { - // "allow_multiple_selections": false, - // "allow_other_choice": false, - // "id": "pn48RmPazVdM", - // "ref": "readable_ref_number2", - // "title": "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", - // "type": "number", - // }, - // { - // "id": "M5tXK5kG7IeA", - // "properties": {}, - // "ref": "readable_ref_calendly", - // "title": "Book a time with me", - // "type": "calendly", - // }, - // ], - // "id": "lT4Z3j", - // "title": "Webhooks example", - // }, - // "ending": { - // "id": "dN5FLyFpCMFo", - // "ref": "01GRC8GR2017M6WW347T86VV39", - // }, - // "form_id": "lT4Z3j", - // "hidden": { - // "user_id": "abc123456", - // }, - // "landed_at": "2018-01-18T18:07:02Z", - // "submitted_at": "2018-01-18T18:17:02Z", - // "token": "a3a12ec67a1365927098a606107fac15", - // "variables": [ - // { - // "key": "score", - // "number": 4, - // "type": "number", - // }, - // { - // "key": "name", - // "text": "typeform", - // "type": "text", - // }, - // ], - // }, - // }, - // }, - // ], - // "response": { - // "headers": {}, - // "status": 200, - // }, - // "success": true, - // } - // `); + // expect(result).toMatchInlineSnapshot(); // } catch (e) { // console.error(e); // expect(true).toBe(false); diff --git a/apps/integrations/src/integrations/stripe/webhooks/examples.ts b/apps/integrations/src/integrations/stripe/webhooks/examples.ts index 4cc995ca143..7410e144312 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/examples.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/examples.ts @@ -1,274 +1,86 @@ -export const example = { - event_id: "LtWXD3crgy", - event_type: "form_response", - form_response: { - form_id: "lT4Z3j", - token: "a3a12ec67a1365927098a606107fac15", - submitted_at: "2018-01-18T18:17:02Z", - landed_at: "2018-01-18T18:07:02Z", - calculated: { - score: 9, +export const checkoutCompletedSuccess = { + object: { + id: "cs_test_a1EgJwW6lYFfhmnIYz49gIjMrt4T9ppRZsh9pohheMDg5p5vp7tsKxr9tV", + object: "checkout.session", + after_expiration: null, + allow_promotion_codes: null, + amount_subtotal: 3000, + amount_total: 3000, + automatic_tax: { + enabled: false, + status: null, }, - variables: [ - { - key: "score", - type: "number", - number: 4, + billing_address_collection: null, + cancel_url: "https://httpbin.org/post", + client_reference_id: null, + consent: null, + consent_collection: null, + created: 1678198980, + currency: "usd", + custom_fields: [], + custom_text: { + shipping_address: null, + submit: null, + }, + customer: null, + customer_creation: "if_required", + customer_details: { + address: { + city: null, + country: null, + line1: null, + line2: null, + postal_code: null, + state: null, }, - { - key: "name", - type: "text", - text: "typeform", + email: "stripe@example.com", + name: null, + phone: null, + tax_exempt: "none", + tax_ids: [], + }, + customer_email: null, + expires_at: 1678285379, + invoice: null, + invoice_creation: { + enabled: false, + invoice_data: { + account_tax_ids: null, + custom_fields: null, + description: null, + footer: null, + metadata: {}, + rendering_options: null, }, - ], - hidden: { - user_id: "abc123456", }, - definition: { - id: "lT4Z3j", - title: "Webhooks example", - fields: [ - { - id: "DlXFaesGBpoF", - title: - "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", - type: "long_text", - ref: "readable_ref_long_text", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "SMEUb7VJz92Q", - title: - "If you're OK with our city management following up if they have further questions, please give us your email address.", - type: "email", - ref: "readable_ref_email", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "JwWggjAKtOkA", - title: "What is your first name?", - type: "short_text", - ref: "readable_ref_short_text", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "KoJxDM3c6x8h", - title: "When did you move to the place where you live?", - type: "date", - ref: "readable_ref_date", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "PNe8ZKBK8C2Q", - title: - "Which pictures do you like? You can choose as many as you like.", - type: "picture_choice", - ref: "readable_ref_picture_choice", - allow_multiple_selections: true, - allow_other_choice: false, - }, - { - id: "Q7M2XAwY04dW", - title: - "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", - type: "number", - ref: "readable_ref_number1", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "gFFf3xAkJKsr", - title: - "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", - type: "legal", - ref: "readable_ref_legal", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "k6TP9oLGgHjl", - title: "Which of these cities is your favorite?", - type: "multiple_choice", - ref: "readable_ref_multiple_choice", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "RUqkXSeXBXSd", - title: "Do you have a favorite city we haven't listed?", - type: "yes_no", - ref: "readable_ref_yes_no", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "NRsxU591jIW9", - title: - "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", - type: "opinion_scale", - ref: "readable_ref_opinion_scale", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "WOTdC00F8A3h", - title: - "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", - type: "rating", - ref: "readable_ref_rating", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "pn48RmPazVdM", - title: - "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", - type: "number", - ref: "readable_ref_number2", - allow_multiple_selections: false, - allow_other_choice: false, - }, - { - id: "M5tXK5kG7IeA", - title: "Book a time with me", - type: "calendly", - ref: "readable_ref_calendly", - properties: {}, - }, - ], - endings: [ - { - id: "dN5FLyFpCMFo", - ref: "01GRC8GR2017M6WW347T86VV39", - title: "Bye!", - type: "thankyou_screen", - properties: { - button_text: "Create a typeform", - show_button: true, - share_icons: true, - button_mode: "default_redirect", - }, - }, - ], + livemode: false, + locale: null, + metadata: {}, + mode: "payment", + payment_intent: "pi_3Mj1PtGHlQRWA8Cg0YFQ7ukK", + payment_link: null, + payment_method_collection: "always", + payment_method_options: {}, + payment_method_types: ["card"], + payment_status: "paid", + phone_number_collection: { + enabled: false, }, - answers: [ - { - type: "text", - text: "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", - field: { - id: "DlXFaesGBpoF", - type: "long_text", - }, - }, - { - type: "email", - email: "laura@example.com", - field: { - id: "SMEUb7VJz92Q", - type: "email", - }, - }, - { - type: "text", - text: "Laura", - field: { - id: "JwWggjAKtOkA", - type: "short_text", - }, - }, - { - type: "date", - date: "2005-10-15", - field: { - id: "KoJxDM3c6x8h", - type: "date", - }, - }, - { - type: "choices", - choices: { - labels: ["London", "Sydney"], - }, - field: { - id: "PNe8ZKBK8C2Q", - type: "picture_choice", - }, - }, - { - type: "number", - number: 5, - field: { - id: "Q7M2XAwY04dW", - type: "number", - }, - }, - { - type: "boolean", - boolean: true, - field: { - id: "gFFf3xAkJKsr", - type: "legal", - }, - }, - { - type: "choice", - choice: { - label: "London", - }, - field: { - id: "k6TP9oLGgHjl", - type: "multiple_choice", - }, - }, - { - type: "boolean", - boolean: false, - field: { - id: "RUqkXSeXBXSd", - type: "yes_no", - }, - }, - { - type: "number", - number: 2, - field: { - id: "NRsxU591jIW9", - type: "opinion_scale", - }, - }, - { - type: "number", - number: 3, - field: { - id: "WOTdC00F8A3h", - type: "rating", - }, - }, - { - type: "number", - number: 4, - field: { - id: "pn48RmPazVdM", - type: "number", - }, - }, - { - type: "url", - url: "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", - field: { - id: "M5tXK5kG7IeA", - type: "calendly", - ref: "readable_ref_calendly", - }, - }, - ], - ending: { - id: "dN5FLyFpCMFo", - ref: "01GRC8GR2017M6WW347T86VV39", + recovered_from: null, + setup_intent: null, + shipping_address_collection: null, + shipping_cost: null, + shipping_details: null, + shipping_options: [], + status: "complete", + submit_type: null, + subscription: null, + success_url: "https://httpbin.org/post", + total_details: { + amount_discount: 0, + amount_shipping: 0, + amount_tax: 0, }, + url: null, }, }; diff --git a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts index 1f2a4cedf4f..f3c7cfcd87b 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts @@ -1,318 +1,127 @@ import { - makeArraySchema, makeBooleanSchema, + makeNullable, makeNumberSchema, makeObjectSchema, - makeOneOf, makeStringSchema, } from "core/schemas/makeSchema"; +import { JSONSchema } from "core/schemas/types"; -//Payload reference here -//https://www.typeform.com/developers/webhooks/example-payload/ - -function makeAnswerField(types: string[]) { - let typeField = makeStringSchema("type", `The type of the field`); - if (types.length === 1) { - typeField = makeStringSchema("type", `The type of the field`, { - const: types[0], - }); - } else if (types.length > 1) { - typeField = makeStringSchema("type", `The type of the field`, { - enum: types, - }); - } - - return makeObjectSchema("field", { +export const checkoutSessionCompletedSchema: JSONSchema = makeObjectSchema( + "Checkout Session Completed", + { requiredProperties: { - id: makeStringSchema("id", `The ID of the field`), - type: typeField, - }, - optionalProperties: { - ref: makeStringSchema("ref", `The ref of the field`), - }, - }); -} - -const TextAnswer = makeObjectSchema("text answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "text", - }), - text: makeStringSchema("text", `The value of the answer`), - field: makeAnswerField(["short_text", "long_text"]), - }, -}); - -const EmailAnswer = makeObjectSchema("email answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "email", - }), - email: makeStringSchema("email", `The value of the answer`), - field: makeAnswerField(["email"]), - }, -}); - -const DateAnswer = makeObjectSchema("date answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "date", - }), - date: makeStringSchema("date", `The value of the answer`), - field: makeAnswerField(["date"]), - }, -}); - -const ChoicesAnswer = makeObjectSchema("choices answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "choices", - }), - choices: makeObjectSchema("choices", { - requiredProperties: { - labels: makeArraySchema( - "labels", - makeStringSchema("label", `The label of the choice`) - ), - }, - optionalProperties: { - other: makeStringSchema( - "label", - `What the user typed in to the "other" field` - ), - }, - }), - field: makeAnswerField(["picture_choice", "dropdown", "multiple_choice"]), - }, -}); - -const ChoiceAnswer = makeObjectSchema("choice answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "choice", - }), - choice: makeObjectSchema("choice", { - optionalProperties: { - label: makeStringSchema("label", `The label of the choice`), - other: makeStringSchema( - "label", - `What the user typed in to the "other" field` - ), - }, - }), - field: makeAnswerField(["picture_choice", "dropdown", "multiple_choice"]), - }, -}); - -const BooleanAnswer = makeObjectSchema("boolean answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "boolean", - }), - boolean: makeBooleanSchema("boolean", `The value of the answer`), - field: makeAnswerField(["legal", "yes_no"]), - }, -}); - -const UrlAnswer = makeObjectSchema("url answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "url", - }), - url: makeStringSchema("url", `The value of the answer`), - field: makeAnswerField(["website", "calendly"]), - }, -}); - -const NumberAnswer = makeObjectSchema("number answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "number", - }), - number: makeNumberSchema("number", `The value of the answer`), - field: makeAnswerField([]), - }, -}); - -const FileUrlAnswer = makeObjectSchema("file url answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "file_url", - }), - file_url: makeStringSchema("file_url", `The value of the answer`), - field: makeAnswerField(["file_upload"]), - }, -}); - -const PaymentAnswer = makeObjectSchema("payment answer", { - requiredProperties: { - type: makeStringSchema("type", `The type of the answer`, { - const: "payment", - }), - payment: makeObjectSchema("payment", { - requiredProperties: { - amount: makeNumberSchema("amount", `The amount of the payment`), - last4: makeStringSchema("last4", `The last 4 digits of the card`), - name: makeStringSchema("name", `The name of the credit card`), - success: makeBooleanSchema("success", `Whether the payment succeeded`), - }, - }), - field: makeAnswerField(["payment"]), - }, -}); - -const Answers = [ - TextAnswer, - ChoiceAnswer, - ChoicesAnswer, - EmailAnswer, - DateAnswer, - BooleanAnswer, - UrlAnswer, - NumberAnswer, - FileUrlAnswer, - PaymentAnswer, -]; - -export const formEventSchema = makeObjectSchema("form_response", { - requiredProperties: { - event_id: makeStringSchema( - "event_id", - `The ID of the event that triggered this webhook` - ), - event_type: makeStringSchema( - "event_type", - `The type of event, always "form_response"`, - { const: "form_response" } - ), - form_response: makeObjectSchema("form_response", { - requiredProperties: { - form_id: makeStringSchema( - "form_id", - `The ID of the form that was submitted` - ), - token: makeStringSchema("token", `The unique token for this response`), - submitted_at: makeStringSchema( - "submitted_at", - `The date and time the response was submitted` - ), - landed_at: makeStringSchema( - "landed_at", - `The date and time the respondent landed on the form` - ), - definition: makeObjectSchema("definition", { - requiredProperties: { - id: makeStringSchema("id", `The ID of the form`), - title: makeStringSchema("title", `The title of the form`), - fields: makeArraySchema( - "fields", - makeObjectSchema("field", { - requiredProperties: { - id: makeStringSchema("id", `The ID of the field`), - title: makeStringSchema("title", `The title of the field`), - type: makeStringSchema("type", `The type of the field`), - ref: makeStringSchema( - "ref", - "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." - ), - }, - optionalProperties: { - allow_multiple_selections: makeBooleanSchema( - "allow_multiple_selections", - "Whether or not the field allows multiple selections" - ), - allow_other_choice: makeBooleanSchema( - "allow_other_choice", - "Whether or not the field allows an 'other' choice" - ), - choices: makeArraySchema( - "choices", - makeObjectSchema("choice", { - requiredProperties: { - label: makeStringSchema( - "label", - "The label of the choice" - ), - id: makeStringSchema("id", "The ID of the choice"), - }, - }) - ), - }, - }) - ), - }, - optionalProperties: { - endings: makeArraySchema( - "endings", - makeObjectSchema("ending", { - requiredProperties: { - id: makeStringSchema("id", `The ID of the ending`), - ref: makeStringSchema( - "ref", - "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." - ), - title: makeStringSchema("title", `The title of the ending`), - type: makeStringSchema("type", `The type of the ending`), - }, - additionalProperties: true, - }) - ), - }, - }), - answers: makeArraySchema("answers", makeOneOf("answer", Answers)), - ending: makeObjectSchema("ending", { + id: makeStringSchema("ID", "Unique identifier for the object."), + cancel_url: makeNullable( + makeStringSchema( + "Cancel URL", + "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website." + ) + ), + client_reference_id: makeNullable( + makeStringSchema( + "Client Reference ID", + "A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems." + ) + ), + currency: makeStringSchema("Currency", "ISO currency code"), + customer: makeNullable( + makeStringSchema( + "Customer", + "The ID of the customer for this Session. For Checkout Sessions in payment or subscription mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created." + ) + ), + customer_email: makeNullable( + makeStringSchema( + "Customer Email", + "If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute." + ) + ), + mode: makeStringSchema( + "Mode", + "Specifies which fields in the response should be expanded.", + { + enum: ["payment", "setup", "subscription"], + } + ), + payment_intent: makeNullable( + makeStringSchema( + "Payment Intent", + "The ID of the PaymentIntent for Checkout Sessions in payment mode." + ) + ), + payment_status: makeStringSchema( + "Payment Status", + "The status of the payment. One of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer’s order.", + { + enum: ["paid", "unpaid", "no_payment_required"], + } + ), + status: makeStringSchema( + "Status", + "The status of the Checkout Session, one of open, complete, or expired.", + { + enum: ["open", "complete", "expired"], + } + ), + success_url: makeNullable( + makeStringSchema( + "Success URL", + "The URL the customer will be directed to after the payment or subscription creation is successful." + ) + ), + object: makeStringSchema( + "Object", + "String representing the object’s type. Objects of the same type share the same value.", + { + const: "checkout.session", + } + ), + after_expiration: makeNullable( + makeObjectSchema("After Expiration", { requiredProperties: { - id: makeStringSchema("id", `The ID of the ending`), - ref: makeStringSchema( - "ref", - "A reference to the field – this will be different on every response unless you used the Create API to create the field. In that case, it will be what you set it to." - ), - }, - additionalProperties: true, - }), - }, - optionalProperties: { - calculated: makeObjectSchema("calculated", { - requiredProperties: { - score: makeNumberSchema( - "score", - `The score of the response, if the form has a score field` - ), - }, - }), - variables: makeArraySchema( - "variables", - makeOneOf("variable", [ - makeObjectSchema("number variable", { - requiredProperties: { - key: makeStringSchema( - "key", - `The unique identifier for the variable` + recovery: makeObjectSchema("Recovery", { + optionalProperties: { + allow_promotion_codes: makeBooleanSchema( + "Allow Promotion Codes", + "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to false." ), - type: makeStringSchema("type", `The type of the variable`, { - const: "text", - }), - text: makeStringSchema("text", `The value of the variable`), - }, - }), - makeObjectSchema("number variable", { - requiredProperties: { - key: makeStringSchema( - "key", - `The unique identifier for the variable` + enabled: makeBooleanSchema( + "Enabled", + "If true, a recovery url will be generated to recover this Checkout Session if it expires before a transaction is completed. It will be attached to the Checkout Session object upon expiration." + ), + expires_at: makeNullable( + makeNumberSchema( + "Expires At", + "The timestamp at which the recovery URL will expire." + ) + ), + url: makeNullable( + makeStringSchema( + "URL", + "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active." + ) ), - type: makeStringSchema("type", `The type of the variable`, { - const: "number", - }), - number: makeNumberSchema("number", `The value of the variable`), }, }), - ]) - ), - hidden: makeObjectSchema("hidden", { - additionalProperties: true, - }), - }, - }), - }, -}); + }, + }) + ), + allow_promotion_codes: makeNullable( + makeBooleanSchema( + "Allow Promotion Codes", + "Enables user redeemable promotion codes." + ) + ), + amount_, + }, + optionalProperties: { + url: makeNullable( + makeStringSchema( + "URL", + "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active." + ) + ), + }, + } +); diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index 6bf6c3bc14c..a9cfa4f0f75 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -2,8 +2,8 @@ import { makeWebhook } from "core/webhook"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; import crypto from "node:crypto"; import { authentication } from "../authentication"; -import { example } from "./examples"; -import { formEventSchema } from "./schemas"; +import { checkoutCompletedSuccess } from "./examples"; +import { checkoutSessionCompletedSchema } from "./schemas"; import { webhookSpec } from "./specs"; const baseUrl = "https://api.stripe.com/v1"; @@ -15,10 +15,10 @@ export const checkoutCompleted: WebhookEvent = { description: "A form response was submitted", tags: ["checkout"], }, - schema: formEventSchema, + schema: checkoutSessionCompletedSchema, instructions: (data) => - `Fill in your Typeform (${data.form_id}) as a real user would`, - examples: [example], + `Perform a Stripe checkout session or use the [Stripe CLI](https://stripe.com/docs/stripe-cli) to test this webhook.`, + examples: [checkoutCompletedSuccess], key: "checkout.session.completed", displayProperties: (data) => ({ title: `New response for form ${data.form_id}`, From 87b347fd2b739ba582c3c59007d513633db995d1 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 11:29:25 +0000 Subject: [PATCH 084/113] =?UTF-8?q?Open=20API=20Specs=20with=20=E2=80=9Cnu?= =?UTF-8?q?llable=E2=80=9D=20in=20can=20be=20coerced=20into=20valid=20JSON?= =?UTF-8?q?=20schemas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/schemas/transformNullables.test.ts | 75 +++++++++++++++++++ .../src/core/schemas/transformNullables.ts | 64 ++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 apps/integrations/src/core/schemas/transformNullables.test.ts create mode 100644 apps/integrations/src/core/schemas/transformNullables.ts diff --git a/apps/integrations/src/core/schemas/transformNullables.test.ts b/apps/integrations/src/core/schemas/transformNullables.test.ts new file mode 100644 index 00000000000..63d11323a2a --- /dev/null +++ b/apps/integrations/src/core/schemas/transformNullables.test.ts @@ -0,0 +1,75 @@ +import { validate } from "core/schemas/validate"; +import { describe, expect, test } from "vitest"; +import { makeRefInSchema } from "./makeSchema"; +import { transformNullables } from "./transformNullables"; + +describe("transform nullables", async () => { + test("example", async () => { + const original = { + components: { + schemas: { + account: { + description: "Description", + properties: { + business_profile: { + anyOf: [ + { + $ref: "#/components/schemas/account_business_profile", + }, + ], + description: "Business information about the account.", + nullable: true, + }, + business_type: { + description: "The business type.", + enum: ["company", "government_entity"], + nullable: true, + type: "string", + "x-stripeBypassValidation": true, + }, + }, + }, + }, + }, + }; + + transformNullables(original); + expect(original).toMatchInlineSnapshot(` + { + "components": { + "schemas": { + "account": { + "description": "Description", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_business_profile", + }, + { + "type": "null", + }, + ], + "description": "Business information about the account.", + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + null, + ], + "type": [ + "string", + "null", + ], + "x-stripeBypassValidation": true, + }, + }, + }, + }, + }, + } + `); + }); +}); diff --git a/apps/integrations/src/core/schemas/transformNullables.ts b/apps/integrations/src/core/schemas/transformNullables.ts new file mode 100644 index 00000000000..446eb6a76b5 --- /dev/null +++ b/apps/integrations/src/core/schemas/transformNullables.ts @@ -0,0 +1,64 @@ +import { JSONSchemaInstanceType } from "./types"; + +export function transformNullables(spec: Record) { + //walk through the object. If there is a key called "nullable" that is set to true then do one of the following + //1. if their is a sibling key on "type" then turn the type into an array and add "null" to it + //2. if there is no sibling key on "type" and there's an anyOf, oneOf or allOf then add a null type to each of those + //3. if there is no sibling key on "type" and there's no anyOf, oneOf or allOf then add an anyOf with null + + Object.entries(spec).forEach(([key, value]) => { + if (key === "nullable" && value === true) { + if (!spec.type) { + if (spec.anyOf || spec.oneOf || spec.allOf) { + //if there is an anyOf, oneOf or allOf then add a null type to each of those + if (spec.anyOf) { + spec.anyOf = [...spec.anyOf, { type: "null" }]; + } + if (spec.oneOf) { + spec.oneOf = [...spec.oneOf, { type: "null" }]; + } + if (spec.allOf) { + spec.allOf = [...spec.allOf, { type: "null" }]; + } + } else { + //if there's not anyOf, oneOf or allOf then we need to create an anyOf with null + spec.anyOf = [ + { + type: "null", + }, + spec, + ]; + } + delete spec.nullable; + return; + } + + //if there is a type then we can add the "null" type to it + let combinedTypes: JSONSchemaInstanceType[] = []; + switch (typeof spec.type) { + case "string": + combinedTypes = [spec.type as JSONSchemaInstanceType, "null"]; + break; + case "object": + combinedTypes = [...spec.type, "null"]; + break; + default: + throw new Error(`Invalid schema type: ${typeof spec.type}`); + } + + spec.type = combinedTypes; + delete spec.nullable; + + //enums + if (spec.enum) { + spec.enum = [...spec.enum, null]; + } + + return; + } + + if (typeof value === "object") { + transformNullables(value); + } + }); +} From ece090e5e0b3ebed9a3aaed86d628c8cd809950f Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 11:30:24 +0000 Subject: [PATCH 085/113] Support for refing into a schema --- .../src/core/schemas/makeSchema.ts | 7 +++ .../src/core/schemas/validate.test.ts | 49 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 apps/integrations/src/core/schemas/validate.test.ts diff --git a/apps/integrations/src/core/schemas/makeSchema.ts b/apps/integrations/src/core/schemas/makeSchema.ts index a3640e806b1..7a2a2c8799c 100644 --- a/apps/integrations/src/core/schemas/makeSchema.ts +++ b/apps/integrations/src/core/schemas/makeSchema.ts @@ -233,3 +233,10 @@ export function makePropertiesOptional( required: schema.required?.filter((p) => !properties.includes(p)), }; } + +export function makeRefInSchema(ref: string, schema: JSONSchema): JSONSchema { + return { + $ref: ref, + ...schema, + }; +} diff --git a/apps/integrations/src/core/schemas/validate.test.ts b/apps/integrations/src/core/schemas/validate.test.ts new file mode 100644 index 00000000000..2ccc1642e11 --- /dev/null +++ b/apps/integrations/src/core/schemas/validate.test.ts @@ -0,0 +1,49 @@ +import { validate } from "core/schemas/validate"; +import { describe, expect, test } from "vitest"; +import { makeRefInSchema } from "./makeSchema"; + +describe("validate", async () => { + test("string ref", async () => { + const schema = makeRefInSchema("#/components/basic", { + components: { + basic: { + type: "number", + }, + }, + }); + + const validationResult = await validate(123, schema); + expect(validationResult).toEqual({ + success: true, + }); + }); + + test("deep ref", async () => { + const schema = makeRefInSchema("#/components/basic", { + components: { + basic: { + type: "object", + properties: { + something: { + $ref: "#/components/something", + }, + }, + required: ["something"], + }, + something: { + type: "number", + }, + }, + }); + + const validationResult = await validate( + { + something: 2, + }, + schema + ); + expect(validationResult).toEqual({ + success: true, + }); + }); +}); From 7ae07199dcd62f757cc15dd3533cddbb2959e359 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 11:30:59 +0000 Subject: [PATCH 086/113] Removed fetch log --- apps/integrations/src/core/request/requestEndpoint.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/integrations/src/core/request/requestEndpoint.ts b/apps/integrations/src/core/request/requestEndpoint.ts index 538b1eb8fe0..aedcbe047e0 100644 --- a/apps/integrations/src/core/request/requestEndpoint.ts +++ b/apps/integrations/src/core/request/requestEndpoint.ts @@ -115,8 +115,6 @@ export async function requestEndpoint( body: requestBody, }; - console.log("fetchConfig", JSON.stringify(fetchConfig)); - // apply credentials if (security != null) { if (credentials == null) { From dddfc6a65bd7d80694168c39cf3a2792a5942fcc Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 11:31:14 +0000 Subject: [PATCH 087/113] Stripe event schema and reffing to it --- .../src/integrations/stripe/schemas/spec.ts | 5 + .../integrations/stripe/schemas/spec3.json | 123430 +++++++++++++++ .../stripe/tests/webhooks.test.ts | 854 +- .../integrations/stripe/webhooks/examples.ts | 160 +- .../integrations/stripe/webhooks/schemas.ts | 129 +- 5 files changed, 123531 insertions(+), 1047 deletions(-) create mode 100644 apps/integrations/src/integrations/stripe/schemas/spec.ts create mode 100644 apps/integrations/src/integrations/stripe/schemas/spec3.json diff --git a/apps/integrations/src/integrations/stripe/schemas/spec.ts b/apps/integrations/src/integrations/stripe/schemas/spec.ts new file mode 100644 index 00000000000..8f1c7a2484d --- /dev/null +++ b/apps/integrations/src/integrations/stripe/schemas/spec.ts @@ -0,0 +1,5 @@ +import { transformNullables } from "core/schemas/transformNullables"; +import { JSONSchema } from "core/schemas/types"; +import rawSpec from "./spec3.json"; +transformNullables(rawSpec); +export const spec: JSONSchema = rawSpec; diff --git a/apps/integrations/src/integrations/stripe/schemas/spec3.json b/apps/integrations/src/integrations/stripe/schemas/spec3.json new file mode 100644 index 00000000000..0b67ba8ecb6 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/schemas/spec3.json @@ -0,0 +1,123430 @@ +{ + "components": { + "schemas": { + "account": { + "description": "This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that\naccount has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)\nfor a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**\nbelow. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_business_profile" + } + ], + "description": "Business information about the account.", + "nullable": true + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "$ref": "#/components/schemas/account_capabilities" + }, + "charges_enabled": { + "description": "Whether the account can create live charges.", + "type": "boolean" + }, + "company": { + "$ref": "#/components/schemas/legal_entity_company" + }, + "controller": { + "$ref": "#/components/schemas/account_unification_account_controller" + }, + "country": { + "description": "The account's country.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the account was connected. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_currency": { + "description": "Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).", + "maxLength": 5000, + "type": "string" + }, + "details_submitted": { + "description": "Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.", + "type": "boolean" + }, + "email": { + "description": "An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "external_accounts": { + "description": "External accounts (bank accounts and debit cards) currently attached to this account", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "future_requirements": { + "$ref": "#/components/schemas/account_future_requirements" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "$ref": "#/components/schemas/person" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account" + ], + "type": "string" + }, + "payouts_enabled": { + "description": "Whether Stripe can send payouts to this account.", + "type": "boolean" + }, + "requirements": { + "$ref": "#/components/schemas/account_requirements" + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_settings" + } + ], + "description": "Options for customizing how the account functions within Stripe.", + "nullable": true + }, + "tos_acceptance": { + "$ref": "#/components/schemas/account_tos_acceptance" + }, + "type": { + "description": "The Stripe account type. Can be `standard`, `express`, or `custom`.", + "enum": [ + "custom", + "express", + "standard" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Account", + "type": "object", + "x-expandableFields": [ + "business_profile", + "capabilities", + "company", + "controller", + "external_accounts", + "future_requirements", + "individual", + "requirements", + "settings", + "tos_acceptance" + ], + "x-resourceId": "account" + }, + "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 will appear on the mandate, and as the statement descriptor.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "primary_color": { + "description": "A CSS hex color value representing the primary branding color for this account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "secondary_color": { + "description": "A CSS hex color value representing the secondary branding color for this account", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": [ + "icon", + "logo" + ] + }, + "account_business_profile": { + "description": "", + "properties": { + "mcc": { + "description": "[The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "The customer-facing business name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.", + "maxLength": 40000, + "nullable": true, + "type": "string" + }, + "support_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "A publicly available mailing address for sending support issues to.", + "nullable": true + }, + "support_email": { + "description": "A publicly available email address for sending support issues to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "support_phone": { + "description": "A publicly available phone number to call with support issues.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "support_url": { + "description": "A publicly available website for handling support issues.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The business's publicly available website.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": [ + "support_address" + ] + }, + "account_capabilities": { + "description": "", + "properties": { + "acss_debit_payments": { + "description": "The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "affirm_payments": { + "description": "The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "afterpay_clearpay_payments": { + "description": "The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "au_becs_debit_payments": { + "description": "The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bacs_debit_payments": { + "description": "The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bancontact_payments": { + "description": "The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bank_transfer_payments": { + "description": "The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "blik_payments": { + "description": "The status of the blik payments capability of the account, or whether the account can directly process blik charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "boleto_payments": { + "description": "The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_issuing": { + "description": "The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_payments": { + "description": "The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "cartes_bancaires_payments": { + "description": "The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "paynow_payments": { + "description": "The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "promptpay_payments": { + "description": "The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + } + }, + "title": "AccountCapabilities", + "type": "object", + "x-expandableFields": [] + }, + "account_capability_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_capability_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.\n\n`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:\n\n- [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses)\n\nIf you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/card_issuing_account_terms_of_service" + } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { + "$ref": "#/components/schemas/account_decline_charge_on" + }, + "statement_descriptor_prefix": { + "description": "The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "description": "The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": [ + "decline_on" + ] + }, + "account_dashboard_settings": { + "description": "", + "properties": { + "display_name": { + "description": "The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "timezone": { + "description": "The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_decline_charge_on": { + "description": "", + "properties": { + "avs_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.", + "type": "boolean" + }, + "cvc_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.", + "type": "boolean" + } + }, + "required": [ + "avs_failure", + "cvc_failure" + ], + "title": "AccountDeclineChargeOn", + "type": "object", + "x-expandableFields": [] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "nullable": true, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_link": { + "description": "Account Links are the means by which a Connect platform grants a connected account permission to access\nStripe-hosted applications, such as Connect Onboarding.\n\nRelated guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which this account link will expire.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account_link" + ], + "type": "string" + }, + "url": { + "description": "The URL for the account link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "expires_at", + "object", + "url" + ], + "title": "AccountLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "account_link" + }, + "account_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 the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "description": "The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_prefix_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_payout_settings": { + "description": "", + "properties": { + "debit_negative_balances": { + "description": "A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.", + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/transfer_schedule" + }, + "statement_descriptor": { + "description": "The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "debit_negative_balances", + "schedule" + ], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": [ + "schedule" + ] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "current_deadline": { + "description": "Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "disabled_reason": { + "description": "If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "nullable": true, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to satisfy all fields in `original_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "alternative_fields_due", + "original_fields_due" + ], + "title": "AccountRequirementsAlternative", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "invalid_address_city_state_postal_code", + "invalid_dob_age_under_18", + "invalid_representative_country", + "invalid_street_address", + "invalid_tos_acceptance", + "invalid_value_other", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "An informative message that indicates the error type and provides additional details about the error.", + "maxLength": 5000, + "type": "string" + }, + "requirement": { + "description": "The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "code", + "reason", + "requirement" + ], + "title": "AccountRequirementsError", + "type": "object", + "x-expandableFields": [] + }, + "account_sepa_debit_payments_settings": { + "description": "", + "properties": { + "creditor_id": { + "description": "SEPA creditor identifier that identifies the company making the payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountSepaDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { + "$ref": "#/components/schemas/account_bacs_debit_payments_settings" + }, + "branding": { + "$ref": "#/components/schemas/account_branding_settings" + }, + "card_issuing": { + "$ref": "#/components/schemas/account_card_issuing_settings" + }, + "card_payments": { + "$ref": "#/components/schemas/account_card_payments_settings" + }, + "dashboard": { + "$ref": "#/components/schemas/account_dashboard_settings" + }, + "payments": { + "$ref": "#/components/schemas/account_payments_settings" + }, + "payouts": { + "$ref": "#/components/schemas/account_payout_settings" + }, + "sepa_debit_payments": { + "$ref": "#/components/schemas/account_sepa_debit_payments_settings" + }, + "treasury": { + "$ref": "#/components/schemas/account_treasury_settings" + } + }, + "required": [ + "branding", + "card_payments", + "dashboard", + "payments" + ], + "title": "AccountSettings", + "type": "object", + "x-expandableFields": [ + "bacs_debit_payments", + "branding", + "card_issuing", + "card_payments", + "dashboard", + "payments", + "payouts", + "sepa_debit_payments", + "treasury" + ] + }, + "account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted their service agreement", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the account representative accepted their service agreement", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_agreement": { + "description": "The user's service agreement type", + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted their service agreement", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "AccountTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "account_treasury_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/account_terms_of_service" + } + }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "is_controller": { + "description": "`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.", + "type": "boolean" + }, + "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": [] + }, + "address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "Address", + "type": "object", + "x-expandableFields": [] + }, + "api_errors": { + "description": "", + "properties": { + "charge": { + "description": "For card errors, the ID of the failed charge.", + "maxLength": 5000, + "type": "string" + }, + "code": { + "description": "For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "decline_code": { + "description": "For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.", + "maxLength": 40000, + "type": "string" + }, + "param": { + "description": "If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.", + "maxLength": 5000, + "type": "string" + }, + "payment_intent": { + "$ref": "#/components/schemas/payment_intent" + }, + "payment_method": { + "$ref": "#/components/schemas/payment_method" + }, + "payment_method_type": { + "description": "If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.", + "maxLength": 5000, + "type": "string" + }, + "request_log_url": { + "description": "A URL to the request log entry in your dashboard.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "$ref": "#/components/schemas/setup_intent" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "The source object for errors returned on a request involving a 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" + ] + }, + "apple_pay_domain": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "domain_name": { + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "apple_pay_domain" + ], + "type": "string" + } + }, + "required": [ + "created", + "domain_name", + "id", + "livemode", + "object" + ], + "title": "ApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "apple_pay_domain" + }, + "application": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Application", + "type": "object", + "x-expandableFields": [] + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "amount": { + "description": "Amount earned, in %s.", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application_fee" + ], + "type": "string" + }, + "originating_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "refunded": { + "description": "Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the fee.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "charge", + "created", + "currency", + "id", + "livemode", + "object", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee" + }, + "apps.secret": { + "description": "Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.\n\nThe primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.\n\nAll Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.\n\nA `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.\n\nRelated guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deleted": { + "description": "If true, indicates that this secret has been deleted", + "type": "boolean" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "apps.secret" + ], + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "scope": { + "$ref": "#/components/schemas/secret_service_resource_scope" + } + }, + "required": [ + "created", + "id", + "livemode", + "name", + "object", + "scope" + ], + "title": "SecretServiceResourceSecret", + "type": "object", + "x-expandableFields": [ + "scope" + ], + "x-resourceId": "apps.secret" + }, + "automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this invoice.", + "enum": [ + "complete", + "failed", + "requires_location_inputs" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "enabled" + ], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "balance": { + "description": "This is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.\n\nYou can also retrieve the balance history, which contains a list of\n[transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance\n(charges, payouts, and so forth).\n\nThe available and pending amounts for each currency are broken down further by\npayment source types.\n\nRelated guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).", + "properties": { + "available": { + "description": "Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "connect_reserved": { + "description": "Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "instant_available": { + "description": "Funds that can be paid out using Instant Payouts.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "issuing": { + "$ref": "#/components/schemas/balance_detail" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "balance" + ], + "type": "string" + }, + "pending": { + "description": "Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + } + }, + "required": [ + "available", + "livemode", + "object", + "pending" + ], + "title": "Balance", + "type": "object", + "x-expandableFields": [ + "available", + "connect_reserved", + "instant_available", + "issuing", + "pending" + ], + "x-resourceId": "balance" + }, + "balance_amount": { + "description": "", + "properties": { + "amount": { + "description": "Balance amount.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "source_types": { + "$ref": "#/components/schemas/balance_amount_by_source_type" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "BalanceAmount", + "type": "object", + "x-expandableFields": [ + "source_types" + ] + }, + "balance_amount_by_source_type": { + "description": "", + "properties": { + "bank_account": { + "description": "Amount for bank account.", + "type": "integer" + }, + "card": { + "description": "Amount for card.", + "type": "integer" + }, + "fpx": { + "description": "Amount for FPX.", + "type": "integer" + } + }, + "title": "BalanceAmountBySourceType", + "type": "object", + "x-expandableFields": [] + }, + "balance_detail": { + "description": "", + "properties": { + "available": { + "description": "Funds that are available for use.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + } + }, + "required": [ + "available" + ], + "title": "BalanceDetail", + "type": "object", + "x-expandableFields": [ + "available" + ] + }, + "balance_transaction": { + "description": "Balance transactions represent funds moving through your Stripe account.\nThey're created for every type of transaction that comes into or flows out of your Stripe account balance.\n\nRelated guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).", + "properties": { + "amount": { + "description": "Gross amount of the transaction, in %s.", + "type": "integer" + }, + "available_on": { + "description": "The date the transaction's net funds will become available in the Stripe balance.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "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": "The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.", + "nullable": true, + "type": "number" + }, + "fee": { + "description": "Fees (in %s) paid for this transaction.", + "type": "integer" + }, + "fee_details": { + "description": "Detailed breakdown of fees (in %s) paid for this transaction.", + "items": { + "$ref": "#/components/schemas/fee" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "net": { + "description": "Net amount of the transaction, in %s.", + "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](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ], + "description": "The Stripe object to which this transaction is related.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + }, + "x-stripeBypassValidation": true + }, + "status": { + "description": "If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.", + "enum": [ + "adjustment", + "advance", + "advance_funding", + "anticipation_repayment", + "application_fee", + "application_fee_refund", + "charge", + "connect_collection_transfer", + "contribution", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "payment", + "payment_failure_refund", + "payment_refund", + "payout", + "payout_cancel", + "payout_failure", + "refund", + "refund_failure", + "reserve_transaction", + "reserved_funds", + "stripe_fee", + "stripe_fx_fee", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "created", + "currency", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": [ + "fee_details", + "source" + ], + "x-resourceId": "balance_transaction" + }, + "bank_account": { + "description": "These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer\ndestinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-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](https://stripe.com/docs/payments/bank-debits-transfers).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The ID of the account that the bank account is associated with.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "available_payout_methods": { + "description": "A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.", + "items": { + "enum": [ + "instant", + "standard" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "bank_name": { + "description": "Name of the bank associated with the routing number (e.g., `WELLS FARGO`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer that the bank account is associated with.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_for_currency": { + "description": "Whether this bank account is the default external account for its currency.", + "nullable": true, + "type": "boolean" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "bank_account" + ], + "type": "string" + }, + "routing_number": { + "description": "The routing transit number for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country", + "currency", + "id", + "last4", + "object", + "status" + ], + "title": "BankAccount", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "bank_account" + }, + "bank_connections_resource_accountholder": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "type": { + "description": "Type of account holder that this account belongs to.", + "enum": [ + "account", + "customer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "BankConnectionsResourceAccountholder", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ] + }, + "bank_connections_resource_balance": { + "description": "", + "properties": { + "as_of": { + "description": "The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "cash": { + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_cash_balance" + }, + "credit": { + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_credit_balance" + }, + "current": { + "additionalProperties": { + "type": "integer" + }, + "description": "The balances owed to (or by) the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": "object" + }, + "type": { + "description": "The `type` of the balance. An additional hash is included on the balance with a name matching this value.", + "enum": [ + "cash", + "credit" + ], + "type": "string" + } + }, + "required": [ + "as_of", + "current", + "type" + ], + "title": "BankConnectionsResourceBalance", + "type": "object", + "x-expandableFields": [ + "cash", + "credit" + ] + }, + "bank_connections_resource_balance_api_resource_cash_balance": { + "description": "", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "The funds available to the account holder. Typically this is the current balance less any holds.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "nullable": true, + "type": "object" + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCashBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_api_resource_credit_balance": { + "description": "", + "properties": { + "used": { + "additionalProperties": { + "type": "integer" + }, + "description": "The credit that has been used by the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "nullable": true, + "type": "object" + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCreditBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + } + }, + "required": [ + "last_attempted_at", + "status" + ], + "title": "BankConnectionsResourceBalanceRefresh", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_link_account_session_filters": { + "description": "", + "properties": { + "countries": { + "description": "List of countries from which to filter accounts.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "title": "BankConnectionsResourceLinkAccountSessionFilters", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_ownership_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + } + }, + "required": [ + "last_attempted_at", + "status" + ], + "title": "BankConnectionsResourceOwnershipRefresh", + "type": "object", + "x-expandableFields": [] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Billing address.", + "nullable": true + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "Billing phone number (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "billing_details", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "billing_portal.configuration": { + "description": "A portal configuration describes the functionality and behavior of a portal session.", + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the configuration.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "business_profile": { + "$ref": "#/components/schemas/portal_business_profile" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_return_url": { + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "features": { + "$ref": "#/components/schemas/portal_features" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_default": { + "description": "Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "login_page": { + "$ref": "#/components/schemas/portal_login_page" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "billing_portal.configuration" + ], + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "active", + "business_profile", + "created", + "features", + "id", + "is_default", + "livemode", + "login_page", + "object", + "updated" + ], + "title": "PortalConfiguration", + "type": "object", + "x-expandableFields": [ + "application", + "business_profile", + "features", + "login_page" + ], + "x-resourceId": "billing_portal.configuration" + }, + "billing_portal.session": { + "description": "The Billing customer portal is a Stripe-hosted UI for subscription and\nbilling management.\n\nA portal configuration describes the functionality and features that you\nwant to provide to your customers through the portal.\n\nA portal session describes the instantiation of the customer portal for\na particular customer. By visiting the session's URL, the customer\ncan manage their subscriptions and billing details. For security reasons,\nsessions are short-lived and will expire if the customer does not visit the URL.\nCreate sessions on-demand when customers intend to manage their subscriptions\nand billing details.\n\nLearn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).", + "properties": { + "configuration": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing_portal.configuration" + } + ], + "description": "The configuration used by this session, describing the features available.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing_portal.configuration" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "description": "The ID of the customer for this session.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow" + } + ], + "description": "Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW" + ], + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "billing_portal.session" + ], + "type": "string" + }, + "on_behalf_of": { + "description": "The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_url": { + "description": "The URL to redirect customers to when they click on the portal's link to return to your website.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The short-lived URL of the session that gives customers access to the customer portal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "configuration", + "created", + "customer", + "id", + "livemode", + "object", + "url" + ], + "title": "PortalSession", + "type": "object", + "x-expandableFields": [ + "configuration", + "flow" + ], + "x-resourceId": "billing_portal.session" + }, + "capability": { + "description": "This is an object representing a capability for a Stripe account.\n\nRelated guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account for which the capability enables functionality.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "future_requirements": { + "$ref": "#/components/schemas/account_capability_future_requirements" + }, + "id": { + "description": "The identifier for the capability.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "capability" + ], + "type": "string" + }, + "requested": { + "description": "Whether the capability has been requested.", + "type": "boolean" + }, + "requested_at": { + "description": "Time at which the capability was requested. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "requirements": { + "$ref": "#/components/schemas/account_capability_requirements" + }, + "status": { + "description": "The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.", + "enum": [ + "active", + "disabled", + "inactive", + "pending", + "unrequested" + ], + "type": "string" + } + }, + "required": [ + "account", + "id", + "object", + "requested", + "status" + ], + "title": "AccountCapability", + "type": "object", + "x-expandableFields": [ + "account", + "future_requirements", + "requirements" + ], + "x-resourceId": "capability" + }, + "card": { + "description": "You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_line1_check": { + "description": "If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_zip_check": { + "description": "If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "available_payout_methods": { + "description": "A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.", + "items": { + "enum": [ + "instant", + "standard" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "brand": { + "description": "Card brand. Can be `American Express`, `Diners Club`, `Discover`, `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://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.", + "nullable": true, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "default_for_currency": { + "description": "Whether this card is the default external account for its currency.", + "nullable": true, + "type": "boolean" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "fingerprint": { + "description": "Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.\n\n*Starting May 1, 2021, card fingerprint in India for Connect will change 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" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + }, + "status": { + "description": "For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tokenization_method": { + "description": "If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "object" + ], + "title": "Card", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "card" + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "type": { + "description": "The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "card_generated_from_payment_method_details", + "type": "object", + "x-expandableFields": [ + "card_present" + ] + }, + "card_issuing_account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "card_mandate_payment_method_details": { + "description": "", + "properties": {}, + "title": "card_mandate_payment_method_details", + "type": "object", + "x-expandableFields": [] + }, + "cash_balance": { + "description": "A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true, + "type": "object" + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "cash_balance" + ], + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/customer_balance_customer_balance_settings" + } + }, + "required": [ + "customer", + "livemode", + "object", + "settings" + ], + "title": "cash_balance", + "type": "object", + "x-expandableFields": [ + "settings" + ], + "x-resourceId": "cash_balance" + }, + "charge": { + "description": "To charge a credit or a debit card, you create a `Charge` object. You can\nretrieve and refund individual charges as well as list all charges. Charges\nare identified by a unique, random ID.\n\nRelated guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_captured": { + "description": "Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that created the charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "nullable": true, + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "calculated_statement_descriptor": { + "description": "The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.", + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer this charge is for if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 40000, + "nullable": true, + "type": "string" + }, + "disputed": { + "description": "Whether the charge has been disputed.", + "type": "boolean" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Message to user further explaining reason for charge failure if available.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fraud_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_fraud_details" + } + ], + "description": "Information on fraud assessments for the charge.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice this charge is for if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "charge" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_outcome" + } + ], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.", + "nullable": true + }, + "paid": { + "description": "`true` if the charge succeeded, or was successfully authorized for later capture.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_method": { + "description": "ID of the payment method used in this charge.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details" + } + ], + "description": "Details about the payment method at the time of the transaction.", + "nullable": true + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge was sent to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "receipt_url": { + "description": "This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "refunded": { + "description": "Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the charge.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + } + ], + "description": "ID of the review associated with this charge if one exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for the charge.", + "nullable": true + }, + "source_transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the payment is either `succeeded`, `pending`, or `failed`.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_transfer_data" + } + ], + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "nullable": true + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "billing_details", + "captured", + "created", + "currency", + "disputed", + "id", + "livemode", + "metadata", + "object", + "paid", + "refunded", + "status" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "invoice", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "radar_options", + "refunds", + "review", + "shipping", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge" + }, + "charge_fraud_details": { + "description": "", + "properties": { + "stripe_report": { + "description": "Assessments from Stripe. If set, the value is `fraudulent`.", + "maxLength": 5000, + "type": "string" + }, + "user_report": { + "description": "Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "ChargeFraudDetails", + "type": "object", + "x-expandableFields": [] + }, + "charge_outcome": { + "description": "", + "properties": { + "network_status": { + "description": "Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as \"pending\" on a cardholder's statement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reason": { + "description": "An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "risk_level": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.", + "maxLength": 5000, + "type": "string" + }, + "risk_score": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.", + "type": "integer" + }, + "rule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/rule" + } + ], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/rule" + } + ] + } + }, + "seller_message": { + "description": "A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": [ + "rule" + ] + }, + "charge_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.", + "nullable": true, + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "checkout.session": { + "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).", + "properties": { + "after_expiration": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration" + } + ], + "description": "When set, provides configuration for actions to take if this Checkout Session expires.", + "nullable": true + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "nullable": true, + "type": "boolean" + }, + "amount_subtotal": { + "description": "Total of all items before discounts or taxes are applied.", + "nullable": true, + "type": "integer" + }, + "amount_total": { + "description": "Total of all items after discounts and taxes are applied.", + "nullable": true, + "type": "integer" + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_pages_checkout_session_automatic_tax" + }, + "billing_address_collection": { + "description": "Describes whether Checkout should collect the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "nullable": true, + "type": "string" + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "consent": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent" + } + ], + "description": "Results of `consent_collection` for this session.", + "nullable": true + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent_collection" + } + ], + "description": "When set, provides configuration for the Checkout Session to gather active consent from customers.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "nullable": true, + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", + "enum": [ + "always", + "if_required" + ], + "nullable": true, + "type": "string" + }, + "customer_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" + } + ], + "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.", + "nullable": true + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expires_at": { + "description": "The timestamp at which the Checkout Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice created by the Checkout Session, if it exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_creation" + } + ], + "description": "Details on the state of invoice creation for the Checkout Session.", + "nullable": true + }, + "line_items": { + "description": "The line items purchased by the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "mode": { + "description": "The mode of the Checkout Session.", + "enum": [ + "payment", + "setup", + "subscription" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "checkout.session" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_link": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_link" + } + ], + "description": "The ID of the Payment Link that created this Session.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_link" + } + ] + } + }, + "payment_method_collection": { + "description": "Configure whether a Checkout Session should collect a payment method.", + "enum": [ + "always", + "if_required" + ], + "nullable": true, + "type": "string" + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/checkout_session_payment_method_options" + } + ], + "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.", + "nullable": true + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_status": { + "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", + "enum": [ + "no_payment_required", + "paid", + "unpaid" + ], + "type": "string" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_phone_number_collection" + }, + "recovered_from": { + "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" + } + ], + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" + } + ], + "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate.", + "nullable": true + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for this Checkout Session.", + "nullable": true + }, + "shipping_options": { + "description": "The shipping rate options applied to this Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" + }, + "type": "array" + }, + "status": { + "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", + "enum": [ + "complete", + "expired", + "open" + ], + "nullable": true, + "type": "string" + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "nullable": true, + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "success_url": { + "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id_collection" + }, + "total_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details" + } + ], + "description": "Tax and discount details for the computed total amount.", + "nullable": true + }, + "url": { + "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "automatic_tax", + "created", + "custom_fields", + "custom_text", + "expires_at", + "id", + "livemode", + "mode", + "object", + "payment_method_types", + "payment_status", + "shipping_options", + "success_url" + ], + "title": "Session", + "type": "object", + "x-expandableFields": [ + "after_expiration", + "automatic_tax", + "consent", + "consent_collection", + "custom_fields", + "custom_text", + "customer", + "customer_details", + "invoice", + "invoice_creation", + "line_items", + "payment_intent", + "payment_link", + "payment_method_options", + "phone_number_collection", + "setup_intent", + "shipping_address_collection", + "shipping_cost", + "shipping_details", + "shipping_options", + "subscription", + "tax_id_collection", + "total_details" + ], + "x-resourceId": "checkout.session" + }, + "checkout_acss_debit_mandate_options": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "nullable": true, + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "nullable": true, + "type": "string" + } + }, + "title": "CheckoutAcssDebitMandateOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_acss_debit_payment_method_options": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account. Returned when the Session is in `setup` mode.", + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/checkout_acss_debit_mandate_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutAcssDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "checkout_affirm_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAffirmPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_afterpay_clearpay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAfterpayClearpayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_alipay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAlipayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_au_becs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAuBecsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bacs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutBacsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bancontact_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutBancontactPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_boleto_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutBoletoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_installments_options": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates if installments are enabled", + "type": "boolean" + } + }, + "title": "CheckoutCardInstallmentsOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_payment_method_options": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/checkout_card_installments_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "checkout_customer_balance_bank_transfer_payment_method_options": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutCustomerBalanceBankTransferPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "checkout_customer_balance_payment_method_options": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/checkout_customer_balance_bank_transfer_payment_method_options" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer" + ], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutCustomerBalancePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "checkout_eps_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutEpsPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_fpx_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutFpxPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_giropay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGiropayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_grab_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGrabPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_ideal_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutIdealPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_klarna_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutKlarnaPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_konbini_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.", + "nullable": true, + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutKonbiniPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_oxxo_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutOxxoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_p24_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutP24PaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paynow_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutPaynowPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_pix_payment_method_options": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds after which Pix payment will expire.", + "nullable": true, + "type": "integer" + } + }, + "title": "CheckoutPixPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_sepa_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutSepaDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_session_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" + }, + "affirm": { + "$ref": "#/components/schemas/checkout_affirm_payment_method_options" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/checkout_afterpay_clearpay_payment_method_options" + }, + "alipay": { + "$ref": "#/components/schemas/checkout_alipay_payment_method_options" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/checkout_au_becs_debit_payment_method_options" + }, + "bacs_debit": { + "$ref": "#/components/schemas/checkout_bacs_debit_payment_method_options" + }, + "bancontact": { + "$ref": "#/components/schemas/checkout_bancontact_payment_method_options" + }, + "boleto": { + "$ref": "#/components/schemas/checkout_boleto_payment_method_options" + }, + "card": { + "$ref": "#/components/schemas/checkout_card_payment_method_options" + }, + "customer_balance": { + "$ref": "#/components/schemas/checkout_customer_balance_payment_method_options" + }, + "eps": { + "$ref": "#/components/schemas/checkout_eps_payment_method_options" + }, + "fpx": { + "$ref": "#/components/schemas/checkout_fpx_payment_method_options" + }, + "giropay": { + "$ref": "#/components/schemas/checkout_giropay_payment_method_options" + }, + "grabpay": { + "$ref": "#/components/schemas/checkout_grab_pay_payment_method_options" + }, + "ideal": { + "$ref": "#/components/schemas/checkout_ideal_payment_method_options" + }, + "klarna": { + "$ref": "#/components/schemas/checkout_klarna_payment_method_options" + }, + "konbini": { + "$ref": "#/components/schemas/checkout_konbini_payment_method_options" + }, + "oxxo": { + "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" + }, + "p24": { + "$ref": "#/components/schemas/checkout_p24_payment_method_options" + }, + "paynow": { + "$ref": "#/components/schemas/checkout_paynow_payment_method_options" + }, + "pix": { + "$ref": "#/components/schemas/checkout_pix_payment_method_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/checkout_sepa_debit_payment_method_options" + }, + "sofort": { + "$ref": "#/components/schemas/checkout_sofort_payment_method_options" + }, + "us_bank_account": { + "$ref": "#/components/schemas/checkout_us_bank_account_payment_method_options" + } + }, + "title": "CheckoutSessionPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "checkout_sofort_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutSofortPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_us_bank_account_payment_method_options": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutUsBankAccountPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "connect_collection_transfer": { + "description": "", + "properties": { + "amount": { + "description": "Amount transferred, in %s.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "connect_collection_transfer" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "destination", + "id", + "livemode", + "object" + ], + "title": "ConnectCollectionTransfer", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "country_spec": { + "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", + "properties": { + "default_currency": { + "description": "The default currency for this country. This applies to both payment methods and bank accounts.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object. Represented as the ISO country code for this country.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "country_spec" + ], + "type": "string" + }, + "supported_bank_account_currencies": { + "additionalProperties": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": "Currencies that can be accepted in the specific country (for transfers).", + "type": "object" + }, + "supported_payment_currencies": { + "description": "Currencies that can be accepted in the specified country (for payments).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_payment_methods": { + "description": "Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_transfer_countries": { + "description": "Countries that can accept transfers from the specified country.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "verification_fields": { + "$ref": "#/components/schemas/country_spec_verification_fields" + } + }, + "required": [ + "default_currency", + "id", + "object", + "supported_bank_account_currencies", + "supported_payment_currencies", + "supported_payment_methods", + "supported_transfer_countries", + "verification_fields" + ], + "title": "CountrySpec", + "type": "object", + "x-expandableFields": [ + "verification_fields" + ], + "x-resourceId": "country_spec" + }, + "country_spec_verification_field_details": { + "description": "", + "properties": { + "additional": { + "description": "Additional fields which are only required for some users.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "minimum": { + "description": "Fields which every account must eventually provide.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "additional", + "minimum" + ], + "title": "CountrySpecVerificationFieldDetails", + "type": "object", + "x-expandableFields": [] + }, + "country_spec_verification_fields": { + "description": "", + "properties": { + "company": { + "$ref": "#/components/schemas/country_spec_verification_field_details" + }, + "individual": { + "$ref": "#/components/schemas/country_spec_verification_field_details" + } + }, + "required": [ + "company", + "individual" + ], + "title": "CountrySpecVerificationFields", + "type": "object", + "x-expandableFields": [ + "company", + "individual" + ] + }, + "coupon": { + "description": "A coupon contains information about a percent-off or amount-off discount you\nmight want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),\n[checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "nullable": true, + "type": "integer" + }, + "applies_to": { + "$ref": "#/components/schemas/coupon_applies_to" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.", + "nullable": true, + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/coupon_currency_option" + }, + "description": "Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.", + "nullable": true, + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "name": { + "description": "Name of the coupon displayed to customers on for instance invoices or receipts.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "coupon" + ], + "type": "string" + }, + "percent_off": { + "description": "Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.", + "nullable": true, + "type": "number" + }, + "redeem_by": { + "description": "Date after which the coupon can no longer be redeemed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "times_redeemed": { + "description": "Number of times this coupon has been applied to a customer.", + "type": "integer" + }, + "valid": { + "description": "Taking account of the above properties, whether this coupon can still be applied to a customer.", + "type": "boolean" + } + }, + "required": [ + "created", + "duration", + "id", + "livemode", + "object", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": [ + "applies_to", + "currency_options" + ], + "x-resourceId": "coupon" + }, + "coupon_applies_to": { + "description": "", + "properties": { + "products": { + "description": "A list of product IDs this coupon applies to", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "products" + ], + "title": "CouponAppliesTo", + "type": "object", + "x-expandableFields": [] + }, + "coupon_currency_option": { + "description": "", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": "integer" + } + }, + "required": [ + "amount_off" + ], + "title": "CouponCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "credit_note": { + "description": "Issue a credit note to adjust an invoice's amount after the invoice is finalized.\n\nRelated guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).", + "properties": { + "amount": { + "description": "The integer amount in %s representing the total amount of the credit note, including tax.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer_balance_transaction" + } + ], + "description": "Customer balance transaction related to this credit note.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer_balance_transaction" + } + ] + } + }, + "discount_amount": { + "description": "The integer amount in %s representing the total amount of discount that was credited.", + "type": "integer" + }, + "discount_amounts": { + "description": "The aggregate amounts calculated per discount for all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "Line items that make up the credit note", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "memo": { + "description": "Customer-facing text that appears on the credit note PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "credit_note" + ], + "type": "string" + }, + "out_of_band_amount": { + "description": "Amount that was credited outside of Stripe.", + "nullable": true, + "type": "integer" + }, + "pdf": { + "description": "The link to download the PDF of the credit note.", + "maxLength": 5000, + "type": "string" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "nullable": true, + "type": "string" + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Refund related to this credit note.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_shipping_cost" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied to the invoice.", + "nullable": true + }, + "status": { + "description": "Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).", + "enum": [ + "issued", + "void" + ], + "type": "string" + }, + "subtotal": { + "description": "The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.", + "nullable": true, + "type": "integer" + }, + "tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/credit_note_tax_amount" + }, + "type": "array" + }, + "total": { + "description": "The integer amount in %s representing the total amount of the credit note, including tax and all discount.", + "type": "integer" + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.", + "nullable": true, + "type": "integer" + }, + "type": { + "description": "Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.", + "enum": [ + "post_payment", + "pre_payment" + ], + "type": "string" + }, + "voided_at": { + "description": "The time that the credit note was voided.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount", + "amount_shipping", + "created", + "currency", + "customer", + "discount_amount", + "discount_amounts", + "id", + "invoice", + "lines", + "livemode", + "number", + "object", + "pdf", + "status", + "subtotal", + "tax_amounts", + "total", + "type" + ], + "title": "CreditNote", + "type": "object", + "x-expandableFields": [ + "customer", + "customer_balance_transaction", + "discount_amounts", + "invoice", + "lines", + "refund", + "shipping_cost", + "tax_amounts" + ], + "x-resourceId": "credit_note" + }, + "credit_note_line_item": { + "description": "", + "properties": { + "amount": { + "description": "The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.", + "nullable": true, + "type": "integer" + }, + "description": { + "description": "Description of the item being credited.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount_amount": { + "description": "The integer amount in %s representing the discount being credited for this line item.", + "type": "integer" + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "description": "ID of the invoice line item being credited", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "credit_note_line_item" + ], + "type": "string" + }, + "quantity": { + "description": "The number of units of product being credited.", + "nullable": true, + "type": "integer" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/credit_note_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.", + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "description": "The cost of each unit of product being credited.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "discount_amount", + "discount_amounts", + "id", + "livemode", + "object", + "tax_amounts", + "tax_rates", + "type" + ], + "title": "CreditNoteLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "credit_note_line_item" + }, + "credit_note_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate" + ], + "title": "CreditNoteTaxAmount", + "type": "object", + "x-expandableFields": [ + "tax_rate" + ] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "nullable": true + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "nullable": true, + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "unit_amount": { + "description": "The unit amount in %s 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 %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": [ + "custom_unit_amount", + "tiers" + ] + }, + "custom_unit_amount": { + "description": "", + "properties": { + "maximum": { + "description": "The maximum unit amount the customer can specify for this item.", + "nullable": true, + "type": "integer" + }, + "minimum": { + "description": "The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.", + "nullable": true, + "type": "integer" + }, + "preset": { + "description": "The starting unit amount which can be updated by the customer.", + "nullable": true, + "type": "integer" + } + }, + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [] + }, + "customer": { + "description": "This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.\n\nRelated guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The customer's address.", + "nullable": true + }, + "balance": { + "description": "Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "type": "integer" + }, + "cash_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/cash_balance" + } + ], + "description": "The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source \"cash_balance\". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "ID of the default payment source for the customer.\n\nIf you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "delinquent": { + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.\n\nIf an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.", + "nullable": true, + "type": "boolean" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "Describes the current discount active on the customer, if there is one.", + "nullable": true + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_credit_balance": { + "additionalProperties": { + "type": "integer" + }, + "description": "The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.", + "type": "object" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_customer_setting" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The suffix of the customer's next invoice number, e.g., 0001.", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer" + ], + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_locales": { + "description": "The customer's preferred locales (languages), ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer.", + "nullable": true + }, + "sources": { + "description": "The customer's payment sources, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "tax": { + "$ref": "#/components/schemas/customer_tax" + }, + "tax_exempt": { + "description": "Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **\"Reverse charge\"**.", + "enum": [ + "exempt", + "none", + "reverse" + ], + "nullable": true, + "type": "string" + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this customer belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "id", + "livemode", + "object" + ], + "title": "Customer", + "type": "object", + "x-expandableFields": [ + "address", + "cash_balance", + "default_source", + "discount", + "invoice_settings", + "shipping", + "sources", + "subscriptions", + "tax", + "tax_ids", + "test_clock" + ], + "x-resourceId": "customer" + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time at which the customer accepted the Mandate.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "offline": { + "$ref": "#/components/schemas/offline_acceptance" + }, + "online": { + "$ref": "#/components/schemas/online_acceptance" + }, + "type": { + "description": "The type of customer acceptance information included with the Mandate. One of `online` or `offline`.", + "enum": [ + "offline", + "online" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": [ + "offline", + "online" + ] + }, + "customer_balance_customer_balance_settings": { + "description": "", + "properties": { + "reconciliation_mode": { + "description": "The configuration for how funds that land in the customer cash balance are reconciled.", + "enum": [ + "automatic", + "manual" + ], + "type": "string" + }, + "using_merchant_default": { + "description": "A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance", + "type": "boolean" + } + }, + "required": [ + "reconciliation_mode", + "using_merchant_default" + ], + "title": "CustomerBalanceCustomerBalanceSettings", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "payment_intent" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction", + "type": "object", + "x-expandableFields": [ + "payment_intent" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer" + } + }, + "required": [ + "bank_transfer" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer" + }, + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer": { + "description": "", + "properties": { + "bic": { + "description": "The BIC of the bank of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "iban_last4": { + "description": "The last 4 digits of the IBAN of the sender of the funding.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction": { + "description": "", + "properties": { + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + } + }, + "required": [ + "refund" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction", + "type": "object", + "x-expandableFields": [ + "refund" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "payment_intent" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction", + "type": "object", + "x-expandableFields": [ + "payment_intent" + ] + }, + "customer_balance_transaction": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,\nwhich denotes a debit or credit that's automatically applied to their next invoice upon finalization.\nYou may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),\nor by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.\n\nRelated guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.", + "properties": { + "amount": { + "description": "The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "credit_note": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/credit_note" + } + ], + "description": "The ID of the credit note (if any) related to the transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/credit_note" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The ID of the customer the transaction belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "ending_balance": { + "description": "The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The ID of the invoice (if any) related to the transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer_balance_transaction" + ], + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.", + "enum": [ + "adjustment", + "applied_to_invoice", + "credit_note", + "initial", + "invoice_overpaid", + "invoice_too_large", + "invoice_too_small", + "migration", + "unapplied_from_invoice", + "unspent_receiver_credit" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "object", + "type" + ], + "title": "CustomerBalanceTransaction", + "type": "object", + "x-expandableFields": [ + "credit_note", + "customer", + "invoice" + ], + "x-resourceId": "customer_balance_transaction" + }, + "customer_cash_balance_transaction": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "applied_to_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The customer whose available cash balance changed as a result of this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "ending_balance": { + "description": "The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "funded": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "net_amount": { + "description": "The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer_cash_balance_transaction" + ], + "type": "string" + }, + "refunded_from_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction" + }, + "type": { + "description": "The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.", + "enum": [ + "applied_to_payment", + "funded", + "funding_reversed", + "refunded_from_payment", + "return_canceled", + "return_initiated", + "unapplied_from_payment" + ], + "type": "string" + }, + "unapplied_from_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction" + } + }, + "required": [ + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "net_amount", + "object", + "type" + ], + "title": "CustomerCashBalanceTransaction", + "type": "object", + "x-expandableFields": [ + "applied_to_payment", + "customer", + "funded", + "refunded_from_payment", + "unapplied_from_payment" + ], + "x-resourceId": "customer_cash_balance_transaction" + }, + "customer_tax": { + "description": "", + "properties": { + "automatic_tax": { + "description": "Surfaces if automatic tax computation is possible given the current customer location information.", + "enum": [ + "failed", + "not_collecting", + "supported", + "unrecognized_location" + ], + "type": "string" + }, + "ip_address": { + "description": "A recent IP address of the customer used for tax reporting and tax location inference.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer_tax_location" + } + ], + "description": "The customer's location as identified by Stripe Tax.", + "nullable": true + } + }, + "required": [ + "automatic_tax" + ], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": [ + "location" + ] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The customer's country as identified by Stripe Tax.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "The data source used to infer the customer's location.", + "enum": [ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination" + ], + "type": "string" + }, + "state": { + "description": "The customer's state, county, province, or region as identified by Stripe Tax.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "country", + "source" + ], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [] + }, + "deleted_account": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedAccount", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_account" + }, + "deleted_apple_pay_domain": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "apple_pay_domain" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_apple_pay_domain" + }, + "deleted_application": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [] + }, + "deleted_bank_account": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "bank_account" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "deleted_card": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCard", + "type": "object", + "x-expandableFields": [] + }, + "deleted_coupon": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "coupon" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCoupon", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_coupon" + }, + "deleted_customer": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCustomer", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_customer" + }, + "deleted_discount": { + "description": "", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer associated with this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_item": { + "description": "The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + } + ], + "description": "The promotion code applied to create this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "coupon", + "deleted", + "id", + "object", + "start" + ], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "deleted_discount" + }, + "deleted_external_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_external_account", + "x-stripeBypassValidation": true + }, + "deleted_invoice": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoice" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedInvoice", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoice" + }, + "deleted_invoiceitem": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoiceitem" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedInvoiceItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoiceitem" + }, + "deleted_payment_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_payment_source", + "x-stripeBypassValidation": true + }, + "deleted_person": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "person" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedPerson", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_person" + }, + "deleted_plan": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "plan" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedPlan", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_plan" + }, + "deleted_price": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "price" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedPrice", + "type": "object", + "x-expandableFields": [] + }, + "deleted_product": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "product" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedProduct", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_product" + }, + "deleted_radar.value_list": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "RadarListDeletedList", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list" + }, + "deleted_radar.value_list_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list_item" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "RadarListDeletedListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list_item" + }, + "deleted_subscription_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_item" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedSubscriptionItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_subscription_item" + }, + "deleted_tax_id": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_id" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "deleted_tax_id", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_tax_id" + }, + "deleted_terminal.configuration": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.configuration" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "TerminalConfigurationDeletedConfiguration", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.configuration" + }, + "deleted_terminal.location": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.location" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "TerminalLocationDeletedLocation", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.location" + }, + "deleted_terminal.reader": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.reader" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "TerminalReaderDeletedReader", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.reader" + }, + "deleted_test_helpers.test_clock": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "test_helpers.test_clock" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedTestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_test_helpers.test_clock" + }, + "deleted_webhook_endpoint": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "webhook_endpoint" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "NotificationWebhookEndpointDeleted", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_webhook_endpoint" + }, + "discount": { + "description": "A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer associated with this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "end": { + "description": "If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_item": { + "description": "The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + } + ], + "description": "The promotion code applied to create this discount.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "coupon", + "id", + "object", + "start" + ], + "title": "Discount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "discount" + }, + "discounts_resource_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the discount.", + "type": "integer" + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + } + }, + "required": [ + "amount", + "discount" + ], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "dispute": { + "description": "A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you're given the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate. You can find more\ninformation about the dispute process in our [Disputes and\nFraud](/docs/disputes) documentation.\n\nRelated guide: [Disputes and Fraud](https://stripe.com/docs/disputes).", + "properties": { + "amount": { + "description": "Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/dispute_evidence" + }, + "evidence_details": { + "$ref": "#/components/schemas/dispute_evidence_details" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_charge_refundable": { + "description": "If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "dispute" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the PaymentIntent that was disputed.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.", + "enum": [ + "charge_refunded", + "lost", + "needs_response", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string" + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent" + ], + "x-resourceId": "dispute" + }, + "dispute_evidence": { + "description": "", + "properties": { + "access_activity_log": { + "description": "Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "billing_address": { + "description": "The billing address provided by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cancellation_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cancellation_policy_disclosure": { + "description": "An explanation of how and when the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "cancellation_rebuttal": { + "description": "A justification for why the customer's subscription was not canceled.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "customer_communication": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_name": { + "description": "The name of the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_signature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_explanation": { + "description": "An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "duplicate_charge_id": { + "description": "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy_disclosure": { + "description": "Documentation demonstrating that the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "refund_refusal_explanation": { + "description": "A justification for why the customer is not entitled to a refund.", + "maxLength": 150000, + "nullable": true, + "type": "string" + }, + "service_date": { + "description": "The date on which the customer received or began receiving the purchased service, in a clear human-readable format.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_address": { + "description": "The address to which a physical product was shipped. You should try to include as complete address information as possible.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_date": { + "description": "The date on which a physical product began its route to the shipping address, in a clear human-readable format.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_tracking_number": { + "description": "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "uncategorized_file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "nullable": true, + "type": "string" + } + }, + "title": "DisputeEvidence", + "type": "object", + "x-expandableFields": [ + "cancellation_policy", + "customer_communication", + "customer_signature", + "duplicate_charge_documentation", + "receipt", + "refund_policy", + "service_documentation", + "shipping_documentation", + "uncategorized_file" + ] + }, + "dispute_evidence_details": { + "description": "", + "properties": { + "due_by": { + "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be null 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" + }, + "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": [ + "has_evidence", + "past_due", + "submission_count" + ], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": [] + }, + "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": [] + }, + "ephemeral_key": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires": { + "description": "Time at which the key will expire. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "ephemeral_key" + ], + "type": "string" + }, + "secret": { + "description": "The key's secret. You can use this value to make authorized requests to the Stripe API.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "expires", + "id", + "livemode", + "object" + ], + "title": "EphemeralKey", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "ephemeral_key" + }, + "error": { + "description": "An error response from the Stripe API", + "properties": { + "error": { + "$ref": "#/components/schemas/api_errors" + } + }, + "required": [ + "error" + ], + "type": "object" + }, + "event": { + "description": "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent; and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a `charge.succeeded` event will contain a charge, and an\n`invoice.payment_failed` event will contain an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. Webhooks are managed\nin your\n[account settings](https://dashboard.stripe.com/account/webhooks),\nand our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional `account` attribute in the received `Event` object.\n\n**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is\nguaranteed only for 30 days.", + "properties": { + "account": { + "description": "The connected account that originated the event.", + "maxLength": 5000, + "type": "string" + }, + "api_version": { + "description": "The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data": { + "$ref": "#/components/schemas/notification_event_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "event" + ], + "type": "string" + }, + "pending_webhooks": { + "description": "Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.", + "type": "integer" + }, + "request": { + "anyOf": [ + { + "$ref": "#/components/schemas/notification_event_request" + } + ], + "description": "Information on the API request that instigated the event.", + "nullable": true + }, + "type": { + "description": "Description of the event (e.g., `invoice.created` or `charge.refunded`).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data", + "id", + "livemode", + "object", + "pending_webhooks", + "type" + ], + "title": "NotificationEvent", + "type": "object", + "x-expandableFields": [ + "data", + "request" + ], + "x-resourceId": "event" + }, + "exchange_rate": { + "description": "`Exchange Rate` objects allow you to determine the rates that Stripe is\ncurrently using to convert from one currency to another. Since this number is\nvariable throughout the day, there are various reasons why you might want to\nknow the current rate (for example, to dynamically price an item for a user\nwith a default payment in a foreign currency).\n\nIf you want a guarantee that the charge is made with a certain exchange rate\nyou expect is current, you can pass in `exchange_rate` to charges endpoints.\nIf the value is no longer up to date, the charge won't go through. Please\nrefer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more\ndetails.", + "properties": { + "id": { + "description": "Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "exchange_rate" + ], + "type": "string" + }, + "rates": { + "additionalProperties": { + "type": "number" + }, + "description": "Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.", + "type": "object" + } + }, + "required": [ + "id", + "object", + "rates" + ], + "title": "ExchangeRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "exchange_rate" + }, + "external_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-resourceId": "external_account", + "x-stripeBypassValidation": true + }, + "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).", + "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`, `stripe_fee` or `tax`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "type" + ], + "title": "Fee", + "type": "object", + "x-expandableFields": [] + }, + "fee_refund": { + "description": "`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "fee_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "fee", + "id", + "object" + ], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "fee" + ], + "x-resourceId": "fee_refund" + }, + "file": { + "description": "This is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File Upload Guide](https://stripe.com/docs/file-upload).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The time at which the file expires and is no longer available in epoch seconds.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "filename": { + "description": "A filename for the file, suitable for saving to a filesystem.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "links": { + "description": "A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileLinkList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file" + ], + "type": "string" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "size": { + "description": "The size in bytes of the file object.", + "type": "integer" + }, + "title": { + "description": "A user friendly title for the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL from which the file can be downloaded using your live secret API key.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "created", + "id", + "object", + "purpose", + "size" + ], + "title": "File", + "type": "object", + "x-expandableFields": [ + "links" + ], + "x-resourceId": "file" + }, + "file_link": { + "description": "To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that can be used 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": "Whether this link is already expired.", + "type": "boolean" + }, + "expires_at": { + "description": "Time at which the link expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object this link points to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file_link" + ], + "type": "string" + }, + "url": { + "description": "The publicly accessible URL to download the file.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "created", + "expired", + "file", + "id", + "livemode", + "metadata", + "object" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": [ + "file" + ], + "x-resourceId": "file_link" + }, + "financial_connections.account": { + "description": "A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_accountholder" + } + ], + "description": "The account holder that this account belongs to.", + "nullable": true + }, + "balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_balance" + } + ], + "description": "The most recent information about the account's balance.", + "nullable": true + }, + "balance_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_balance_refresh" + } + ], + "description": "The state of the most recent attempt to refresh the account balance.", + "nullable": true + }, + "category": { + "description": "The type of the account. Account category is further divided in `subcategory`.", + "enum": [ + "cash", + "credit", + "investment", + "other" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "display_name": { + "description": "A human-readable name that has been assigned to this account, either by the account holder or by the institution.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "institution_name": { + "description": "The name of the institution that holds this account.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the account number. If present, this will be 4 numeric characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.account" + ], + "type": "string" + }, + "ownership": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/financial_connections.account_ownership" + } + ], + "description": "The most recent information about the account's owners.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/financial_connections.account_ownership" + } + ] + } + }, + "ownership_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_ownership_refresh" + } + ], + "description": "The state of the most recent attempt to refresh the account owners.", + "nullable": true + }, + "permissions": { + "description": "The list of permissions granted by this account.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "status": { + "description": "The status of the link to the account.", + "enum": [ + "active", + "disconnected", + "inactive" + ], + "type": "string" + }, + "subcategory": { + "description": "If `category` is `cash`, one of:\n\n - `checking`\n - `savings`\n - `other`\n\nIf `category` is `credit`, one of:\n\n - `mortgage`\n - `line_of_credit`\n - `credit_card`\n - `other`\n\nIf `category` is `investment` or `other`, this will be `other`.", + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "other", + "savings" + ], + "type": "string" + }, + "supported_payment_method_types": { + "description": "The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.", + "items": { + "enum": [ + "link", + "us_bank_account" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "category", + "created", + "id", + "institution_name", + "livemode", + "object", + "status", + "subcategory", + "supported_payment_method_types" + ], + "title": "BankConnectionsResourceLinkedAccount", + "type": "object", + "x-expandableFields": [ + "account_holder", + "balance", + "balance_refresh", + "ownership", + "ownership_refresh" + ], + "x-resourceId": "financial_connections.account" + }, + "financial_connections.account_owner": { + "description": "", + "properties": { + "email": { + "description": "The email address of the owner.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The full name of the owner.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.account_owner" + ], + "type": "string" + }, + "ownership": { + "description": "The ownership object that this owner belongs to.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The raw phone number of the owner.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "raw_address": { + "description": "The raw physical address of the owner.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "refreshed_at": { + "description": "The timestamp of the refresh that updated this owner.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "id", + "name", + "object", + "ownership" + ], + "title": "BankConnectionsResourceOwner", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "financial_connections.account_owner" + }, + "financial_connections.account_ownership": { + "description": "Describes a snapshot of the owners of an account at a particular point in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.account_ownership" + ], + "type": "string" + }, + "owners": { + "description": "A paginated list of owners for this account.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + }, + "required": [ + "created", + "id", + "object", + "owners" + ], + "title": "BankConnectionsResourceOwnership", + "type": "object", + "x-expandableFields": [ + "owners" + ] + }, + "financial_connections.session": { + "description": "A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_accountholder" + } + ], + "description": "The account holder for whom accounts are collected in this session.", + "nullable": true + }, + "accounts": { + "description": "The accounts that were collected as part of this Session.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "client_secret": { + "description": "A value that will be passed to the client to launch the authentication flow.", + "maxLength": 5000, + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/bank_connections_resource_link_account_session_filters" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.session" + ], + "type": "string" + }, + "permissions": { + "description": "Permissions requested for accounts collected during this session.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "accounts", + "client_secret", + "id", + "livemode", + "object", + "permissions" + ], + "title": "BankConnectionsResourceLinkAccountSession", + "type": "object", + "x-expandableFields": [ + "account_holder", + "accounts", + "filters" + ], + "x-resourceId": "financial_connections.session" + }, + "financial_reporting_finance_report_run_run_parameters": { + "description": "", + "properties": { + "columns": { + "description": "The set of output columns requested for inclusion in the report run.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "description": "Connected account ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Currency of objects to be included in the report run.", + "type": "string" + }, + "interval_end": { + "description": "Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value.", + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "description": "Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value.", + "format": "unix-time", + "type": "integer" + }, + "payout": { + "description": "Payout ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "reporting_category": { + "description": "Category of balance transactions to be included in the report run.", + "maxLength": 5000, + "type": "string" + }, + "timezone": { + "description": "Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "FinancialReportingFinanceReportRunRunParameters", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is\nautomatically applied to future invoices and payments using the `customer_balance` payment method.\nCustomers can fund this balance by initiating a bank transfer to any account in the\n`financial_addresses` field.\nRelated guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "funding_type": { + "description": "The `funding_type` of the returned instructions", + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "funding_instructions" + ], + "type": "string" + } + }, + "required": [ + "bank_transfer", + "currency", + "funding_type", + "livemode", + "object" + ], + "title": "CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ], + "x-resourceId": "funding_instructions" + }, + "funding_instructions_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The country of the bank account to fund", + "maxLength": 5000, + "type": "string" + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund a particular balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "type": { + "description": "The bank_transfer type", + "enum": [ + "eu_bank_transfer", + "jp_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "country", + "financial_addresses", + "type" + ], + "title": "FundingInstructionsBankTransfer", + "type": "object", + "x-expandableFields": [ + "financial_addresses" + ] + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "iban": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_iban_record" + }, + "sort_code": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_sort_code_record" + }, + "spei": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_spei_record" + }, + "supported_networks": { + "description": "The payment networks supported by this FinancialAddress", + "items": { + "enum": [ + "bacs", + "fps", + "sepa", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": [ + "iban", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "zengin": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_zengin_record" + } + }, + "required": [ + "type" + ], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": [ + "iban", + "sort_code", + "spei", + "zengin" + ] + }, + "funding_instructions_bank_transfer_iban_record": { + "description": "Iban Records contain E.U. bank account details per the SEPA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "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_name", + "bic", + "country", + "iban" + ], + "title": "FundingInstructionsBankTransferIbanRecord", + "type": "object", + "x-expandableFields": [] + }, + "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_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" + }, + "sort_code": { + "description": "The six-digit sort code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number", + "sort_code" + ], + "title": "FundingInstructionsBankTransferSortCodeRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "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": [ + "bank_code", + "bank_name", + "clabe" + ], + "title": "FundingInstructionsBankTransferSpeiRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "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_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" + } + }, + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_date_of_birth": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataDocumentReportDateOfBirth", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_expiration_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataDocumentReportExpirationDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_issued_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataDocumentReportIssuedDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_id_number_report_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataIdNumberReportDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_verified_outputs_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "Numerical month between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year.", + "nullable": true, + "type": "integer" + } + }, + "title": "GelatoDataVerifiedOutputsDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_document_report": { + "description": "Result from a document check", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Address as it appears in the document.", + "nullable": true + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_date_of_birth" + } + ], + "description": "Date of birth as it appears in the document.", + "nullable": true + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_document_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "expiration_date": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_expiration_date" + } + ], + "description": "Expiration date of the document.", + "nullable": true + }, + "files": { + "description": "Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "first_name": { + "description": "First name as it appears in the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issued_date": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_issued_date" + } + ], + "description": "Issued date of the document.", + "nullable": true + }, + "issuing_country": { + "description": "Issuing country of the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "Last name as it appears in the document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "number": { + "description": "Document ID number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `document` check.", + "enum": [ + "unverified", + "verified" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "Type of the document.", + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "GelatoDocumentReport", + "type": "object", + "x-expandableFields": [ + "address", + "dob", + "error", + "expiration_date", + "issued_date" + ] + }, + "gelato_document_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "document_expired", + "document_type_not_supported", + "document_unverified_other" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoDocumentReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_id_number_report": { + "description": "Result from an id_number check", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_id_number_report_date" + } + ], + "description": "Date of birth.", + "nullable": true + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_id_number_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "first_name": { + "description": "First name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number": { + "description": "ID number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number_type": { + "description": "Type of ID number.", + "enum": [ + "br_cpf", + "sg_nric", + "us_ssn" + ], + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "Last name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `id_number` check.", + "enum": [ + "unverified", + "verified" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "status" + ], + "title": "GelatoIdNumberReport", + "type": "object", + "x-expandableFields": [ + "dob", + "error" + ] + }, + "gelato_id_number_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other" + ], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoIdNumberReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.", + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).", + "type": "boolean" + } + }, + "title": "GelatoReportDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoReportIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_selfie_report": { + "description": "Result from a selfie check", + "properties": { + "document": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_selfie_report_error" + } + ], + "description": "Details on the verification error. Present when status is `unverified`.", + "nullable": true + }, + "selfie": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this `selfie` check.", + "enum": [ + "unverified", + "verified" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "status" + ], + "title": "GelatoSelfieReport", + "type": "object", + "x-expandableFields": [ + "error" + ] + }, + "gelato_selfie_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other" + ], + "nullable": true, + "type": "string" + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoSelfieReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.", + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).", + "type": "boolean" + } + }, + "title": "GelatoSessionDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoSessionIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_last_error": { + "description": "Shows last VerificationSession error", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification or user-session failure.", + "enum": [ + "abandoned", + "consent_declined", + "country_not_supported", + "device_not_supported", + "document_expired", + "document_type_not_supported", + "document_unverified_other", + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + "under_supported_age" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A message that explains the reason for verification or user-session failure.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoSessionLastError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_verification_report_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/gelato_report_document_options" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_report_id_number_options" + } + }, + "title": "GelatoVerificationReportOptions", + "type": "object", + "x-expandableFields": [ + "document", + "id_number" + ] + }, + "gelato_verification_session_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/gelato_session_document_options" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_session_id_number_options" + } + }, + "title": "GelatoVerificationSessionOptions", + "type": "object", + "x-expandableFields": [ + "document", + "id_number" + ] + }, + "gelato_verified_outputs": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The user's verified address.", + "nullable": true + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_verified_outputs_date" + } + ], + "description": "The user’s verified date of birth.", + "nullable": true + }, + "first_name": { + "description": "The user's verified first name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number": { + "description": "The user's verified id number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id_number_type": { + "description": "The user's verified id number type.", + "enum": [ + "br_cpf", + "sg_nric", + "us_ssn" + ], + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "The user's verified last name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "GelatoVerifiedOutputs", + "type": "object", + "x-expandableFields": [ + "address", + "dob" + ] + }, + "identity.verification_report": { + "description": "A VerificationReport is the result of an attempt to collect and verify data from a user.\nThe collection of verification checks performed is determined from the `type` and `options`\nparameters used. You can find the result of each verification check performed in the\nappropriate sub-resource: `document`, `id_number`, `selfie`.\n\nEach VerificationReport contains a copy of any data collected by the user as well as\nreference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)\nAPI. To configure and create VerificationReports, use the\n[VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.\n\nRelated guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "document": { + "$ref": "#/components/schemas/gelato_document_report" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_id_number_report" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "identity.verification_report" + ], + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/gelato_verification_report_options" + }, + "selfie": { + "$ref": "#/components/schemas/gelato_selfie_report" + }, + "type": { + "description": "Type of report.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "verification_session": { + "description": "ID of the VerificationSession that created this report.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "options", + "type" + ], + "title": "GelatoVerificationReport", + "type": "object", + "x-expandableFields": [ + "document", + "id_number", + "options", + "selfie" + ], + "x-resourceId": "identity.verification_report" + }, + "identity.verification_session": { + "description": "A VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what [verification\ncheck](/docs/identity/verification-checks) to perform. Only create one VerificationSession for\neach verification in your system.\n\nA VerificationSession transitions through [multiple\nstatuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user's verified data after\nverification checks are complete.\n\nRelated guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)", + "properties": { + "client_secret": { + "description": "The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_session_last_error" + } + ], + "description": "If present, this property tells you the last error encountered when processing the verification.", + "nullable": true + }, + "last_verification_report": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/identity.verification_report" + } + ], + "description": "ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/identity.verification_report" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "identity.verification_session" + ], + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/gelato_verification_session_options" + }, + "redaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/verification_session_redaction" + } + ], + "description": "Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.", + "nullable": true + }, + "status": { + "description": "Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "enum": [ + "canceled", + "processing", + "requires_input", + "verified" + ], + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "url": { + "description": "The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_outputs": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_verified_outputs" + } + ], + "description": "The user’s verified data.", + "nullable": true + } + }, + "required": [ + "created", + "id", + "livemode", + "metadata", + "object", + "options", + "status", + "type" + ], + "title": "GelatoVerificationSession", + "type": "object", + "x-expandableFields": [ + "last_error", + "last_verification_report", + "options", + "redaction", + "verified_outputs" + ], + "x-resourceId": "identity.verification_session" + }, + "inbound_transfers": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the InboundTransfer.", + "enum": [ + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/inbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "InboundTransfers", + "type": "object", + "x-expandableFields": [ + "billing_details", + "us_bank_account" + ] + }, + "inbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual" + ], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings" + ], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "The US bank account network used to debit funds.", + "enum": [ + "ach" + ], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "network" + ], + "title": "inbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "invoice": { + "description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).", + "properties": { + "account_country": { + "description": "The country of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_name": { + "description": "The public name of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "amount_due": { + "description": "Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "type": "integer" + }, + "amount_paid": { + "description": "The amount, in %s, that was paid.", + "type": "integer" + }, + "amount_remaining": { + "description": "The difference between amount_due and amount_paid, in %s.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the invoice.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.", + "nullable": true, + "type": "integer" + }, + "attempt_count": { + "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", + "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 will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "$ref": "#/components/schemas/automatic_tax" + }, + "billing_reason": { + "description": "Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming" + ], + "nullable": true, + "type": "string" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the latest charge generated for this invoice, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer who will be billed.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.", + "nullable": true + }, + "customer_email": { + "description": "The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_name": { + "description": "The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_phone": { + "description": "The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.", + "nullable": true + }, + "customer_tax_exempt": { + "description": "The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.", + "enum": [ + "exempt", + "none", + "reverse" + ], + "nullable": true, + "type": "string" + }, + "customer_tax_ids": { + "description": "The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.", + "items": { + "$ref": "#/components/schemas/invoices_resource_invoice_tax_id" + }, + "nullable": true, + "type": "array" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.", + "nullable": true + }, + "discounts": { + "description": "The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "nullable": true, + "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" + }, + "ending_balance": { + "description": "Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.", + "nullable": true, + "type": "integer" + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "from_invoice": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_from_invoice" + } + ], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.", + "nullable": true + }, + "hosted_invoice_url": { + "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.", + "maxLength": 5000, + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_finalization_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.", + "nullable": true + }, + "latest_revision": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The ID of the most recent non-draft revision of this invoice", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "next_payment_attempt": { + "description": "The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "number": { + "description": "A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoice" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_settings": { + "$ref": "#/components/schemas/invoices_payment_settings" + }, + "period_end": { + "description": "End of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "Start of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "post_payment_credit_notes_amount": { + "description": "Total amount of all post-payment credit notes issued for this invoice.", + "type": "integer" + }, + "pre_payment_credit_notes_amount": { + "description": "Total amount of all pre-payment credit notes issued for this invoice.", + "type": "integer" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote this invoice was generated from.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + } + ], + "description": "Options for invoice PDF rendering.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_shipping_cost" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied on the invoice.", + "nullable": true + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.", + "nullable": true + }, + "starting_balance": { + "description": "Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.", + "type": "integer" + }, + "statement_descriptor": { + "description": "Extra information about an invoice for the customer's credit card statement.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void" + ], + "nullable": true, + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/invoices_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that this invoice was prepared for, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "type": "integer" + }, + "subtotal": { + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated", + "nullable": true, + "type": "integer" + }, + "tax": { + "description": "The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.", + "nullable": true, + "type": "integer" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this invoice belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "threshold_reason": { + "$ref": "#/components/schemas/invoice_threshold_reason" + }, + "total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "total_discount_amounts": { + "description": "The aggregate amounts calculated per discount across all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "nullable": true, + "type": "array" + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.", + "nullable": true, + "type": "integer" + }, + "total_tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_transfer_data" + } + ], + "description": "The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.", + "nullable": true + }, + "webhooks_delivered_at": { + "description": "Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "amount_due", + "amount_paid", + "amount_remaining", + "amount_shipping", + "attempt_count", + "attempted", + "automatic_tax", + "collection_method", + "created", + "currency", + "default_tax_rates", + "lines", + "livemode", + "object", + "paid", + "paid_out_of_band", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "starting_balance", + "status_transitions", + "subtotal", + "total", + "total_tax_amounts" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "charge", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "from_invoice", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "payment_intent", + "payment_settings", + "quote", + "rendering_options", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_tax_amounts", + "transfer_data" + ], + "x-resourceId": "invoice" + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "nullable": true, + "type": "boolean" + } + }, + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_item_threshold_reason": { + "description": "", + "properties": { + "line_item_ids": { + "description": "The IDs of the line items that triggered the threshold invoice.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "usage_gte": { + "description": "The quantity threshold boundary that applied to the given line item.", + "type": "integer" + } + }, + "required": [ + "line_item_ids", + "usage_gte" + ], + "title": "InvoiceItemThresholdReason", + "type": "object", + "x-expandableFields": [] + }, + "invoice_line_item_period": { + "description": "", + "properties": { + "end": { + "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.", + "format": "unix-time", + "type": "integer" + }, + "start": { + "description": "The start of the period. This value is inclusive.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "InvoiceLineItemPeriod", + "type": "object", + "x-expandableFields": [] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "nullable": true, + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "nullable": true, + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "nullable": true, + "type": "string" + } + }, + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "invoice_payment_method_options_acss_debit_mandate_options": { + "description": "", + "properties": { + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "invoice_payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/invoice_installments_card" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic" + ], + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer" + ], + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer" + }, + "type": { + "description": "The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.", + "nullable": true, + "type": "string" + } + }, + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": [ + "balances", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_custom_field": { + "description": "", + "properties": { + "name": { + "description": "The name of the custom field.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value of the custom field.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "InvoiceSettingCustomField", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + } + ], + "description": "Default options for invoice PDF rendering for this customer.", + "nullable": true + } + }, + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": [ + "custom_fields", + "default_payment_method", + "rendering_options" + ] + }, + "invoice_setting_quote_setting": { + "description": "", + "properties": { + "days_until_due": { + "description": "Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.", + "nullable": true, + "type": "integer" + } + }, + "title": "InvoiceSettingQuoteSetting", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_rendering_options": { + "description": "", + "properties": { + "amount_tax_display": { + "description": "How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "InvoiceSettingRenderingOptions", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_subscription_schedule_setting": { + "description": "", + "properties": { + "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" + } + }, + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": [] + }, + "invoice_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate" + ], + "title": "InvoiceTaxAmount", + "type": "object", + "x-expandableFields": [ + "tax_rate" + ] + }, + "invoice_threshold_reason": { + "description": "", + "properties": { + "amount_gte": { + "description": "The total invoice amount threshold boundary if it triggered the threshold invoice.", + "nullable": true, + "type": "integer" + }, + "item_reasons": { + "description": "Indicates which line items triggered a threshold invoice.", + "items": { + "$ref": "#/components/schemas/invoice_item_threshold_reason" + }, + "type": "array" + } + }, + "required": [ + "item_reasons" + ], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": [ + "item_reasons" + ] + }, + "invoice_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "nullable": true, + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "InvoiceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "invoiceitem": { + "description": "Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an\ninvoice by creating or updating it with an `invoice` field, at which point it will be included as\n[an invoice line item](https://stripe.com/docs/api/invoices/line_item) within\n[invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).\n\nInvoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined\nwith a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge\nor credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges\n(to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.\n\nRelated guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).", + "properties": { + "amount": { + "description": "Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "date": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discountable": { + "description": "If true, discounts will apply to this invoice item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The ID of the invoice this invoice item belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoiceitem" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The price of the invoice item.", + "nullable": true + }, + "proration": { + "description": "Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.", + "type": "boolean" + }, + "quantity": { + "description": "Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.", + "type": "integer" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that this invoice item has been created for, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_item": { + "description": "The subscription item that this invoice item has been created for, if any.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this invoice item belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "unit_amount": { + "description": "Unit amount (in the `currency` specified) of the invoice item.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "customer", + "date", + "discountable", + "id", + "livemode", + "object", + "period", + "proration", + "quantity" + ], + "title": "InvoiceItem", + "type": "object", + "x-expandableFields": [ + "customer", + "discounts", + "invoice", + "period", + "price", + "subscription", + "tax_rates", + "test_clock" + ], + "x-resourceId": "invoiceitem" + }, + "invoices_from_invoice": { + "description": "", + "properties": { + "action": { + "description": "The relation between this invoice and the cloned invoice", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + } + }, + "required": [ + "action", + "invoice" + ], + "title": "InvoicesFromInvoice", + "type": "object", + "x-expandableFields": [ + "invoice" + ] + }, + "invoices_line_items_credited_items": { + "description": "", + "properties": { + "invoice": { + "description": "Invoice containing the credited invoice line items", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_items": { + "description": "Credited invoice line items", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "invoice", + "invoice_line_items" + ], + "title": "InvoicesLineItemsCreditedItems", + "type": "object", + "x-expandableFields": [] + }, + "invoices_line_items_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_credited_items" + } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies.", + "nullable": true + } + }, + "title": "InvoicesLineItemsProrationDetails", + "type": "object", + "x-expandableFields": [ + "credited_items" + ] + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + } + ], + "description": "If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + } + ], + "description": "If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_card" + } + ], + "description": "If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + } + ], + "description": "If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + } + ], + "description": "If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + } + ], + "description": "If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.", + "nullable": true + } + }, + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "invoices_payment_settings": { + "description": "", + "properties": { + "default_mandate": { + "description": "ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_payment_method_options" + } + ], + "description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent.", + "nullable": true + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).", + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + } + }, + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "invoices_resource_invoice_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [] + }, + "invoices_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the ShippingRate for this invoice.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "InvoicesShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "invoices_status_transitions": { + "description": "", + "properties": { + "finalized_at": { + "description": "The time that the invoice draft was finalized.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "marked_uncollectible_at": { + "description": "The time that the invoice was marked uncollectible.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "paid_at": { + "description": "The time that the invoice was paid.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "voided_at": { + "description": "The time that the invoice was voided.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "InvoicesStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "issuing.authorization": { + "description": "When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).", + "properties": { + "amount": { + "description": "The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "approved": { + "description": "Whether the authorization has been approved.", + "type": "boolean" + }, + "authorization_method": { + "description": "How the card details were provided.", + "enum": [ + "chip", + "contactless", + "keyed_in", + "online", + "swipe" + ], + "type": "string" + }, + "balance_transactions": { + "description": "List of balance transactions associated with this authorization.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "card": { + "$ref": "#/components/schemas/issuing.card" + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ], + "description": "The cardholder to whom this authorization belongs.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was 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).", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_network_data" + } + ], + "description": "Details about the authorization, such as identifiers, set by the card network.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.authorization" + ], + "type": "string" + }, + "pending_request": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_pending_request" + } + ], + "description": "The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.", + "nullable": true + }, + "request_history": { + "description": "History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.", + "items": { + "$ref": "#/components/schemas/issuing_authorization_request" + }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": [ + "closed", + "pending", + "reversed" + ], + "type": "string" + }, + "transactions": { + "description": "List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.", + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_treasury" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).", + "nullable": true + }, + "verification_data": { + "$ref": "#/components/schemas/issuing_authorization_verification_data" + }, + "wallet": { + "description": "The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "approved", + "authorization_method", + "balance_transactions", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "request_history", + "status", + "transactions", + "verification_data" + ], + "title": "IssuingAuthorization", + "type": "object", + "x-expandableFields": [ + "amount_details", + "balance_transactions", + "card", + "cardholder", + "merchant_data", + "network_data", + "pending_request", + "request_history", + "transactions", + "treasury", + "verification_data" + ], + "x-resourceId": "issuing.authorization" + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.", + "properties": { + "brand": { + "description": "The brand of the card.", + "maxLength": 5000, + "type": "string" + }, + "cancellation_reason": { + "description": "The reason why the card was canceled.", + "enum": [ + "design_rejected", + "lost", + "stolen" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "cardholder": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.", + "type": "string" + }, + "cvc": { + "description": "The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "The expiration month of the card.", + "type": "integer" + }, + "exp_year": { + "description": "The expiration year of the card.", + "type": "integer" + }, + "financial_account": { + "description": "The financial account this card is attached to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the card number.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.card" + ], + "type": "string" + }, + "replaced_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The latest card that replaces this card, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_for": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card this card replaces, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_reason": { + "description": "The reason why the previous card needed to be replaced.", + "enum": [ + "damaged", + "expired", + "lost", + "stolen" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping" + } + ], + "description": "Where and how the card will be shipped.", + "nullable": true + }, + "spending_controls": { + "$ref": "#/components/schemas/issuing_card_authorization_controls" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "The type of the card.", + "enum": [ + "physical", + "virtual" + ], + "type": "string" + }, + "wallets": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_wallets" + } + ], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay).", + "nullable": true + } + }, + "required": [ + "brand", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "livemode", + "metadata", + "object", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card" + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)", + "properties": { + "billing": { + "$ref": "#/components/schemas/issuing_cardholder_address" + }, + "company": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_company" + } + ], + "description": "Additional information about a `company` cardholder.", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "email": { + "description": "The cardholder's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual" + } + ], + "description": "Additional information about an `individual` cardholder.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.cardholder" + ], + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "requirements": { + "$ref": "#/components/schemas/issuing_cardholder_requirements" + }, + "spending_controls": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_authorization_controls" + } + ], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "nullable": true + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards.", + "enum": [ + "active", + "blocked", + "inactive" + ], + "type": "string" + }, + "type": { + "description": "One of `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "created", + "id", + "livemode", + "metadata", + "name", + "object", + "requirements", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder" + }, + "issuing.dispute": { + "description": "As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.\n\nRelated guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of balance transactions associated with the dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "nullable": true, + "type": "array" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "The currency the `transaction` was made in.", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/issuing_dispute_evidence" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.dispute" + ], + "type": "string" + }, + "status": { + "description": "Current status of the dispute.", + "enum": [ + "expired", + "lost", + "submitted", + "unsubmitted", + "won" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.transaction" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_dispute_treasury" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts", + "nullable": true + } + }, + "required": [ + "amount", + "created", + "currency", + "evidence", + "id", + "livemode", + "metadata", + "object", + "status", + "transaction" + ], + "title": "IssuingDispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "evidence", + "transaction", + "treasury" + ], + "x-resourceId": "issuing.dispute" + }, + "issuing.settlement": { + "description": "When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object.", + "properties": { + "bin": { + "description": "The Bank Identification Number reflecting this settlement record.", + "maxLength": 5000, + "type": "string" + }, + "clearing_date": { + "description": "The date that the transactions are cleared and posted to user's accounts.", + "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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interchange_fees": { + "description": "The total interchange received as reimbursement for the transactions.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "net_total": { + "description": "The total net amount required to settle with the network.", + "type": "integer" + }, + "network": { + "description": "The card network for this settlement report. One of [\"visa\"]", + "enum": [ + "visa" + ], + "type": "string" + }, + "network_fees": { + "description": "The total amount of fees owed to the network.", + "type": "integer" + }, + "network_settlement_identifier": { + "description": "The Settlement Identification Number assigned by the network.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.settlement" + ], + "type": "string" + }, + "settlement_service": { + "description": "One of `international` or `uk_national_net`.", + "maxLength": 5000, + "type": "string" + }, + "transaction_count": { + "description": "The total number of transactions reflected in this settlement.", + "type": "integer" + }, + "transaction_volume": { + "description": "The total transaction amount reflected in this settlement.", + "type": "integer" + } + }, + "required": [ + "bin", + "clearing_date", + "created", + "currency", + "id", + "interchange_fees", + "livemode", + "metadata", + "net_total", + "network", + "network_fees", + "network_settlement_identifier", + "object", + "settlement_service", + "transaction_count", + "transaction_volume" + ], + "title": "IssuingSettlement", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "issuing.settlement" + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).", + "properties": { + "amount": { + "description": "The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "authorization": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + } + ], + "description": "The `Authorization` object that led to this transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.authorization" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card used to make this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ], + "description": "The cardholder to whom this transaction belongs.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "dispute": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + } + ], + "description": "If you've disputed the transaction, the ID of the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.dispute" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency with which the merchant is taking payment.", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.transaction" + ], + "type": "string" + }, + "purchase_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_purchase_details" + } + ], + "description": "Additional purchase information that is optionally provided by the merchant.", + "nullable": true + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_treasury" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts", + "nullable": true + }, + "type": { + "description": "The nature of the transaction.", + "enum": [ + "capture", + "refund" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "wallet": { + "description": "The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.", + "enum": [ + "apple_pay", + "google_pay", + "samsung_pay" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "type" + ], + "title": "IssuingTransaction", + "type": "object", + "x-expandableFields": [ + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "dispute", + "merchant_data", + "purchase_details", + "treasury" + ], + "x-resourceId": "issuing.transaction" + }, + "issuing_authorization_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.", + "maxLength": 5000, + "type": "string" + }, + "category_code": { + "description": "The merchant category code for the seller’s business", + "maxLength": 5000, + "type": "string" + }, + "city": { + "description": "City where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Country where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Name of the seller", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network_id": { + "description": "Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.", + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "description": "Postal code where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State where the seller is located", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "category", + "category_code", + "network_id" + ], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_network_data": { + "description": "", + "properties": { + "acquiring_institution_id": { + "description": "Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_pending_request": { + "description": "", + "properties": { + "amount": { + "description": "The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "is_amount_controllable": { + "description": "If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The local currency the merchant is requesting to authorize.", + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "issuing_authorization_request": { + "description": "", + "properties": { + "amount": { + "description": "The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true + }, + "approved": { + "description": "Whether this request was approved.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "merchant_amount": { + "description": "The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "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_inactive", + "cardholder_inactive", + "cardholder_verification_required", + "insufficient_funds", + "not_allowed", + "spending_controls", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason_message": { + "description": "If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "approved", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "reason" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "received_credits", + "received_debits" + ], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_verification_data": { + "description": "", + "properties": { + "address_line1_check": { + "description": "Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.", + "enum": [ + "match", + "mismatch", + "not_provided" + ], + "type": "string" + }, + "address_postal_code_check": { + "description": "Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.", + "enum": [ + "match", + "mismatch", + "not_provided" + ], + "type": "string" + }, + "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" + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "cvc_check", + "expiry_check" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_apple_pay": { + "description": "", + "properties": { + "eligible": { + "description": "Apple Pay Eligibility", + "type": "boolean" + }, + "ineligible_reason": { + "description": "Reason the card is ineligible for Apple Pay", + "enum": [ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).", + "items": { + "$ref": "#/components/schemas/issuing_card_spending_limit" + }, + "nullable": true, + "type": "array" + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`. Always the same as the currency of the card.", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_card_google_pay": { + "description": "", + "properties": { + "eligible": { + "description": "Google Pay Eligibility", + "type": "boolean" + }, + "ineligible_reason": { + "description": "Reason the card is ineligible for Google Pay", + "enum": [ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery company that shipped a card.", + "enum": [ + "dhl", + "fedex", + "royal_mail", + "usps" + ], + "nullable": true, + "type": "string" + }, + "customs": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping_customs" + } + ], + "description": "Additional information that may be required for clearing customs.", + "nullable": true + }, + "eta": { + "description": "A unix timestamp representing a best estimate of when the card will be delivered.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.", + "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" + ], + "nullable": true, + "type": "string" + }, + "tracking_number": { + "description": "A tracking number for a card shipment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tracking_url": { + "description": "A link to the shipping carrier's site where you can view detailed information about a card shipment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Packaging options.", + "enum": [ + "bulk", + "individual" + ], + "type": "string" + } + }, + "required": [ + "address", + "name", + "service", + "type" + ], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": [ + "address", + "customs" + ] + }, + "issuing_card_shipping_customs": { + "description": "", + "properties": { + "eori_number": { + "description": "A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/issuing_card_apple_pay" + }, + "google_pay": { + "$ref": "#/components/schemas/issuing_card_google_pay" + }, + "primary_account_identifier": { + "description": "Unique identifier for a card used with digital wallets", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "apple_pay", + "google_pay" + ], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": [ + "apple_pay", + "google_pay" + ] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + } + }, + "required": [ + "address" + ], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across this cardholder's cards.", + "items": { + "$ref": "#/components/schemas/issuing_cardholder_spending_limit" + }, + "nullable": true, + "type": "array" + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`.", + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_user_terms_acceptance" + } + ], + "description": "Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards).", + "nullable": true + } + }, + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": [ + "user_terms_acceptance" + ] + }, + "issuing_cardholder_company": { + "description": "", + "properties": { + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + } + }, + "required": [ + "tax_id_provided" + ], + "title": "IssuingCardholderCompany", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_card_issuing" + } + ], + "description": "Information related to the card_issuing program for this cardholder.", + "nullable": true + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual_dob" + } + ], + "description": "The date of birth of this cardholder.", + "nullable": true + }, + "first_name": { + "description": "The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name": { + "description": "The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_verification" + } + ], + "description": "Government-issued ID document for this cardholder.", + "nullable": true + } + }, + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "dob", + "verification" + ] + }, + "issuing_cardholder_individual_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of birth.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_requirements": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.", + "enum": [ + "listed", + "rejected.listed", + "under_review" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "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.dob.day", + "individual.dob.month", + "individual.dob.year", + "individual.first_name", + "individual.last_name", + "individual.verification.document" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + } + }, + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_user_terms_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_id_document" + } + ], + "description": "An identifying document, either a passport or local ID card.", + "nullable": true + } + }, + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_policy_provided": { + "description": "Whether the cardholder was provided with a cancellation policy.", + "nullable": true, + "type": "boolean" + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service" + ], + "nullable": true, + "type": "string" + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful" + ], + "nullable": true, + "type": "string" + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "card_statement": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cash_receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "check_image": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "original_transaction": { + "description": "Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { + "$ref": "#/components/schemas/issuing_dispute_canceled_evidence" + }, + "duplicate": { + "$ref": "#/components/schemas/issuing_dispute_duplicate_evidence" + }, + "fraudulent": { + "$ref": "#/components/schemas/issuing_dispute_fraudulent_evidence" + }, + "merchandise_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_merchandise_not_as_described_evidence" + }, + "not_received": { + "$ref": "#/components/schemas/issuing_dispute_not_received_evidence" + }, + "other": { + "$ref": "#/components/schemas/issuing_dispute_other_evidence" + }, + "reason": { + "description": "The reason for filing the dispute. Its value will match the field containing the evidence.", + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_service_not_as_described_evidence" + } + }, + "required": [ + "reason" + ], + "title": "IssuingDisputeEvidence", + "type": "object", + "x-expandableFields": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "return_description": { + "description": "Description of the cardholder's attempt to return the product.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful" + ], + "nullable": true, + "type": "string" + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service" + ], + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service" + ], + "nullable": true, + "type": "string" + } + }, + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_flight_data": { + "description": "", + "properties": { + "departure_at": { + "description": "The time that the flight departed.", + "nullable": true, + "type": "integer" + }, + "passenger_name": { + "description": "The name of the passenger.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "refundable": { + "description": "Whether the ticket is refundable.", + "nullable": true, + "type": "boolean" + }, + "segments": { + "description": "The legs of the trip.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_flight_data_leg" + }, + "nullable": true, + "type": "array" + }, + "travel_agency": { + "description": "The travel agency that issued the ticket.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": [ + "segments" + ] + }, + "issuing_transaction_flight_data_leg": { + "description": "", + "properties": { + "arrival_airport_code": { + "description": "The three-letter IATA airport code of the flight's destination.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "carrier": { + "description": "The airline carrier code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "departure_airport_code": { + "description": "The three-letter IATA airport code that the flight departed from.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flight_number": { + "description": "The flight number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "service_class": { + "description": "The flight's service class.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "stopover_allowed": { + "description": "Whether a stopover is allowed on this flight.", + "nullable": true, + "type": "boolean" + } + }, + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fuel_data": { + "description": "", + "properties": { + "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 `volume_decimal`. One of `us_gallon` or `liter`.", + "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" + }, + "volume_decimal": { + "description": "The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "type", + "unit", + "unit_cost_decimal" + ], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_lodging_data": { + "description": "", + "properties": { + "check_in_at": { + "description": "The time of checking into the lodging.", + "nullable": true, + "type": "integer" + }, + "nights": { + "description": "The number of nights stayed at the lodging.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "flight": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_flight_data" + } + ], + "description": "Information about the flight that was purchased with this transaction.", + "nullable": true + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fuel_data" + } + ], + "description": "Information about fuel that was purchased with this transaction.", + "nullable": true + }, + "lodging": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_lodging_data" + } + ], + "description": "Information about lodging that was purchased with this transaction.", + "nullable": true + }, + "receipt": { + "description": "The line items in the purchase.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_receipt_data" + }, + "nullable": true, + "type": "array" + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": [ + "flight", + "fuel", + "lodging", + "receipt" + ] + }, + "issuing_transaction_receipt_data": { + "description": "", + "properties": { + "description": { + "description": "The description of the item. The maximum length of this field is 26 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The quantity of the item.", + "nullable": true, + "type": "number" + }, + "total": { + "description": "The total for this line item in cents.", + "nullable": true, + "type": "integer" + }, + "unit_cost": { + "description": "The unit cost of the item in cents.", + "nullable": true, + "type": "integer" + } + }, + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [] + }, + "item": { + "description": "A line item.", + "properties": { + "amount_discount": { + "description": "Total discount amount applied. If no discounts were applied, defaults to 0.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.", + "maxLength": 5000, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "item" + ], + "type": "string" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The price used to generate the line item.", + "nullable": true + }, + "quantity": { + "description": "The quantity of products being purchased.", + "nullable": true, + "type": "integer" + }, + "taxes": { + "description": "The taxes applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_discount", + "amount_subtotal", + "amount_tax", + "amount_total", + "currency", + "description", + "id", + "object" + ], + "title": "LineItem", + "type": "object", + "x-expandableFields": [ + "discounts", + "price", + "taxes" + ], + "x-resourceId": "item" + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "description": "The Kana variation of the company's primary address (Japan only).", + "nullable": true + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "description": "The Kanji variation of the company's primary address (Japan only).", + "nullable": true + }, + "directors_provided": { + "description": "Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).", + "type": "boolean" + }, + "executives_provided": { + "description": "Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.", + "type": "boolean" + }, + "name": { + "description": "The company's legal name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "owners_provided": { + "description": "Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).", + "type": "boolean" + }, + "ownership_declaration": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_ubo_declaration" + } + ], + "description": "This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.", + "nullable": true + }, + "phone": { + "description": "The company's phone number (used for verification).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.", + "enum": [ + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + }, + "tax_id_registrar": { + "description": "The jurisdiction in which the `tax_id` is registered (Germany-based companies only).", + "maxLength": 5000, + "type": "string" + }, + "vat_id_provided": { + "description": "Whether the company's business VAT number was provided.", + "type": "boolean" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_company_verification" + } + ], + "description": "Information on the verification state of the company.", + "nullable": true + } + }, + "title": "LegalEntityCompany", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "ownership_declaration", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/legal_entity_company_verification_document" + } + }, + "required": [ + "document" + ], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "details_code": { + "description": "One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "legal_entity_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of birth.", + "nullable": true, + "type": "integer" + } + }, + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_japan_address": { + "description": "", + "properties": { + "city": { + "description": "City/Ward.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line1": { + "description": "Block/Building number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Building details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "Prefecture.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "town": { + "description": "Town/cho-me.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + } + ], + "description": "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.", + "nullable": true + }, + "details": { + "description": "A user-displayable string describing the verification state for the person. For example, this may say \"Provided identity information could not be verified\".", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "details_code": { + "description": "One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "document": { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": [ + "additional_document", + "document" + ] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say \"Identity document is too unclear to read\".", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "details_code": { + "description": "One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "legal_entity_ubo_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the beneficial owner attestation was made.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "ip": { + "description": "The IP address from which the beneficial owner attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user-agent string from the browser where the beneficial owner attestation was made.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [] + }, + "line_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount for this line item, excluding all tax and discounts.", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "nullable": true, + "type": "array" + }, + "discountable": { + "description": "If true, discounts will apply to this line item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_item": { + "description": "The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "line_item" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The price of the line item.", + "nullable": true + }, + "proration": { + "description": "Whether this is a proration.", + "type": "boolean" + }, + "proration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_proration_details" + } + ], + "description": "Additional details for proration line items", + "nullable": true + }, + "quantity": { + "description": "The quantity of the subscription, if the line item is a subscription or a proration.", + "nullable": true, + "type": "integer" + }, + "subscription": { + "description": "The subscription that the invoice item pertains to, if any.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "subscription_item": { + "description": "The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.", + "enum": [ + "invoiceitem", + "subscription" + ], + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount for this line item, excluding all tax and discounts.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "discountable", + "id", + "livemode", + "metadata", + "object", + "period", + "proration", + "type" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "period", + "price", + "proration_details", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "line_item" + }, + "line_items_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount discounted.", + "type": "integer" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + }, + "required": [ + "amount", + "discount" + ], + "title": "LineItemsDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "Amount of tax applied for this rate.", + "type": "integer" + }, + "rate": { + "$ref": "#/components/schemas/tax_rate" + } + }, + "required": [ + "amount", + "rate" + ], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": [ + "rate" + ] + }, + "linked_account_options_us_bank_account": { + "description": "", + "properties": { + "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" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "login_link": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "login_link" + ], + "type": "string" + }, + "url": { + "description": "The URL for the login link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "object", + "url" + ], + "title": "LoginLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "login_link" + }, + "mandate": { + "description": "A Mandate is a record of the permission a customer has given you to debit their payment method.", + "properties": { + "customer_acceptance": { + "$ref": "#/components/schemas/customer_acceptance" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "multi_use": { + "$ref": "#/components/schemas/mandate_multi_use" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "mandate" + ], + "type": "string" + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/mandate_payment_method_details" + }, + "single_use": { + "$ref": "#/components/schemas/mandate_single_use" + }, + "status": { + "description": "The status of the mandate, which indicates whether it can be used to initiate a payment.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "type": { + "description": "The type of the mandate.", + "enum": [ + "multi_use", + "single_use" + ], + "type": "string" + } + }, + "required": [ + "customer_acceptance", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "title": "Mandate", + "type": "object", + "x-expandableFields": [ + "customer_acceptance", + "multi_use", + "payment_method", + "payment_method_details", + "single_use" + ], + "x-resourceId": "mandate" + }, + "mandate_acss_debit": { + "description": "", + "properties": { + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "required": [ + "payment_schedule", + "transaction_type" + ], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_au_becs_debit": { + "description": "", + "properties": { + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "mandate_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "network_status": { + "description": "The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.", + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "type": "string" + }, + "reference": { + "description": "The unique reference identifying the mandate on the Bacs network.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "network_status", + "reference", + "url" + ], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session" + ], + "nullable": true, + "type": "string" + } + }, + "title": "mandate_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "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_options_off_session_details_blik": { + "description": "", + "properties": { + "amount": { + "description": "Amount of each recurring payment.", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "Currency of each recurring payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "interval": { + "description": "Frequency interval of each recurring payment.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "nullable": true, + "type": "string" + }, + "interval_count": { + "description": "Frequency indicator of each recurring payment.", + "nullable": true, + "type": "integer" + } + }, + "title": "mandate_options_off_session_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/mandate_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/mandate_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/mandate_bacs_debit" + }, + "blik": { + "$ref": "#/components/schemas/mandate_blik" + }, + "card": { + "$ref": "#/components/schemas/card_mandate_payment_method_details" + }, + "link": { + "$ref": "#/components/schemas/mandate_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/mandate_sepa_debit" + }, + "type": { + "description": "The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/mandate_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "mandate_payment_method_details", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "mandate_sepa_debit": { + "description": "", + "properties": { + "reference": { + "description": "The unique reference of the mandate.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "reference", + "url" + ], + "title": "mandate_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_single_use": { + "description": "", + "properties": { + "amount": { + "description": "On a single use mandate, the amount of the payment.", + "type": "integer" + }, + "currency": { + "description": "On a single use mandate, the currency of the payment.", + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "mandate_single_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_us_bank_account": { + "description": "", + "properties": {}, + "title": "mandate_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "networks": { + "description": "", + "properties": { + "available": { + "description": "All available networks for the card.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "The preferred network for the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "available" + ], + "title": "networks", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_data": { + "description": "", + "properties": { + "object": { + "description": "Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.", + "type": "object" + }, + "previous_attributes": { + "description": "Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events).", + "type": "object" + } + }, + "required": [ + "object" + ], + "title": "NotificationEventData", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_request": { + "description": "", + "properties": { + "id": { + "description": "ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "idempotency_key": { + "description": "The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "NotificationEventRequest", + "type": "object", + "x-expandableFields": [] + }, + "offline_acceptance": { + "description": "", + "properties": {}, + "title": "offline_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "online_acceptance": { + "description": "", + "properties": { + "ip_address": { + "description": "The IP address from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "user_agent": { + "description": "The user agent of the browser from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/outbound_payments_payment_method_details_financial_account" + }, + "type": { + "description": "The type of the payment method used in the OutboundPayment.", + "enum": [ + "financial_account", + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/outbound_payments_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "OutboundPaymentsPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "outbound_payments_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "Token of the FinancialAccount.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails used to send funds.", + "enum": [ + "stripe" + ], + "type": "string" + } + }, + "required": [ + "id", + "network" + ], + "title": "outbound_payments_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual" + ], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings" + ], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "The US bank account network used to send funds.", + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "network" + ], + "title": "outbound_payments_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_transfers_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the OutboundTransfer.", + "enum": [ + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "OutboundTransfersPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "us_bank_account" + ] + }, + "outbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual" + ], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings" + ], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "The US bank account network used to send funds.", + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "network" + ], + "title": "outbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "package_dimensions": { + "description": "", + "properties": { + "height": { + "description": "Height, in inches.", + "type": "number" + }, + "length": { + "description": "Length, in inches.", + "type": "number" + }, + "weight": { + "description": "Weight, in ounces.", + "type": "number" + }, + "width": { + "description": "Width, in inches.", + "type": "number" + } + }, + "required": [ + "height", + "length", + "weight", + "width" + ], + "title": "PackageDimensions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "tip": { + "$ref": "#/components/schemas/payment_flows_amount_details_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": [ + "tip" + ] + }, + "payment_flows_amount_details_resource_tip": { + "description": "", + "properties": { + "amount": { + "description": "Portion of the amount that corresponds to a tip.", + "type": "integer" + } + }, + "title": "PaymentFlowsAmountDetailsResourceTip", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_payment_intent": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculates compatible payment methods", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsAutomaticPaymentMethodsPaymentIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_installment_options": { + "description": "", + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsInstallmentOptions", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_flows_private_payment_methods_alipay": { + "description": "", + "properties": {}, + "title": "PaymentFlowsPrivatePaymentMethodsAlipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_alipay_details": { + "description": "", + "properties": { + "buyer_id": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Transaction ID of this particular Alipay transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_klarna_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "nullable": true, + "type": "integer" + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "nullable": true, + "type": "integer" + }, + "year": { + "description": "The four-digit year of birth.", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent": { + "description": "A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_capturable": { + "description": "Amount that can be captured from this PaymentIntent.", + "type": "integer" + }, + "amount_details": { + "$ref": "#/components/schemas/payment_flows_amount_details" + }, + "amount_received": { + "description": "Amount that was collected by this PaymentIntent.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that created the PaymentIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "nullable": true, + "type": "integer" + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" + } + ], + "description": "Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)", + "nullable": true + }, + "canceled_at": { + "description": "Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_reason": { + "description": "Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice" + ], + "nullable": true, + "type": "string" + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "confirmation_method": { + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice that created this PaymentIntent, if it exists.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "last_payment_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.", + "nullable": true + }, + "latest_charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "The latest charge created by this payment intent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).", + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used in this PaymentIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options" + } + ], + "description": "Payment-method-specific configuration for this PaymentIntent.", + "nullable": true + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "processing": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_processing" + } + ], + "description": "If present, this property tells you about the processing state of the payment.", + "nullable": true + }, + "receipt_email": { + "description": "Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + } + ], + "description": "ID of the review associated with this PaymentIntent, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "off_session", + "on_session" + ], + "nullable": true, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + } + ], + "description": "Shipping information for this PaymentIntent.", + "nullable": true + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/transfer_data" + } + ], + "description": "The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "nullable": true + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "capture_method", + "confirmation_method", + "created", + "currency", + "id", + "livemode", + "object", + "payment_method_types", + "status" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "invoice", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "processing", + "review", + "shipping", + "transfer_data" + ], + "x-resourceId": "payment_intent" + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/components/schemas/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": [ + "customer_notification" + ] + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_boleto" + }, + "card_await_notification": { + "$ref": "#/components/schemas/payment_intent_next_action_card_await_notification" + }, + "display_bank_transfer_instructions": { + "$ref": "#/components/schemas/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini" + }, + "oxxo_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_pix_display_qr_code" + }, + "promptpay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextAction", + "type": "object", + "x-expandableFields": [ + "alipay_handle_redirect", + "boleto_display_details", + "card_await_notification", + "display_bank_transfer_instructions", + "konbini_display_details", + "oxxo_display_details", + "paynow_display_qr_code", + "pix_display_qr_code", + "promptpay_display_qr_code", + "redirect_to_url", + "verify_with_microdeposits", + "wechat_pay_display_qr_code", + "wechat_pay_redirect_to_android_app", + "wechat_pay_redirect_to_ios_app" + ] + }, + "payment_intent_next_action_alipay_handle_redirect": { + "description": "", + "properties": { + "native_data": { + "description": "The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "native_url": { + "description": "The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_boleto": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp after which the boleto expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "number": { + "description": "The boleto number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "pdf": { + "description": "The URL to the downloadable boleto voucher PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_card_await_notification": { + "description": "", + "properties": { + "charge_attempt_at": { + "description": "The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "customer_approval_required": { + "description": "For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required.", + "nullable": true, + "type": "boolean" + } + }, + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_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).", + "nullable": true, + "type": "string" + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund the customer balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "hosted_instructions_url": { + "description": "A link to a hosted page that guides your customer through completing the transfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of bank transfer", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": [ + "financial_addresses" + ] + }, + "payment_intent_next_action_display_oxxo_details": { + "description": "", + "properties": { + "expires_after": { + "description": "The timestamp after which the OXXO voucher expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "number": { + "description": "OXXO reference number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp at which the pending Konbini payment expires.", + "format": "unix-time", + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "stores": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_stores" + } + }, + "required": [ + "expires_at", + "stores" + ], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": [ + "stores" + ] + }, + "payment_intent_next_action_konbini_familymart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_familymart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_lawson": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_lawson", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_ministop": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_ministop", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_seicomart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_seicomart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_familymart" + } + ], + "description": "FamilyMart instruction details.", + "nullable": true + }, + "lawson": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_lawson" + } + ], + "description": "Lawson instruction details.", + "nullable": true + }, + "ministop": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_ministop" + } + ], + "description": "Ministop instruction details.", + "nullable": true + }, + "seicomart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_seicomart" + } + ], + "description": "Seicomart instruction details.", + "nullable": true + } + }, + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": [ + "familymart", + "lawson", + "ministop", + "seicomart" + ] + }, + "payment_intent_next_action_paynow_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_pix_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "expires_at": { + "description": "The date (unix timestamp) when the PIX expires.", + "type": "integer" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted pix instructions page, which allows customers to view the pix QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render png QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render svg QR code", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentIntentNextActionPixDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_promptpay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The PNG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The SVG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPromptpayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": [ + "amounts", + "descriptor_code" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The data being used to generate QR code", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_data_url": { + "description": "The base64 image data for a pre-generated QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionWechatPayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_android_app": { + "description": "", + "properties": { + "app_id": { + "description": "app_id is the APP ID registered on WeChat open platform", + "maxLength": 5000, + "type": "string" + }, + "nonce_str": { + "description": "nonce_str is a random string", + "maxLength": 5000, + "type": "string" + }, + "package": { + "description": "package is static value", + "maxLength": 5000, + "type": "string" + }, + "partner_id": { + "description": "an unique merchant ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "prepay_id": { + "description": "an unique trading ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "sign": { + "description": "A signature", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "Specifies the current time in epoch format", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToAndroidApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_ios_app": { + "description": "", + "properties": { + "native_url": { + "description": "An universal link that redirect to WeChat Pay app", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "native_url" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToIOSApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "affirm": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_affirm" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alipay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_alipay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bacs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bancontact" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "boleto": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_boleto" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_card" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_customer_balance" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "eps": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "fpx": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_fpx" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "giropay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_giropay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_grabpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "ideal": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_ideal" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_interac_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "klarna": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_klarna" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_konbini" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_oxxo" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "p24": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_p24" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paynow": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_paynow" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pix": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_pix" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_promptpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sofort": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_sofort" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_wechat_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_intent_payment_method_options_au_becs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_blik": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_installments" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).", + "nullable": true + }, + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_mandate_options" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India.", + "nullable": true + }, + "network": { + "description": "Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only" + ], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments", + "mandate_options" + ] + }, + "payment_intent_payment_method_options_eps": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_link": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "nullable": true, + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_intent_card_processing" + }, + "type": { + "description": "Type of the payment method for which payment is in `processing` state, one of `card`.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentProcessing", + "type": "object", + "x-expandableFields": [ + "card" + ] + }, + "payment_intent_processing_customer_notification": { + "description": "", + "properties": { + "approval_requested": { + "description": "Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.", + "nullable": true, + "type": "boolean" + }, + "completes_at": { + "description": "If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual", + "manual_preferred" + ], + "type": "string" + }, + "installments": { + "$ref": "#/components/schemas/payment_flows_installment_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "payment_link": { + "description": "A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.\n\nWhen a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)", + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "$ref": "#/components/schemas/payment_links_resource_after_completion" + }, + "allow_promotion_codes": { + "description": "Whether user redeemable promotion codes are enabled.", + "type": "boolean" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.", + "nullable": true, + "type": "integer" + }, + "application_fee_percent": { + "description": "This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_links_resource_automatic_tax" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_consent_collection" + } + ], + "description": "When set, provides configuration to gather active consent from customers.", + "nullable": true + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_links_resource_custom_text" + }, + "customer_creation": { + "description": "Configuration for Customer creation during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_creation" + } + ], + "description": "Configuration for creating invoice for payment mode payment links.", + "nullable": true + }, + "line_items": { + "description": "The line items representing what is being sold.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_link" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_intent_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_payment_intent_data" + } + ], + "description": "Indicates the parameters to be passed to PaymentIntent creation during checkout.", + "nullable": true + }, + "payment_method_collection": { + "description": "Configuration for collecting a payment method during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" + } + ], + "description": "Configuration for collecting the customer's shipping address.", + "nullable": true + }, + "shipping_options": { + "description": "The shipping rate options applied to the session.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_shipping_option" + }, + "type": "array" + }, + "submit_type": { + "description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_subscription_data" + } + ], + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.", + "nullable": true + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_links_resource_tax_id_collection" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_transfer_data" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.", + "nullable": true + }, + "url": { + "description": "The public URL that can be shared with customers.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "active", + "after_completion", + "allow_promotion_codes", + "automatic_tax", + "billing_address_collection", + "currency", + "custom_fields", + "custom_text", + "customer_creation", + "id", + "livemode", + "metadata", + "object", + "payment_method_collection", + "phone_number_collection", + "shipping_options", + "submit_type", + "tax_id_collection", + "url" + ], + "title": "PaymentLink", + "type": "object", + "x-expandableFields": [ + "after_completion", + "automatic_tax", + "consent_collection", + "custom_fields", + "custom_text", + "invoice_creation", + "line_items", + "on_behalf_of", + "payment_intent_data", + "phone_number_collection", + "shipping_address_collection", + "shipping_options", + "subscription_data", + "tax_id_collection", + "transfer_data" + ], + "x-resourceId": "payment_link" + }, + "payment_links_resource_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" + }, + "redirect": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" + }, + "type": { + "description": "The specified behavior after the purchase is complete.", + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceAfterCompletion", + "type": "object", + "x-expandableFields": [ + "hosted_confirmation", + "redirect" + ] + }, + "payment_links_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, tax will be calculated automatically using the customer's location.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_confirmation_page": { + "description": "", + "properties": { + "custom_message": { + "description": "The custom message that is displayed to the customer after the purchase is complete.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentLinksResourceCompletionBehaviorConfirmationPage", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_redirect": { + "description": "", + "properties": { + "url": { + "description": "The URL the customer will be redirected to after the purchase is complete.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "PaymentLinksResourceCompletionBehaviorRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications.", + "enum": [ + "auto", + "none" + ], + "nullable": true, + "type": "string" + }, + "terms_of_service": { + "description": "If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.", + "enum": [ + "none", + "required" + ], + "nullable": true, + "type": "string" + } + }, + "title": "PaymentLinksResourceConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" + } + ], + "description": "Configuration for `type=dropdown` fields.", + "nullable": true + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_label" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentLinksResourceCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label" + ] + }, + "payment_links_resource_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown_option" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "PaymentLinksResourceCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_links_resource_custom_fields_dropdown_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentLinksResourceCustomFieldsDropdownOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection.", + "nullable": true + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button.", + "nullable": true + } + }, + "title": "PaymentLinksResourceCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_links_resource_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentLinksResourceCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Enable creating an invoice on successful payment.", + "type": "boolean" + }, + "invoice_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_settings" + } + ], + "description": "Configuration for the invoice. Default invoice values will be used if unspecified.", + "nullable": true + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_links_resource_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "custom_fields": { + "description": "A list of up to 4 custom fields to be displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + } + ], + "description": "Options for invoice PDF rendering.", + "nullable": true + } + }, + "title": "PaymentLinksResourceInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_links_resource_payment_intent_data": { + "description": "", + "properties": { + "capture_method": { + "description": "Indicates when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with the payment method collected during checkout.", + "enum": [ + "off_session", + "on_session" + ], + "nullable": true, + "type": "string" + } + }, + "title": "PaymentLinksResourcePaymentIntentData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a phone number will be collected during checkout.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourcePhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentLinksResourceShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the Shipping Rate to use for this shipping option.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentLinksResourceShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_links_resource_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "nullable": true, + "type": "integer" + } + }, + "title": "PaymentLinksResourceSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceTaxIdCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "nullable": true, + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The connected account receiving the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "PaymentLinksResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_card_present" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_grabpay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_link" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_method" + ], + "type": "string" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_promptpay" + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_sofort" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_wechat_pay" + } + }, + "required": [ + "billing_details", + "created", + "id", + "livemode", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "radar_options", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "x-resourceId": "payment_method" + }, + "payment_method_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "institution_number": { + "description": "Institution number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_afterpay_clearpay": { + "description": "", + "properties": {}, + "title": "payment_method_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Six-digit number identifying bank and branch associated with this bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_blik": { + "description": "", + "properties": {}, + "title": "payment_method_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "Uniquely identifies the customer tax id (CNPJ or CPF)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_checks" + } + ], + "description": "Checks on Card address and CVC if provided.", + "nullable": true + }, + "country": { + "description": "Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_generated_card" + } + ], + "description": "Details of the original PaymentMethod that created this object.", + "nullable": true + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/networks" + } + ], + "description": "Contains information about card networks that can be used to process the payment.", + "nullable": true + }, + "three_d_secure_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_usage" + } + ], + "description": "Contains details on how this Card may be used for 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_wallet" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet.", + "nullable": true + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "last4" + ], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ] + }, + "payment_method_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_generated_card": { + "description": "", + "properties": { + "charge": { + "description": "The charge that created this object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/card_generated_from_payment_method_details" + } + ], + "description": "Transaction-specific details of the payment method used in the payment.", + "nullable": true + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": [ + "payment_method_details", + "setup_attempt" + ] + }, + "payment_method_card_present": { + "description": "", + "properties": {}, + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + }, + "email": { + "description": "Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + } + }, + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + }, + "email": { + "description": "Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + } + }, + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/payment_method_details_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/payment_method_details_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_details_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_details_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_details_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_details_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_details_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_details_grabpay" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_details_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_details_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_details_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_details_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_details_link" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_details_multibanco" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_details_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_details_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_details_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_details_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_details_promptpay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_details_sofort" + }, + "stripe_account": { + "$ref": "#/components/schemas/payment_method_details_stripe_account" + }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_details_us_bank_account" + }, + "wechat": { + "$ref": "#/components/schemas/payment_method_details_wechat" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_details_wechat_pay" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "multibanco", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "stripe_account", + "us_bank_account", + "wechat", + "wechat_pay" + ] + }, + "payment_method_details_ach_credit_transfer": { + "description": "", + "properties": { + "account_number": { + "description": "Account number to transfer funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the routing number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "Routing transit number for the bank account to transfer funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "swift_code": { + "description": "SWIFT code of the bank associated with the routing number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_debit": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "Routing transit number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "institution_number": { + "description": "Institution number of the bank account", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_afterpay_clearpay": { + "description": "", + "properties": { + "reference": { + "description": "Order identifier shown to the merchant in Afterpay’s online portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Bancontact directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_checks" + } + ], + "description": "Check results by Card networks on Card address and CVC at time of payment.", + "nullable": true + }, + "country": { + "description": "Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "type": "integer" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "type": "integer" + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change 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" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).", + "nullable": true + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment or created by it.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + } + ], + "description": "Populated if this transaction used 3D Secure authentication.", + "nullable": true + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_wallet" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet.", + "nullable": true + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "installments", + "three_d_secure", + "wallet" + ] + }, + "payment_method_details_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + ], + "description": "Installment plan selected for the payment.", + "nullable": true + } + }, + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_method_details_card_installments_plan": { + "description": "", + "properties": { + "count": { + "description": "For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.", + "nullable": true, + "type": "integer" + }, + "interval": { + "description": "For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.\nOne of `month`.", + "enum": [ + "month" + ], + "nullable": true, + "type": "string" + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`.", + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "nullable": true, + "type": "integer" + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "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" + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "incremental_authorization_supported": { + "description": "Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).", + "type": "boolean" + }, + "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`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "overcapture_supported": { + "description": "Defines whether the authorized amount can be over-captured or not", + "type": "boolean" + }, + "read_method": { + "description": "How card details were read in this transaction.", + "enum": [ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2" + ], + "nullable": true, + "type": "string" + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_receipt" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions.", + "nullable": true + } + }, + "required": [ + "exp_month", + "exp_year", + "incremental_authorization_supported", + "overcapture_supported" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_card_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "credit", + "prepaid", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_details_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + }, + "email": { + "description": "Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + } + }, + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_details_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + }, + "email": { + "description": "Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + } + }, + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_details_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_details_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_eps": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.", + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by EPS directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nEPS rarely provides this information so the attribute is usually empty.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction id generated by FPX for every request from the merchant", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "bank" + ], + "title": "payment_method_details_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_giropay": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Giropay directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nGiropay rarely provides this information so the attribute is usually empty.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "nullable": true, + "type": "string" + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by iDEAL directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_name": { + "description": "The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change 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" + }, + "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`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "read_method": { + "description": "How card details were read in this transaction.", + "enum": [ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2" + ], + "nullable": true, + "type": "string" + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions.", + "nullable": true + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_interac_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "savings", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "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`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_konbini_store" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed.", + "nullable": true + } + }, + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": [ + "store" + ] + }, + "payment_method_details_konbini_store": { + "description": "", + "properties": { + "chain": { + "description": "The name of the convenience store chain where the payment was completed.", + "enum": [ + "familymart", + "lawson", + "ministop", + "seicomart" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_link": { + "description": "", + "properties": {}, + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_multibanco": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `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", + "volkswagen_bank" + ], + "nullable": true, + "type": "string" + }, + "reference": { + "description": "Unique reference for this Przelewy24 payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Przelewy24 directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.\nPrzelewy24 rarely provides this information so the attribute is usually empty.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the SOFORT authorization page that the customer is redirected to.\nCan be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`", + "enum": [ + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by SOFORT directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_stripe_account": { + "description": "", + "properties": {}, + "title": "payment_method_details_stripe_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual" + ], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings" + ], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_wechat": { + "description": "", + "properties": {}, + "title": "payment_method_details_wechat", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_wechat_pay": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_details_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_eps": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.", + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + } + }, + "required": [ + "bank" + ], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_giropay": { + "description": "", + "properties": {}, + "title": "payment_method_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_grabpay": { + "description": "", + "properties": {}, + "title": "payment_method_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "nullable": true, + "type": "string" + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank, if the bank was provided.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" + } + ], + "description": "The customer's date of birth, if provided.", + "nullable": true + } + }, + "title": "payment_method_klarna", + "type": "object", + "x-expandableFields": [ + "dob" + ] + }, + "payment_method_konbini": { + "description": "", + "properties": {}, + "title": "payment_method_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_affirm": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_afterpay_clearpay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "reference": { + "description": "Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about\nthe payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alipay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_alipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bacs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_boleto": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + "nullable": true, + "type": "array" + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + ], + "description": "Installment plan selected for this PaymentIntent.", + "nullable": true + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": [ + "available_plans", + "plan" + ] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "interval": { + "description": "Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.", + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.", + "nullable": true, + "type": "integer" + }, + "reference": { + "description": "Unique identifier for the mandate or subscription.", + "maxLength": 80, + "type": "string" + }, + "start_date": { + "description": "Start date of the mandate or subscription. Start date should not be lesser than yesterday.", + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "description": "Specifies the type of mandates supported. Possible values are `india`.", + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)", + "nullable": true, + "type": "boolean" + }, + "request_incremental_authorization_support": { + "description": "Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.", + "nullable": true, + "type": "boolean" + } + }, + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer" + ], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "payment_method_options_customer_balance_eu_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_fpx": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_giropay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_grabpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_ideal": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_options_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_klarna": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the Klarna checkout page that the customer is redirected to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_konbini": { + "description": "", + "properties": { + "confirmation_number": { + "description": "An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expires_after_days": { + "description": "The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "product_description": { + "description": "A product descriptor of up to 22 characters, which will appear to customers at the convenience store.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_oxxo": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_p24": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_p24", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire.", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which the Pix expires.", + "nullable": true, + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_promptpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_sofort": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the SOFORT authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "nullable": true, + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_wechat_pay": { + "description": "", + "properties": { + "app_id": { + "description": "The app ID registered with WeChat Pay. Only required when client is ios or android.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "client": { + "description": "The client type that the end customer will pay from", + "enum": [ + "android", + "ios", + "web" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_oxxo": { + "description": "", + "properties": {}, + "title": "payment_method_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided.", + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paynow": { + "description": "", + "properties": {}, + "title": "payment_method_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pix": { + "description": "", + "properties": {}, + "title": "payment_method_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_promptpay": { + "description": "", + "properties": {}, + "title": "payment_method_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/sepa_debit_generated_from" + } + ], + "description": "Information about the object that generated this PaymentMethod.", + "nullable": true + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": [ + "generated_from" + ] + }, + "payment_method_sofort": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual" + ], + "nullable": true, + "type": "string" + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings" + ], + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "financial_connections_account": { + "description": "The ID of the Financial Connections Account used to create the payment method.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/us_bank_account_networks" + } + ], + "description": "Contains information about US bank account networks that can be used.", + "nullable": true + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": [ + "networks" + ] + }, + "payment_method_wechat_pay": { + "description": "", + "properties": {}, + "title": "payment_method_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_after_expiration": { + "description": "", + "properties": { + "recovery": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" + } + ], + "description": "When set, configuration used to recover the Checkout Session on expiry.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionAfterExpiration", + "type": "object", + "x-expandableFields": [ + "recovery" + ] + }, + "payment_pages_checkout_session_after_expiration_recovery": { + "description": "", + "properties": { + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`", + "type": "boolean" + }, + "enabled": { + "description": "If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.", + "type": "boolean" + }, + "expires_at": { + "description": "The timestamp at which the recovery URL will expire.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "url": { + "description": "URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "allow_promotion_codes", + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAfterExpirationRecovery", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether automatic tax is enabled for the session", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this session.", + "enum": [ + "complete", + "failed", + "requires_location_inputs" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent": { + "description": "", + "properties": { + "promotions": { + "description": "If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.", + "enum": [ + "opt_in", + "opt_out" + ], + "nullable": true, + "type": "string" + }, + "terms_of_service": { + "description": "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.", + "enum": [ + "accepted" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentPagesCheckoutSessionConsent", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants.", + "enum": [ + "auto", + "none" + ], + "nullable": true, + "type": "string" + }, + "terms_of_service": { + "description": "If set to `required`, it requires customers to accept the terms of service before being able to pay.", + "enum": [ + "none", + "required" + ], + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" + } + ], + "description": "Configuration for `type=dropdown` fields.", + "nullable": true + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_label" + }, + "numeric": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" + } + ], + "description": "Configuration for `type=numeric` fields.", + "nullable": true + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" + } + ], + "description": "Configuration for `type=text` fields.", + "nullable": true + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label", + "numeric", + "text" + ] + }, + "payment_pages_checkout_session_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_option" + }, + "type": "array" + }, + "value": { + "description": "The option selected by the customer. This will be the `value` for the option.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "options" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_pages_checkout_session_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_numeric": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer, containing only digits.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_text": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection.", + "nullable": true + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_pages_checkout_session_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentPagesCheckoutSessionCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "nullable": true + }, + "email": { + "description": "The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "The customer's phone number after a completed Checkout Session.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_exempt": { + "description": "The customer’s tax exempt status after a completed Checkout Session.", + "enum": [ + "exempt", + "none", + "reverse" + ], + "nullable": true, + "type": "string" + }, + "tax_ids": { + "description": "The customer’s tax IDs after a completed Checkout Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" + }, + "nullable": true, + "type": "array" + } + }, + "title": "PaymentPagesCheckoutSessionCustomerDetails", + "type": "object", + "x-expandableFields": [ + "address", + "tax_ids" + ] + }, + "payment_pages_checkout_session_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether invoice creation is enabled for the Checkout Session.", + "type": "boolean" + }, + "invoice_data": { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_settings" + } + }, + "required": [ + "enabled", + "invoice_data" + ], + "title": "PaymentPagesCheckoutSessionInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_pages_checkout_session_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "nullable": true, + "type": "array" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + } + ], + "description": "Options for invoice PDF rendering.", + "nullable": true + } + }, + "title": "PaymentPagesCheckoutSessionInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_pages_checkout_session_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether phone number collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionPhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentPagesCheckoutSessionShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after discounts and taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the ShippingRate for this order.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "PaymentPagesCheckoutSessionShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "payment_pages_checkout_session_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The shipping rate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentPagesCheckoutSessionShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_pages_checkout_session_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionTaxID", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionTaxIDCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "nullable": true, + "type": "integer" + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "PaymentPagesCheckoutSessionTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "payment_pages_checkout_session_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "payment_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-resourceId": "payment_source", + "x-stripeBypassValidation": true + }, + "payout": { + "description": "A `Payout` object is created when you receive funds from Stripe, or when you\ninitiate a payout to either a bank account or debit card of a [connected\nStripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,\nas well as list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving Payouts](https://stripe.com/docs/payouts).", + "properties": { + "amount": { + "description": "Amount (in %s) to be transferred to your bank account or debit card.", + "type": "integer" + }, + "arrival_date": { + "description": "Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.", + "format": "unix-time", + "type": "integer" + }, + "automatic": { + "description": "Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts).", + "type": "boolean" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the impact of this payout on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "description": "ID of the bank account or card the payout was sent to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ] + }, + "x-stripeBypassValidation": true + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Message to user further explaining reason for payout failure if available.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payout" + ], + "type": "string" + }, + "original_payout": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + } + ], + "description": "If the payout reverses another, this is the ID of the original payout.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "reversed_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + } + ], + "description": "If the payout was reversed, this is the ID of the payout that reverses this payout.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "source_type": { + "description": "The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a payout to be displayed 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 is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Can be `bank_account` or `card`.", + "enum": [ + "bank_account", + "card" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "arrival_date", + "automatic", + "created", + "currency", + "id", + "livemode", + "method", + "object", + "source_type", + "status", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by" + ], + "x-resourceId": "payout" + }, + "period": { + "description": "", + "properties": { + "end": { + "description": "The end date of this usage period. All usage up to and including this point in time is included.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "start": { + "description": "The start date of this usage period. All usage after this point in time is included.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "Period", + "type": "object", + "x-expandableFields": [] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.\nSee the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.\n\nRelated guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).", + "properties": { + "account": { + "description": "The account the person is associated with.", + "maxLength": 5000, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "nullable": true + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + } + ], + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "dob": { + "$ref": "#/components/schemas/legal_entity_dob" + }, + "email": { + "description": "The person's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_future_requirements" + } + ], + "nullable": true + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "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.", + "type": "boolean" + }, + "id_number_secondary_provided": { + "description": "Whether the person's `id_number_secondary` was provided.", + "type": "boolean" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nationality": { + "description": "The country where the person is a national.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "person" + ], + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "$ref": "#/components/schemas/address" + }, + "relationship": { + "$ref": "#/components/schemas/person_relationship" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_requirements" + } + ], + "nullable": true + }, + "ssn_last_4_provided": { + "description": "Whether the last four digits of the person's Social Security number have been provided (U.S. only).", + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/legal_entity_person_verification" + } + }, + "required": [ + "account", + "created", + "id", + "object" + ], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "verification" + ], + "x-resourceId": "person" + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "person_relationship": { + "description": "", + "properties": { + "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" + }, + "owner": { + "description": "Whether the person is an owner of the account’s legal entity.", + "nullable": true, + "type": "boolean" + }, + "percent_ownership": { + "description": "The percent owned by the person of the account's legal entity.", + "nullable": true, + "type": "number" + }, + "representative": { + "description": "Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.", + "nullable": true, + "type": "boolean" + }, + "title": { + "description": "The person's title (e.g., CEO, Support Engineer).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "nullable": true, + "type": "array" + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "plan": { + "description": "You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.\n\nPlans define the base price, currency, and billing cycle for recurring purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has plans for $10/month, $100/year, €9/month, and €90/year.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the plan can be used for new purchases.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "nullable": true, + "type": "string" + }, + "amount": { + "description": "The unit amount in %s 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 %s 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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "plan" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The product whose pricing this plan determines.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/plan_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.", + "enum": [ + "graduated", + "volume" + ], + "nullable": true, + "type": "string" + }, + "transform_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_usage" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.", + "nullable": true + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "nullable": true, + "type": "integer" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "interval", + "interval_count", + "livemode", + "object", + "usage_type" + ], + "title": "Plan", + "type": "object", + "x-expandableFields": [ + "product", + "tiers", + "transform_usage" + ], + "x-resourceId": "plan" + }, + "plan_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "nullable": true, + "type": "integer" + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "nullable": true, + "type": "integer" + } + }, + "title": "PlanTier", + "type": "object", + "x-expandableFields": [] + }, + "platform_tax_fee": { + "description": "", + "properties": { + "account": { + "description": "The Connected account that incurred this charge.", + "maxLength": 5000, + "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": [ + "platform_tax_fee" + ], + "type": "string" + }, + "source_transaction": { + "description": "The payment object that caused this tax to be inflicted.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of tax (VAT).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account", + "id", + "object", + "source_transaction", + "type" + ], + "title": "PlatformTax", + "type": "object", + "x-expandableFields": [] + }, + "portal_business_profile": { + "description": "", + "properties": { + "headline": { + "description": "The messaging shown to customers in the portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "privacy_policy_url": { + "description": "A link to the business’s publicly available privacy policy.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "terms_of_service_url": { + "description": "A link to the business’s publicly available terms of service.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PortalBusinessProfile", + "type": "object", + "x-expandableFields": [] + }, + "portal_customer_update": { + "description": "", + "properties": { + "allowed_updates": { + "description": "The types of customer updates that are supported. When empty, customers are not updateable.", + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "allowed_updates", + "enabled" + ], + "title": "PortalCustomerUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_features": { + "description": "", + "properties": { + "customer_update": { + "$ref": "#/components/schemas/portal_customer_update" + }, + "invoice_history": { + "$ref": "#/components/schemas/portal_invoice_list" + }, + "payment_method_update": { + "$ref": "#/components/schemas/portal_payment_method_update" + }, + "subscription_cancel": { + "$ref": "#/components/schemas/portal_subscription_cancel" + }, + "subscription_pause": { + "$ref": "#/components/schemas/portal_subscription_pause" + }, + "subscription_update": { + "$ref": "#/components/schemas/portal_subscription_update" + } + }, + "required": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_pause", + "subscription_update" + ], + "title": "PortalFeatures", + "type": "object", + "x-expandableFields": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_pause", + "subscription_update" + ] + }, + "portal_flows_after_completion_hosted_confirmation": { + "description": "", + "properties": { + "custom_message": { + "description": "A custom message to display to the customer after the flow is completed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "PortalFlowsAfterCompletionHostedConfirmation", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_after_completion_redirect": { + "description": "", + "properties": { + "return_url": { + "description": "The URL the customer will be redirected to after the flow is completed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "return_url" + ], + "title": "PortalFlowsAfterCompletionRedirect", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_flow": { + "description": "", + "properties": { + "after_completion": { + "$ref": "#/components/schemas/portal_flows_flow_after_completion" + }, + "subscription_cancel": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow_subscription_cancel" + } + ], + "description": "Configuration when `flow.type=subscription_cancel`.", + "nullable": true + }, + "type": { + "description": "Type of flow that the customer will go through.", + "enum": [ + "payment_method_update", + "subscription_cancel" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "after_completion", + "type" + ], + "title": "PortalFlowsFlow", + "type": "object", + "x-expandableFields": [ + "after_completion", + "subscription_cancel" + ] + }, + "portal_flows_flow_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_after_completion_hosted_confirmation" + } + ], + "description": "Configuration when `after_completion.type=hosted_confirmation`.", + "nullable": true + }, + "redirect": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_after_completion_redirect" + } + ], + "description": "Configuration when `after_completion.type=redirect`.", + "nullable": true + }, + "type": { + "description": "The specified type of behavior after the flow is completed.", + "enum": [ + "hosted_confirmation", + "portal_homepage", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PortalFlowsFlowAfterCompletion", + "type": "object", + "x-expandableFields": [ + "hosted_confirmation", + "redirect" + ] + }, + "portal_flows_flow_subscription_cancel": { + "description": "", + "properties": { + "subscription": { + "description": "The ID of the subscription to be canceled.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "subscription" + ], + "title": "PortalFlowsFlowSubscriptionCancel", + "type": "object", + "x-expandableFields": [] + }, + "portal_invoice_list": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PortalInvoiceList", + "type": "object", + "x-expandableFields": [] + }, + "portal_login_page": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.\n\nIf `false`, the previously generated `url`, if any, will be deactivated.", + "type": "boolean" + }, + "url": { + "description": "A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "enabled" + ], + "title": "PortalLoginPage", + "type": "object", + "x-expandableFields": [] + }, + "portal_payment_method_update": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PortalPaymentMethodUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_cancel": { + "description": "", + "properties": { + "cancellation_reason": { + "$ref": "#/components/schemas/portal_subscription_cancellation_reason" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "mode": { + "description": "Whether to cancel subscriptions immediately or at the end of the billing period.", + "enum": [ + "at_period_end", + "immediately" + ], + "type": "string" + }, + "proration_behavior": { + "description": "Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "cancellation_reason", + "enabled", + "mode", + "proration_behavior" + ], + "title": "PortalSubscriptionCancel", + "type": "object", + "x-expandableFields": [ + "cancellation_reason" + ] + }, + "portal_subscription_cancellation_reason": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "options": { + "description": "Which cancellation reasons will be given as options to the customer.", + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "enabled", + "options" + ], + "title": "PortalSubscriptionCancellationReason", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_pause": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PortalSubscriptionPause", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_update": { + "description": "", + "properties": { + "default_allowed_updates": { + "description": "The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.", + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "products": { + "description": "The list of products that support subscription updates.", + "items": { + "$ref": "#/components/schemas/portal_subscription_update_product" + }, + "nullable": true, + "type": "array" + }, + "proration_behavior": { + "description": "Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "default_allowed_updates", + "enabled", + "proration_behavior" + ], + "title": "PortalSubscriptionUpdate", + "type": "object", + "x-expandableFields": [ + "products" + ] + }, + "portal_subscription_update_product": { + "description": "", + "properties": { + "prices": { + "description": "The list of price IDs which, when subscribed to, a subscription can be updated.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "description": "The product ID.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "prices", + "product" + ], + "title": "PortalSubscriptionUpdateProduct", + "type": "object", + "x-expandableFields": [] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the price can be used for new purchases.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/currency_option" + }, + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "price" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/recurring" + } + ], + "description": "The recurring components of a price such as `interval` and `usage_type`.", + "nullable": true + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "nullable": true, + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.", + "enum": [ + "graduated", + "volume" + ], + "nullable": true, + "type": "string" + }, + "transform_quantity": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_quantity" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.", + "nullable": true + }, + "type": { + "description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.", + "enum": [ + "one_time", + "recurring" + ], + "type": "string" + }, + "unit_amount": { + "description": "The unit amount in %s 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 %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "product", + "type" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price" + }, + "price_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "nullable": true, + "type": "integer" + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "nullable": true, + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "nullable": true, + "type": "integer" + } + }, + "title": "PriceTier", + "type": "object", + "x-expandableFields": [] + }, + "product": { + "description": "Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)", + "properties": { + "active": { + "description": "Whether the product is currently available for purchase.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + } + ], + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + } + ] + } + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "product" + ], + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "$ref": "#/components/schemas/package_dimensions" + } + ], + "description": "The dimensions of this product for shipping purposes.", + "nullable": true + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "nullable": true, + "type": "boolean" + }, + "statement_descriptor": { + "description": "Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "url": { + "description": "A URL of a publicly-accessible webpage for this product.", + "maxLength": 2048, + "nullable": true, + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "images", + "livemode", + "metadata", + "name", + "object", + "updated" + ], + "title": "Product", + "type": "object", + "x-expandableFields": [ + "default_price", + "package_dimensions", + "tax_code" + ], + "x-resourceId": "product" + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.", + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.", + "maxLength": 5000, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The customer that this promotion code can be used by.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "expires_at": { + "description": "Date at which the promotion code can no longer be redeemed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this promotion code can be redeemed.", + "nullable": true, + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "promotion_code" + ], + "type": "string" + }, + "restrictions": { + "$ref": "#/components/schemas/promotion_codes_resource_restrictions" + }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "coupon", + "created", + "id", + "livemode", + "object", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "restrictions" + ], + "x-resourceId": "promotion_code" + }, + "promotion_code_currency_option": { + "description": "", + "properties": { + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": "integer" + } + }, + "required": [ + "minimum_amount" + ], + "title": "PromotionCodeCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/promotion_code_currency_option" + }, + "description": "Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "first_time_transaction": { + "description": "A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices", + "type": "boolean" + }, + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "nullable": true, + "type": "integer" + }, + "minimum_amount_currency": { + "description": "Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "first_time_transaction" + ], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "quote": { + "description": "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule.", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.", + "nullable": true, + "type": "integer" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/quotes_resource_automatic_tax" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "computed": { + "$ref": "#/components/schemas/quotes_resource_computed" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_tax_rates": { + "description": "The tax rates applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "type": "array" + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "expires_at": { + "description": "The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "from_quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_from_quote" + } + ], + "description": "Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.", + "nullable": true + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ], + "description": "The invoice that was created from this quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ] + } + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_quote_setting" + } + ], + "description": "All invoices will be billed using the specified settings.", + "nullable": true + }, + "line_items": { + "description": "A list of items the customer is being quoted for.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "quote" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "status": { + "description": "The status of the quote.", + "enum": [ + "accepted", + "canceled", + "draft", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/quotes_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "The subscription that was created or updated from this quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_data": { + "$ref": "#/components/schemas/quotes_resource_subscription_data_subscription_data" + }, + "subscription_schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + } + ], + "description": "The subscription schedule that was created or updated from this quote.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this quote belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_transfer_data" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.", + "nullable": true + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "automatic_tax", + "collection_method", + "computed", + "created", + "discounts", + "expires_at", + "id", + "livemode", + "metadata", + "object", + "status", + "status_transitions", + "subscription_data", + "total_details" + ], + "title": "Quote", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "computed", + "customer", + "default_tax_rates", + "discounts", + "from_quote", + "invoice", + "invoice_settings", + "line_items", + "on_behalf_of", + "status_transitions", + "subscription", + "subscription_data", + "subscription_schedule", + "test_clock", + "total_details", + "transfer_data" + ], + "x-resourceId": "quote" + }, + "quotes_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculate taxes", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this quote.", + "enum": [ + "complete", + "failed", + "requires_location_inputs" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "enabled" + ], + "title": "QuotesResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_computed": { + "description": "", + "properties": { + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_recurring" + } + ], + "description": "The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.", + "nullable": true + }, + "upfront": { + "$ref": "#/components/schemas/quotes_resource_upfront" + } + }, + "required": [ + "upfront" + ], + "title": "QuotesResourceComputed", + "type": "object", + "x-expandableFields": [ + "recurring", + "upfront" + ] + }, + "quotes_resource_from_quote": { + "description": "", + "properties": { + "is_revision": { + "description": "Whether this quote is a revision of a different quote.", + "type": "boolean" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + } + }, + "required": [ + "is_revision", + "quote" + ], + "title": "QuotesResourceFromQuote", + "type": "object", + "x-expandableFields": [ + "quote" + ] + }, + "quotes_resource_recurring": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "interval", + "interval_count", + "total_details" + ], + "title": "QuotesResourceRecurring", + "type": "object", + "x-expandableFields": [ + "total_details" + ] + }, + "quotes_resource_status_transitions": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the quote was accepted. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "canceled_at": { + "description": "The time that the quote was canceled. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "finalized_at": { + "description": "The time that the quote was finalized. Measured in seconds since Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "QuotesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_subscription_data_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "effective_date": { + "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "nullable": true, + "type": "integer" + } + }, + "title": "QuotesResourceSubscriptionDataSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "nullable": true, + "type": "integer" + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "QuotesResourceTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "quotes_resource_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "QuotesResourceTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "quotes_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "nullable": true, + "type": "integer" + }, + "amount_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.", + "nullable": true, + "type": "number" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "QuotesResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "quotes_resource_upfront": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "line_items": { + "description": "The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "total_details" + ], + "title": "QuotesResourceUpfront", + "type": "object", + "x-expandableFields": [ + "line_items", + "total_details" + ] + }, + "radar.early_fraud_warning": { + "description": "An early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.\n\nRelated guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).", + "properties": { + "actionable": { + "description": "An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.", + "type": "boolean" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "fraud_type": { + "description": "The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.early_fraud_warning" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the Payment Intent this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "actionable", + "charge", + "created", + "fraud_type", + "id", + "livemode", + "object" + ], + "title": "RadarEarlyFraudWarning", + "type": "object", + "x-expandableFields": [ + "charge", + "payment_intent" + ], + "x-resourceId": "radar.early_fraud_warning" + }, + "radar.value_list": { + "description": "Value lists allow you to group values together which can then be referenced in rules.\n\nRelated guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).", + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who created this value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "item_type": { + "description": "The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "string" + ], + "type": "string" + }, + "list_items": { + "description": "List of items contained within this value list.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The name of the value list.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list" + ], + "type": "string" + } + }, + "required": [ + "alias", + "created", + "created_by", + "id", + "item_type", + "list_items", + "livemode", + "metadata", + "name", + "object" + ], + "title": "RadarListList", + "type": "object", + "x-expandableFields": [ + "list_items" + ], + "x-resourceId": "radar.value_list" + }, + "radar.value_list_item": { + "description": "Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.\n\nRelated guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who added this item to the value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list_item" + ], + "type": "string" + }, + "value": { + "description": "The value of the item.", + "maxLength": 5000, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list this item belongs to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "created_by", + "id", + "livemode", + "object", + "value", + "value_list" + ], + "title": "RadarListListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "radar.value_list_item" + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "RadarRadarOptions", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "latitude": { + "description": "The geographic latitude where the payment originated.", + "nullable": true, + "type": "number" + }, + "longitude": { + "description": "The geographic longitude where the payment originated.", + "nullable": true, + "type": "number" + }, + "region": { + "description": "The state/county/province/region where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_session": { + "description": "", + "properties": { + "browser": { + "description": "The browser used in this browser session (e.g., `Chrome`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "device": { + "description": "Information about the device used for the browser session (e.g., `Samsung SM-G930T`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "platform": { + "description": "The platform for the browser session (e.g., `Macintosh`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "version": { + "description": "The version for the browser session (e.g., `61.0.3163.100`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [] + }, + "received_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "The FinancialAccount ID.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.", + "enum": [ + "stripe" + ], + "type": "string" + } + }, + "required": [ + "id", + "network" + ], + "title": "received_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "recurring": { + "description": "", + "properties": { + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "nullable": true, + "type": "string" + }, + "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" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ], + "title": "Recurring", + "type": "object", + "x-expandableFields": [] + }, + "refund": { + "description": "`Refund` objects allow you to refund a charge that has previously been created\nbut not yet refunded. Funds will be refunded to the credit or debit card that\nwas originally charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that was refunded.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)", + "maxLength": 5000, + "type": "string" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_reason": { + "description": "If the refund failed, the reason for refund failure if known. 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": "Email to which refund instructions, if required, are sent to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "next_action": { + "$ref": "#/components/schemas/refund_next_action" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "refund" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the PaymentIntent that was refunded.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).", + "enum": [ + "duplicate", + "expired_uncaptured_charge", + "fraudulent", + "requested_by_customer" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "source_transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ], + "description": "The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + }, + "status": { + "description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ], + "description": "If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object" + ], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "failure_balance_transaction", + "next_action", + "payment_intent", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund" + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/refund_next_action_display_details" + } + ], + "description": "Contains the refund details.", + "nullable": true + }, + "type": { + "description": "Type of the next action to perform.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RefundNextAction", + "type": "object", + "x-expandableFields": [ + "display_details" + ] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { + "$ref": "#/components/schemas/email_sent" + }, + "expires_at": { + "description": "The expiry timestamp.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "email_sent", + "expires_at" + ], + "title": "RefundNextActionDisplayDetails", + "type": "object", + "x-expandableFields": [ + "email_sent" + ] + }, + "reporting.report_run": { + "description": "The Report Run object represents an instance of a report type generated with\nspecific run parameters. Once the object is created, Stripe begins processing the report.\nWhen the report has finished running, it will give you a reference to a file\nwhere you can retrieve your results. For an overview, see\n[API Access to Reports](https://stripe.com/docs/reporting/statements/api).\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "description": "If something should go wrong during the run, a message about the failure (populated when\n `status=failed`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "`true` if the report is run on live mode data and `false` if it is run on test mode data.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reporting.report_run" + ], + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/financial_reporting_finance_report_run_run_parameters" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `\"balance.summary.1\"`.", + "maxLength": 5000, + "type": "string" + }, + "result": { + "anyOf": [ + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object representing the result of the report run (populated when\n `status=succeeded`).", + "nullable": true + }, + "status": { + "description": "Status of this report run. This will be `pending` when the run is initially created.\n When the run finishes, this will be set to `succeeded` and the `result` field will be populated.\n Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.", + "maxLength": 5000, + "type": "string" + }, + "succeeded_at": { + "description": "Timestamp at which this run successfully finished (populated when\n `status=succeeded`). Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "parameters", + "report_type", + "status" + ], + "title": "reporting_report_run", + "type": "object", + "x-expandableFields": [ + "parameters", + "result" + ], + "x-resourceId": "reporting.report_run" + }, + "reporting.report_type": { + "description": "The Report Type resource corresponds to a particular type of report, such as\nthe \"Activity summary\" or \"Itemized payouts\" reports. These objects are\nidentified by an ID belonging to a set of enumerated values. See\n[API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)\nfor those Report Type IDs, along with required and optional parameters.\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "data_available_end": { + "description": "Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_available_start": { + "description": "Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_columns": { + "description": "List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)", + "items": { + "maxLength": 5000, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "Human-readable name of the Report Type", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reporting.report_type" + ], + "type": "string" + }, + "updated": { + "description": "When this Report Type was latest updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "version": { + "description": "Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.", + "type": "integer" + } + }, + "required": [ + "data_available_end", + "data_available_start", + "id", + "livemode", + "name", + "object", + "updated", + "version" + ], + "title": "reporting_report_type", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "reporting.report_type" + }, + "reserve_transaction": { + "description": "", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reserve_transaction" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "id", + "object" + ], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [] + }, + "review": { + "description": "Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).", + "properties": { + "billing_zip": { + "description": "The ZIP or postal code of the card used, if applicable.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "The charge associated with this review.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "closed_reason": { + "description": "The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "enum": [ + "approved", + "disputed", + "redacted", + "refunded", + "refunded_as_fraud" + ], + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The IP address where the payment originated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "ip_address_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_location" + } + ], + "description": "Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "review" + ], + "type": "string" + }, + "open": { + "description": "If `true`, the review needs action.", + "type": "boolean" + }, + "opened_reason": { + "description": "The reason the review was opened. One of `rule` or `manual`.", + "enum": [ + "manual", + "rule" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_session" + } + ], + "description": "Information related to the browsing session of the user who initiated the payment.", + "nullable": true + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "open", + "opened_reason", + "reason" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": [ + "charge", + "ip_address_location", + "payment_intent", + "session" + ], + "x-resourceId": "review" + }, + "rule": { + "description": "", + "properties": { + "action": { + "description": "The action taken on the payment.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "predicate": { + "description": "The predicate to evaluate the payment against.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "action", + "id", + "predicate" + ], + "title": "RadarRule", + "type": "object", + "x-expandableFields": [] + }, + "scheduled_query_run": { + "description": "If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_load_time": { + "description": "When the query was run, Sigma contained a snapshot of your Stripe data at this time.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "$ref": "#/components/schemas/sigma_scheduled_query_run_error" + }, + "file": { + "anyOf": [ + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object representing the results of the query.", + "nullable": true + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "scheduled_query_run" + ], + "type": "string" + }, + "result_available_until": { + "description": "Time at which the result expires and is no longer available for download.", + "format": "unix-time", + "type": "integer" + }, + "sql": { + "description": "SQL for the query.", + "maxLength": 100000, + "type": "string" + }, + "status": { + "description": "The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.", + "maxLength": 5000, + "type": "string" + }, + "title": { + "description": "Title of the query.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data_load_time", + "id", + "livemode", + "object", + "result_available_until", + "sql", + "status", + "title" + ], + "title": "ScheduledQueryRun", + "type": "object", + "x-expandableFields": [ + "error", + "file" + ], + "x-resourceId": "scheduled_query_run" + }, + "schedules_phase_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "secret_service_resource_scope": { + "description": "", + "properties": { + "type": { + "description": "The secret scope type.", + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "description": "The user ID, if type is set to \"user\"", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "SecretServiceResourceScope", + "type": "object", + "x-expandableFields": [] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": [ + "charge", + "setup_attempt" + ] + }, + "setup_attempt": { + "description": "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_attempt" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details" + }, + "setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The error encountered during this attempt to confirm the SetupIntent, if any.", + "nullable": true + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "status": { + "description": "Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "description": "The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "setup_intent", + "status", + "usage" + ], + "title": "PaymentFlowsSetupIntentSetupAttempt", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent" + ], + "x-resourceId": "setup_attempt" + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" + }, + "ideal": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_klarna" + }, + "link": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" + }, + "type": { + "description": "The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "SetupAttemptPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "ideal", + "klarna", + "link", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "setup_attempt_payment_method_details_acss_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_au_becs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bacs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Bancontact directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "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": { + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + } + ], + "description": "Populated if this authorization used 3D Secure authentication.", + "nullable": true + } + }, + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "three_d_secure" + ] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + } + }, + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "generated_card" + ] + }, + "setup_attempt_payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "nullable": true, + "type": "string" + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U" + ], + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by iDEAL directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_klarna": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_klarna", + "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_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "preferred_language": { + "description": "Preferred language of the Sofort authorization page that the customer is redirected to.\nCan be one of `en`, `de`, `fr`, or `nl`", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Owner's verified full name. Values are verified or provided by Sofort directly\n(if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent": { + "description": "A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.\nFor example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent as soon as you're ready to collect your customer's payment credentials.\nDo not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.\nThe SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/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](/guides/strong-customer-authentication) may need to be run through\n[Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection\nin order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).\nIf the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,\nit will automatically attach the resulting payment method to that Customer.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you ensure that your customers experience the minimum set of required friction,\neven as regulations change over time.\n\nRelated guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that created the SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "cancellation_reason": { + "description": "Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.", + "enum": [ + "abandoned", + "duplicate", + "requested_by_customer" + ], + "nullable": true, + "type": "string" + }, + "client_secret": { + "description": "The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.\n\nThe client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + } + ], + "description": "The error encountered in the previous SetupIntent confirmation.", + "nullable": true + }, + "latest_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + } + ], + "description": "The most recent SetupAttempt for this SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_next_action" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to continue payment setup.", + "nullable": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) for which the setup is intended.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used with this SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options" + } + ], + "description": "Payment-method-specific configuration for this SetupIntent.", + "nullable": true + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + } + ], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "status": { + "description": "[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future.\n\nUse `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method_types", + "status", + "usage" + ], + "title": "SetupIntent", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "last_setup_error", + "latest_attempt", + "mandate", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "single_use_mandate" + ], + "x-resourceId": "setup_intent" + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "redirect_to_url": { + "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" + } + }, + "required": [ + "type" + ], + "title": "SetupIntentNextAction", + "type": "object", + "x-expandableFields": [ + "redirect_to_url", + "verify_with_microdeposits" + ] + }, + "setup_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": [ + "amounts", + "descriptor_code" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card" + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "setup_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account", + "enum": [ + "cad", + "usd" + ], + "nullable": true, + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_blik": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_blik" + } + }, + "title": "setup_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card_mandate_options" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India.", + "nullable": true + }, + "network": { + "description": "Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only" + ], + "nullable": true, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "interval": { + "description": "Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.", + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.", + "nullable": true, + "type": "integer" + }, + "reference": { + "description": "Unique identifier for the mandate or subscription.", + "maxLength": 80, + "type": "string" + }, + "start_date": { + "description": "Start date of the mandate or subscription. Start date should not be lesser than yesterday.", + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "description": "Specifies the type of mandates supported. Possible values are `india`.", + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": { + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "nullable": true, + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "nullable": true, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session" + ], + "nullable": true, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "setup_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "setup_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "SetupIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [] + }, + "shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tracking_number": { + "description": "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "Shipping", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "shipping_rate": { + "description": "Shipping rates describe the price of shipping presented to your customers and can be\napplied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)\nand [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.", + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "delivery_estimate": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate" + } + ], + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "nullable": true + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "fixed_amount": { + "$ref": "#/components/schemas/shipping_rate_fixed_amount" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "shipping_rate" + ], + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "nullable": true, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": [ + "delivery_estimate", + "fixed_amount", + "tax_code" + ], + "x-resourceId": "shipping_rate" + }, + "shipping_rate_currency_option": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount", + "tax_behavior" + ], + "title": "ShippingRateCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + } + ], + "description": "The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.", + "nullable": true + }, + "minimum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + } + ], + "description": "The lower bound of the estimated range. If empty, represents no lower bound.", + "nullable": true + } + }, + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": [ + "maximum", + "minimum" + ] + }, + "shipping_rate_delivery_estimate_bound": { + "description": "", + "properties": { + "unit": { + "description": "A unit of time.", + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "ShippingRateDeliveryEstimateBound", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_fixed_amount": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/shipping_rate_currency_option" + }, + "description": "Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "ShippingRateFixedAmount", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "sigma_scheduled_query_run_error": { + "description": "", + "properties": { + "message": { + "description": "Information about the run failure.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "SigmaScheduledQueryRunError", + "type": "object", + "x-expandableFields": [] + }, + "source": { + "description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_type_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/source_type_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/source_type_acss_debit" + }, + "alipay": { + "$ref": "#/components/schemas/source_type_alipay" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.", + "nullable": true, + "type": "integer" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/source_type_au_becs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/source_type_bancontact" + }, + "card": { + "$ref": "#/components/schemas/source_type_card" + }, + "card_present": { + "$ref": "#/components/schemas/source_type_card_present" + }, + "client_secret": { + "description": "The client secret of the source. Used for client-side retrieval using a publishable key.", + "maxLength": 5000, + "type": "string" + }, + "code_verification": { + "$ref": "#/components/schemas/source_code_verification_flow" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.", + "nullable": true, + "type": "string" + }, + "customer": { + "description": "The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.", + "maxLength": 5000, + "type": "string" + }, + "eps": { + "$ref": "#/components/schemas/source_type_eps" + }, + "flow": { + "description": "The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.", + "maxLength": 5000, + "type": "string" + }, + "giropay": { + "$ref": "#/components/schemas/source_type_giropay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/source_type_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/source_type_klarna" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "multibanco": { + "$ref": "#/components/schemas/source_type_multibanco" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source" + ], + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/source_owner" + } + ], + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "nullable": true + }, + "p24": { + "$ref": "#/components/schemas/source_type_p24" + }, + "receiver": { + "$ref": "#/components/schemas/source_receiver_flow" + }, + "redirect": { + "$ref": "#/components/schemas/source_redirect_flow" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_type_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/source_type_sofort" + }, + "source_order": { + "$ref": "#/components/schemas/source_order" + }, + "statement_descriptor": { + "description": "Extra information about a source. This will appear on your customer's statement every time you charge the source.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.", + "maxLength": 5000, + "type": "string" + }, + "three_d_secure": { + "$ref": "#/components/schemas/source_type_three_d_secure" + }, + "type": { + "description": "The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "alipay", + "au_becs_debit", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "usage": { + "description": "Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "wechat": { + "$ref": "#/components/schemas/source_type_wechat" + } + }, + "required": [ + "client_secret", + "created", + "flow", + "id", + "livemode", + "object", + "status", + "type" + ], + "title": "Source", + "type": "object", + "x-expandableFields": [ + "code_verification", + "owner", + "receiver", + "redirect", + "source_order" + ], + "x-resourceId": "source" + }, + "source_code_verification_flow": { + "description": "", + "properties": { + "attempts_remaining": { + "description": "The number of attempts remaining to authenticate the source object with a verification code.", + "type": "integer" + }, + "status": { + "description": "The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "attempts_remaining", + "status" + ], + "title": "SourceCodeVerificationFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification": { + "description": "Source mandate notifications should be created when a notification related to\na source mandate must be sent to the payer. They will trigger a webhook or\ndeliver an email to the customer.", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/source_mandate_notification_acss_debit_data" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.", + "nullable": true, + "type": "integer" + }, + "bacs_debit": { + "$ref": "#/components/schemas/source_mandate_notification_bacs_debit_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source_mandate_notification" + ], + "type": "string" + }, + "reason": { + "description": "The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.", + "maxLength": 5000, + "type": "string" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_mandate_notification_sepa_debit_data" + }, + "source": { + "$ref": "#/components/schemas/source" + }, + "status": { + "description": "The status of the mandate notification. Valid statuses are `pending` or `submitted`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "reason", + "source", + "status", + "type" + ], + "title": "SourceMandateNotification", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bacs_debit", + "sepa_debit", + "source" + ], + "x-resourceId": "source_mandate_notification" + }, + "source_mandate_notification_acss_debit_data": { + "description": "", + "properties": { + "statement_descriptor": { + "description": "The statement descriptor associate with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationAcssDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_bacs_debit_data": { + "description": "", + "properties": { + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationBacsDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_sepa_debit_data": { + "description": "", + "properties": { + "creditor_identifier": { + "description": "SEPA creditor ID.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + }, + "mandate_reference": { + "description": "Mandate reference associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationSepaDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_order": { + "description": "", + "properties": { + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "email": { + "description": "The email address of the customer placing the order.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of items constituting the order.", + "items": { + "$ref": "#/components/schemas/source_order_item" + }, + "nullable": true, + "type": "array" + }, + "shipping": { + "$ref": "#/components/schemas/shipping" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": [ + "items", + "shipping" + ] + }, + "source_order_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount (price) for this order item.", + "nullable": true, + "type": "integer" + }, + "currency": { + "description": "This currency of this order item. Required when `amount` is present.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "Human-readable description for this order item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "parent": { + "description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.", + "type": "integer" + }, + "type": { + "description": "The type of this order item. Must be `sku`, `tax`, or `shipping`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [] + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Owner's address.", + "nullable": true + }, + "email": { + "description": "Owner's email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Owner's full name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "phone": { + "description": "Owner's phone number (including extension).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "nullable": true + }, + "verified_email": { + "description": "Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_phone": { + "description": "Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "SourceOwner", + "type": "object", + "x-expandableFields": [ + "address", + "verified_address" + ] + }, + "source_receiver_flow": { + "description": "", + "properties": { + "address": { + "description": "The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "amount_charged": { + "description": "The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.", + "type": "integer" + }, + "amount_received": { + "description": "The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.", + "type": "integer" + }, + "amount_returned": { + "description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.", + "type": "integer" + }, + "refund_attributes_method": { + "description": "Type of refund attribute method, one of `email`, `manual`, or `none`.", + "maxLength": 5000, + "type": "string" + }, + "refund_attributes_status": { + "description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_redirect_flow": { + "description": "", + "properties": { + "failure_reason": { + "description": "The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "return_url": { + "description": "The URL you provide to redirect the customer to after they authenticated their payment.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.", + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "return_url", + "status", + "url" + ], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction": { + "description": "Some payment methods have no required amount that a customer must send.\nCustomers can be instructed to send any amount, and it can be made up of\nmultiple transactions. As such, sources can have multiple associated\ntransactions.", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_ach_credit_transfer_data" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.", + "type": "integer" + }, + "chf_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_chf_credit_transfer_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "gbp_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_gbp_credit_transfer_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source_transaction" + ], + "type": "string" + }, + "paper_check": { + "$ref": "#/components/schemas/source_transaction_paper_check_data" + }, + "sepa_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_sepa_credit_transfer_data" + }, + "source": { + "description": "The ID of the source this transaction is attached to.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the transaction, one of `succeeded`, `pending`, or `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this transaction is attached to.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "alipay", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "object", + "source", + "status", + "type" + ], + "title": "SourceTransaction", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "chf_credit_transfer", + "gbp_credit_transfer", + "paper_check", + "sepa_credit_transfer" + ], + "x-resourceId": "source_transaction" + }, + "source_transaction_ach_credit_transfer_data": { + "description": "", + "properties": { + "customer_data": { + "description": "Customer data associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Bank account fingerprint associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionAchCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_chf_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_country": { + "description": "Sender's country address.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_line1": { + "description": "Sender's line 1 address.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionChfCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_gbp_credit_transfer_data": { + "description": "", + "properties": { + "fingerprint": { + "description": "Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.", + "maxLength": 5000, + "type": "string" + }, + "funding_method": { + "description": "The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "Sender entered arbitrary information about the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_account_number": { + "description": "Sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender name associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_sort_code": { + "description": "Sender sort code associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionGbpCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_paper_check_data": { + "description": "", + "properties": { + "available_at": { + "description": "Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.", + "maxLength": 5000, + "type": "string" + }, + "invoices": { + "description": "Comma-separated list of invoice IDs associated with the paper check.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionPaperCheckData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_sepa_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionSepaCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_type_ach_credit_transfer": { + "properties": { + "account_number": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_name": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_type": { + "nullable": true, + "type": "string" + }, + "refund_routing_number": { + "nullable": true, + "type": "string" + }, + "routing_number": { + "nullable": true, + "type": "string" + }, + "swift_code": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_ach_debit": { + "properties": { + "bank_name": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "routing_number": { + "nullable": true, + "type": "string" + }, + "type": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_acss_debit": { + "properties": { + "bank_address_city": { + "nullable": true, + "type": "string" + }, + "bank_address_line_1": { + "nullable": true, + "type": "string" + }, + "bank_address_line_2": { + "nullable": true, + "type": "string" + }, + "bank_address_postal_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "category": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "routing_number": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_alipay": { + "properties": { + "data_string": { + "nullable": true, + "type": "string" + }, + "native_url": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_bancontact": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "iban_last4": { + "nullable": true, + "type": "string" + }, + "preferred_language": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_card": { + "properties": { + "address_line1_check": { + "nullable": true, + "type": "string" + }, + "address_zip_check": { + "nullable": true, + "type": "string" + }, + "brand": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "cvc_check": { + "nullable": true, + "type": "string" + }, + "dynamic_last4": { + "nullable": true, + "type": "string" + }, + "exp_month": { + "nullable": true, + "type": "integer" + }, + "exp_year": { + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_card_present": { + "properties": { + "application_cryptogram": { + "type": "string" + }, + "application_preferred_name": { + "type": "string" + }, + "authorization_code": { + "nullable": true, + "type": "string" + }, + "authorization_response_code": { + "type": "string" + }, + "brand": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "cvm_type": { + "type": "string" + }, + "data_type": { + "nullable": true, + "type": "string" + }, + "dedicated_file_name": { + "type": "string" + }, + "emv_auth_data": { + "type": "string" + }, + "evidence_customer_signature": { + "nullable": true, + "type": "string" + }, + "evidence_transaction_certificate": { + "nullable": true, + "type": "string" + }, + "exp_month": { + "nullable": true, + "type": "integer" + }, + "exp_year": { + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "pos_device_id": { + "nullable": true, + "type": "string" + }, + "pos_entry_mode": { + "type": "string" + }, + "read_method": { + "nullable": true, + "type": "string" + }, + "reader": { + "nullable": true, + "type": "string" + }, + "terminal_verification_results": { + "type": "string" + }, + "transaction_status_information": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_eps": { + "properties": { + "reference": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_giropay": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_ideal": { + "properties": { + "bank": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "iban_last4": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_klarna": { + "properties": { + "background_image_url": { + "type": "string" + }, + "client_token": { + "nullable": true, + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "page_title": { + "type": "string" + }, + "pay_later_asset_urls_descriptive": { + "type": "string" + }, + "pay_later_asset_urls_standard": { + "type": "string" + }, + "pay_later_name": { + "type": "string" + }, + "pay_later_redirect_url": { + "type": "string" + }, + "pay_now_asset_urls_descriptive": { + "type": "string" + }, + "pay_now_asset_urls_standard": { + "type": "string" + }, + "pay_now_name": { + "type": "string" + }, + "pay_now_redirect_url": { + "type": "string" + }, + "pay_over_time_asset_urls_descriptive": { + "type": "string" + }, + "pay_over_time_asset_urls_standard": { + "type": "string" + }, + "pay_over_time_name": { + "type": "string" + }, + "pay_over_time_redirect_url": { + "type": "string" + }, + "payment_method_categories": { + "type": "string" + }, + "purchase_country": { + "type": "string" + }, + "purchase_type": { + "type": "string" + }, + "redirect_url": { + "type": "string" + }, + "shipping_delay": { + "type": "integer" + }, + "shipping_first_name": { + "type": "string" + }, + "shipping_last_name": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_multibanco": { + "properties": { + "entity": { + "nullable": true, + "type": "string" + }, + "reference": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_city": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_country": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_line1": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_line2": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_postal_code": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_address_state": { + "nullable": true, + "type": "string" + }, + "refund_account_holder_name": { + "nullable": true, + "type": "string" + }, + "refund_iban": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_p24": { + "properties": { + "reference": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_sepa_debit": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "branch_code": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "fingerprint": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "mandate_reference": { + "nullable": true, + "type": "string" + }, + "mandate_url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_sofort": { + "properties": { + "bank_code": { + "nullable": true, + "type": "string" + }, + "bank_name": { + "nullable": true, + "type": "string" + }, + "bic": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "iban_last4": { + "nullable": true, + "type": "string" + }, + "preferred_language": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_three_d_secure": { + "properties": { + "address_line1_check": { + "nullable": true, + "type": "string" + }, + "address_zip_check": { + "nullable": true, + "type": "string" + }, + "authenticated": { + "nullable": true, + "type": "boolean" + }, + "brand": { + "nullable": true, + "type": "string" + }, + "card": { + "nullable": true, + "type": "string" + }, + "country": { + "nullable": true, + "type": "string" + }, + "customer": { + "nullable": true, + "type": "string" + }, + "cvc_check": { + "nullable": true, + "type": "string" + }, + "dynamic_last4": { + "nullable": true, + "type": "string" + }, + "exp_month": { + "nullable": true, + "type": "integer" + }, + "exp_year": { + "nullable": true, + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "nullable": true, + "type": "string" + }, + "last4": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "source_type_wechat": { + "properties": { + "prepay_id": { + "type": "string" + }, + "qr_code_url": { + "nullable": true, + "type": "string" + }, + "statement_descriptor": { + "type": "string" + } + }, + "type": "object" + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the subscription.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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", + "type": "integer" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period", + "nullable": true + }, + "cancel_at": { + "description": "A date in the future at which the subscription will automatically get canceled", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancel_at_period_end": { + "description": "If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current 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" + }, + "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).", + "type": "string" + }, + "current_period_end": { + "description": "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "Start of the current period that the subscription has been invoiced for.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.", + "nullable": true, + "type": "integer" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.", + "maxLength": 500, + "nullable": true, + "type": "string" + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + } + ], + "description": "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.", + "nullable": true + }, + "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" + }, + "items": { + "description": "List of subscription items, each with an attached price.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "latest_invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The most recent invoice this subscription has generated.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "next_pending_invoice_item_invoice": { + "description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "pause_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pause_collection" + } + ], + "description": "If specified, payment collection for this subscription will be paused.", + "nullable": true + }, + "payment_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_settings" + } + ], + "description": "Payment settings passed on to invoices created by the subscription.", + "nullable": true + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.", + "nullable": true + }, + "pending_setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "pending_update": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pending_update" + } + ], + "description": "If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.", + "nullable": true + }, + "schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + } + ], + "description": "The schedule attached to the subscription", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "start_date": { + "description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, 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\nIf subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.", + "enum": [ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this subscription belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + } + ], + "description": "The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.", + "nullable": true + }, + "trial_end": { + "description": "If the subscription has a trial, the end of that trial.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings" + } + ], + "description": "Settings related to subscription trials.", + "nullable": true + }, + "trial_start": { + "description": "If the subscription has a trial, the beginning of that trial.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "automatic_tax", + "billing_cycle_anchor", + "cancel_at_period_end", + "collection_method", + "created", + "currency", + "current_period_end", + "current_period_start", + "customer", + "id", + "items", + "livemode", + "metadata", + "object", + "start_date", + "status" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_thresholds", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription" + }, + "subscription_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this subscription.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "subscription_billing_thresholds": { + "description": "", + "properties": { + "amount_gte": { + "description": "Monetary threshold that triggers the subscription to create an invoice", + "nullable": true, + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "description": "Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.", + "nullable": true, + "type": "boolean" + } + }, + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_item": { + "description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period", + "nullable": true + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_item" + ], + "type": "string" + }, + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "description": "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "subscription": { + "description": "The `subscription` this `subscription_item` belongs to.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "created", + "id", + "metadata", + "object", + "price", + "subscription" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ], + "x-resourceId": "subscription_item" + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "nullable": true, + "type": "integer" + } + }, + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_mandate_options_card" + }, + "network": { + "description": "Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "nullable": true, + "type": "string" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic" + ], + "nullable": true, + "type": "string" + } + }, + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "subscription_pending_invoice_item_interval": { + "description": "", + "properties": { + "interval": { + "description": "Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).", + "type": "integer" + } + }, + "required": [ + "interval", + "interval_count" + ], + "title": "SubscriptionPendingInvoiceItemInterval", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule": { + "description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ], + "description": "ID of the Connect Application that created the schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "canceled_at": { + "description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "completed_at": { + "description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_phase": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_schedule_current_phase" + } + ], + "description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.", + "nullable": true + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_settings": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_schedule" + ], + "type": "string" + }, + "phases": { + "description": "Configuration for the subscription schedule's phases.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_phase_configuration" + }, + "type": "array" + }, + "released_at": { + "description": "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "released_subscription": { + "description": "ID of the subscription once managed by the subscription schedule (if it is released).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "enum": [ + "active", + "canceled", + "completed", + "not_started", + "released" + ], + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + } + ], + "description": "ID of the subscription managed by the subscription schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "customer", + "default_settings", + "end_behavior", + "id", + "livemode", + "object", + "phases", + "status" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule" + }, + "subscription_schedule_add_invoice_item": { + "description": "An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.", + "properties": { + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "The quantity of the invoice item.", + "nullable": true, + "type": "integer" + }, + "tax_rates": { + "description": "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": [ + "price", + "tax_rates" + ] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period", + "nullable": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.", + "nullable": true, + "type": "object" + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "Quantity of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "tax_rates": { + "description": "The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ] + }, + "subscription_schedule_current_phase": { + "description": "", + "properties": { + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end_date", + "start_date" + ], + "title": "SubscriptionScheduleCurrentPhase", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule_phase_configuration": { + "description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.", + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/schedules_phase_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start" + ], + "nullable": true, + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period", + "nullable": true + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "nullable": true, + "type": "string" + }, + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ], + "description": "ID of the coupon to use during this phase of the subscription schedule.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "nullable": true, + "type": "array" + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + } + ], + "description": "The invoice settings applicable during this phase.", + "nullable": true + }, + "items": { + "description": "Subscription items to configure the subscription to during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_configuration_item" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.", + "nullable": true, + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "proration_behavior": { + "description": "If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + } + ], + "description": "The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.", + "nullable": true + }, + "trial_end": { + "description": "When the trial ends within the phase.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "add_invoice_items", + "currency", + "end_date", + "items", + "proration_behavior", + "start_date" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "coupon", + "default_payment_method", + "default_tax_rates", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings": { + "description": "", + "properties": { + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "nullable": true, + "type": "number" + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period", + "nullable": true + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "nullable": true, + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + } + ], + "description": "The subscription schedule's default invoice settings.", + "nullable": true + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + } + ], + "description": "The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.", + "nullable": true + } + }, + "required": [ + "billing_cycle_anchor" + ], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "nullable": true, + "type": "number" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "subscriptions_resource_pause_collection": { + "description": "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.", + "properties": { + "behavior": { + "description": "The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.", + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "required": [ + "behavior" + ], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + } + ], + "description": "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + } + ], + "description": "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_payment_method_options_card" + } + ], + "description": "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + } + ], + "description": "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + } + ], + "description": "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.", + "nullable": true + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + } + ], + "description": "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.", + "nullable": true + } + }, + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" + } + ], + "description": "Payment-method-specific configuration to provide to invoices created by the subscription.", + "nullable": true + }, + "payment_method_types": { + "description": "The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).", + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "nullable": true, + "type": "array" + }, + "save_default_payment_method": { + "description": "Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.", + "enum": [ + "off", + "on_subscription" + ], + "nullable": true, + "type": "string" + } + }, + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "subscriptions_resource_pending_update": { + "description": "Pending Updates store the changes pending from a previous update that will be applied\nto the Subscription upon successful payment.", + "properties": { + "billing_cycle_anchor": { + "description": "If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "expires_at": { + "description": "The point after which the changes reflected by this update will be discarded and no longer applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription_items": { + "description": "List of subscription items, each with an attached plan, that will be set if the update is applied.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "nullable": true, + "type": "array" + }, + "trial_end": { + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "expires_at" + ], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": [ + "subscription_items" + ] + }, + "subscriptions_trials_resource_end_behavior": { + "description": "Defines how a subscription behaves when a free trial ends.", + "properties": { + "missing_payment_method": { + "description": "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.", + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "SubscriptionsTrialsResourceEndBehavior", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_trials_resource_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { + "$ref": "#/components/schemas/subscriptions_trials_resource_end_behavior" + } + }, + "required": [ + "end_behavior" + ], + "title": "SubscriptionsTrialsResourceTrialSettings", + "type": "object", + "x-expandableFields": [ + "end_behavior" + ] + }, + "tax_code": { + "description": "[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.", + "properties": { + "description": { + "description": "A detailed description of which types of products the tax code represents.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "A short name for the tax code.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_code" + ], + "type": "string" + } + }, + "required": [ + "description", + "id", + "name", + "object" + ], + "title": "TaxProductResourceTaxCode", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_code" + }, + "tax_deducted_at_source": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_deducted_at_source" + ], + "type": "string" + }, + "period_end": { + "description": "The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "tax_deduction_account_number": { + "description": "The TAN that was supplied to Stripe when TDS was assessed", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "id", + "object", + "period_end", + "period_start", + "tax_deduction_account_number" + ], + "title": "TaxDeductedAtSource", + "type": "object", + "x-expandableFields": [] + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.\n\nRelated guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country of the tax ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "ID of the customer.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_id" + ], + "type": "string" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "Value of the tax ID.", + "maxLength": 5000, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_id_verification" + } + ], + "description": "Tax ID verification information.", + "nullable": true + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "type", + "value" + ], + "title": "tax_id", + "type": "object", + "x-expandableFields": [ + "customer", + "verification" + ], + "x-resourceId": "tax_id" + }, + "tax_id_verification": { + "description": "", + "properties": { + "status": { + "description": "Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.", + "enum": [ + "pending", + "unavailable", + "unverified", + "verified" + ], + "type": "string" + }, + "verified_address": { + "description": "Verified address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "verified_name": { + "description": "Verified name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [] + }, + "tax_rate": { + "description": "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/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" + }, + "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" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_rate" + ], + "type": "string" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), 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": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "active", + "created", + "display_name", + "id", + "inclusive", + "livemode", + "object", + "percentage" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_rate" + }, + "terminal.configuration": { + "description": "A Configurations object represents how features should be configured for terminal readers.", + "properties": { + "bbpos_wisepos_e": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_account_default": { + "description": "Whether this Configuration is the default for your account", + "nullable": true, + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.configuration" + ], + "type": "string" + }, + "tipping": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_tipping" + }, + "verifone_p400": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + } + }, + "required": [ + "id", + "livemode", + "object" + ], + "title": "TerminalConfigurationConfiguration", + "type": "object", + "x-expandableFields": [ + "bbpos_wisepos_e", + "tipping", + "verifone_p400" + ], + "x-resourceId": "terminal.configuration" + }, + "terminal.connection_token": { + "description": "A Connection Token is used by the Stripe Terminal SDK to connect to a reader.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).", + "properties": { + "location": { + "description": "The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.connection_token" + ], + "type": "string" + }, + "secret": { + "description": "Your application should pass this token to the Stripe Terminal SDK.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "object", + "secret" + ], + "title": "TerminalConnectionToken", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "terminal.connection_token" + }, + "terminal.location": { + "description": "A Location represents a grouping of readers.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the location.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.location" + ], + "type": "string" + } + }, + "required": [ + "address", + "display_name", + "id", + "livemode", + "metadata", + "object" + ], + "title": "TerminalLocationLocation", + "type": "object", + "x-expandableFields": [ + "address" + ], + "x-resourceId": "terminal.location" + }, + "terminal.reader": { + "description": "A Reader represents a physical device for accepting payment details.\n\nRelated guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).", + "properties": { + "action": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal_reader_reader_resource_reader_action" + } + ], + "description": "The most recent action performed by the reader.", + "nullable": true + }, + "device_sw_version": { + "description": "The current software version of the reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "device_type": { + "description": "Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`.", + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "simulated_wisepos_e", + "stripe_m2", + "verifone_P400" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The local IP address of the reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "label": { + "description": "Custom label given to the reader for easier identification.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "location": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/terminal.location" + } + ], + "description": "The location identifier of the reader.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/terminal.location" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.reader" + ], + "type": "string" + }, + "serial_number": { + "description": "Serial number of the reader.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The networking status of the reader.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "device_type", + "id", + "label", + "livemode", + "metadata", + "object", + "serial_number" + ], + "title": "TerminalReaderReader", + "type": "object", + "x-expandableFields": [ + "action", + "location" + ], + "x-resourceId": "terminal.reader" + }, + "terminal_configuration_configuration_resource_currency_specific_config": { + "description": "", + "properties": { + "fixed_amounts": { + "description": "Fixed amounts displayed when collecting a tip", + "items": { + "type": "integer" + }, + "nullable": true, + "type": "array" + }, + "percentages": { + "description": "Percentages displayed when collecting a tip", + "items": { + "type": "integer" + }, + "nullable": true, + "type": "array" + }, + "smart_tip_threshold": { + "description": "Below this amount, fixed amounts will be displayed; above it, percentages will be displayed", + "type": "integer" + } + }, + "title": "TerminalConfigurationConfigurationResourceCurrencySpecificConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_configuration_configuration_resource_device_type_specific_config": { + "description": "", + "properties": { + "splashscreen": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "A File ID representing an image you would like displayed on the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig", + "type": "object", + "x-expandableFields": [ + "splashscreen" + ] + }, + "terminal_configuration_configuration_resource_tipping": { + "description": "", + "properties": { + "aud": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "cad": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "chf": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "czk": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "dkk": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "eur": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "gbp": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "hkd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "myr": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nok": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nzd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sek": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sgd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "usd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + } + }, + "title": "TerminalConfigurationConfigurationResourceTipping", + "type": "object", + "x-expandableFields": [ + "aud", + "cad", + "chf", + "czk", + "dkk", + "eur", + "gbp", + "hkd", + "myr", + "nok", + "nzd", + "sek", + "sgd", + "usd" + ] + }, + "terminal_reader_reader_resource_cart": { + "description": "Represents a cart to be displayed on the reader", + "properties": { + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "line_items": { + "description": "List of line items in the cart.", + "items": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_line_item" + }, + "type": "array" + }, + "tax": { + "description": "Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "nullable": true, + "type": "integer" + }, + "total": { + "description": "Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "required": [ + "currency", + "line_items", + "total" + ], + "title": "TerminalReaderReaderResourceCart", + "type": "object", + "x-expandableFields": [ + "line_items" + ] + }, + "terminal_reader_reader_resource_line_item": { + "description": "Represents a line item to be displayed on the reader", + "properties": { + "amount": { + "description": "The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "description": { + "description": "Description of the line item.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The quantity of the line item.", + "type": "integer" + } + }, + "required": [ + "amount", + "description", + "quantity" + ], + "title": "TerminalReaderReaderResourceLineItem", + "type": "object", + "x-expandableFields": [] + }, + "terminal_reader_reader_resource_process_config": { + "description": "Represents a per-transaction override of a reader configuration", + "properties": { + "skip_tipping": { + "description": "Override showing a tipping selection screen on this transaction.", + "type": "boolean" + }, + "tipping": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_tipping_config" + } + }, + "title": "TerminalReaderReaderResourceProcessConfig", + "type": "object", + "x-expandableFields": [ + "tipping" + ] + }, + "terminal_reader_reader_resource_process_payment_intent_action": { + "description": "Represents a reader action to process a payment intent", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "Most recent PaymentIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "process_config": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_config" + } + }, + "required": [ + "payment_intent" + ], + "title": "TerminalReaderReaderResourceProcessPaymentIntentAction", + "type": "object", + "x-expandableFields": [ + "payment_intent", + "process_config" + ] + }, + "terminal_reader_reader_resource_process_setup_intent_action": { + "description": "Represents a reader action to process a setup intent", + "properties": { + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "Most recent SetupIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + } + }, + "required": [ + "setup_intent" + ], + "title": "TerminalReaderReaderResourceProcessSetupIntentAction", + "type": "object", + "x-expandableFields": [ + "setup_intent" + ] + }, + "terminal_reader_reader_resource_reader_action": { + "description": "Represents an action performed by the reader", + "properties": { + "failure_code": { + "description": "Failure code, only set if status is `failed`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Detailed failure message, only set if status is `failed`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "process_payment_intent": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_payment_intent_action" + }, + "process_setup_intent": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_setup_intent_action" + }, + "refund_payment": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_refund_payment_action" + }, + "set_reader_display": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_set_reader_display_action" + }, + "status": { + "description": "Status of the action performed by the reader.", + "enum": [ + "failed", + "in_progress", + "succeeded" + ], + "type": "string" + }, + "type": { + "description": "Type of action performed by the reader.", + "enum": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "status", + "type" + ], + "title": "TerminalReaderReaderResourceReaderAction", + "type": "object", + "x-expandableFields": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ] + }, + "terminal_reader_reader_resource_refund_payment_action": { + "description": "Represents a reader action to refund a payment", + "properties": { + "amount": { + "description": "The amount being refunded.", + "type": "integer" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "Charge that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "Payment intent that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason for the refund.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "type": "string" + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Unique identifier for the refund object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.", + "type": "boolean" + } + }, + "title": "TerminalReaderReaderResourceRefundPaymentAction", + "type": "object", + "x-expandableFields": [ + "charge", + "payment_intent", + "refund" + ] + }, + "terminal_reader_reader_resource_set_reader_display_action": { + "description": "Represents a reader action to set the reader display", + "properties": { + "cart": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal_reader_reader_resource_cart" + } + ], + "description": "Cart object to be displayed by the reader.", + "nullable": true + }, + "type": { + "description": "Type of information to be displayed by the reader.", + "enum": [ + "cart" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "TerminalReaderReaderResourceSetReaderDisplayAction", + "type": "object", + "x-expandableFields": [ + "cart" + ] + }, + "terminal_reader_reader_resource_tipping_config": { + "description": "Represents a per-transaction tipping configuration", + "properties": { + "amount_eligible": { + "description": "Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).", + "type": "integer" + } + }, + "title": "TerminalReaderReaderResourceTippingConfig", + "type": "object", + "x-expandableFields": [] + }, + "test_helpers.test_clock": { + "description": "A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,\nyou can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deletes_after": { + "description": "Time at which this clock is scheduled to auto delete.", + "format": "unix-time", + "type": "integer" + }, + "frozen_time": { + "description": "Time at which all objects belonging to this clock are frozen.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "The custom name supplied at creation.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "test_helpers.test_clock" + ], + "type": "string" + }, + "status": { + "description": "The status of the Test Clock.", + "enum": [ + "advancing", + "internal_failure", + "ready" + ], + "type": "string" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "object", + "status" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "test_helpers.test_clock" + }, + "three_d_secure_details": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": [ + "challenge", + "frictionless" + ], + "nullable": true, + "type": "string" + }, + "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" + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": [ + "1.0.2", + "2.1.0", + "2.2.0" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_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": [] + }, + "token": { + "description": "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. You should use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\nclient-side. This ensures that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you cannot use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. Keep in mind that if\nyour integration uses this method, you are responsible for any PCI compliance\nthat may be required, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information is not sent directly to\nStripe, so we cannot determine how it is handled or stored.\n\nTokens cannot be stored or used more than once. To store card or bank account\ninformation for later use, you can create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.\n\nRelated guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)", + "properties": { + "bank_account": { + "$ref": "#/components/schemas/bank_account" + }, + "card": { + "$ref": "#/components/schemas/card" + }, + "client_ip": { + "description": "IP address of the client that generated the token.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "token" + ], + "type": "string" + }, + "type": { + "description": "Type of the token: `account`, `bank_account`, `card`, or `pii`.", + "maxLength": 5000, + "type": "string" + }, + "used": { + "description": "Whether this token has already been used (tokens can be used only once).", + "type": "boolean" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "type", + "used" + ], + "title": "Token", + "type": "object", + "x-expandableFields": [ + "bank_account", + "card" + ], + "x-resourceId": "token" + }, + "topup": { + "description": "To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).", + "properties": { + "amount": { + "description": "Amount transferred.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "expected_availability_date": { + "description": "Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.", + "nullable": true, + "type": "integer" + }, + "failure_code": { + "description": "Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_message": { + "description": "Message to user further explaining reason for top-up failure if available.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "topup" + ], + "type": "string" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/source" + } + ], + "description": "For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account.", + "nullable": true + }, + "statement_descriptor": { + "description": "Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "status": { + "description": "The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.", + "enum": [ + "canceled", + "failed", + "pending", + "reversed", + "succeeded" + ], + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this top-up as part of a group.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "status" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "source" + ], + "x-resourceId": "topup" + }, + "transfer": { + "description": "A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).", + "properties": { + "amount": { + "description": "Amount in %s to be transferred.", + "type": "integer" + }, + "amount_reversed": { + "description": "Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time that this record of the transfer was first created.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account the transfer was sent to.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "destination_payment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer" + ], + "type": "string" + }, + "reversals": { + "description": "A list of reversals that have been applied to the transfer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "reversed": { + "description": "Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.", + "type": "boolean" + }, + "source_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "source_type": { + "description": "The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "amount", + "amount_reversed", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer" + }, + "transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the payment will be attributed to for tax\nreporting, and where funds from the payment will be transferred to upon\npayment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "transfer_data", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination_payment_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Linked payment refund for the transfer reversal.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer_reversal" + ], + "type": "string" + }, + "source_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "ID of the refund responsible for the transfer reversal.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object", + "transfer" + ], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal" + }, + "transfer_schedule": { + "description": "", + "properties": { + "delay_days": { + "description": "The number of days charges for the account will be held before being paid out.", + "type": "integer" + }, + "interval": { + "description": "How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.", + "maxLength": 5000, + "type": "string" + }, + "monthly_anchor": { + "description": "The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.", + "type": "integer" + }, + "weekly_anchor": { + "description": "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "delay_days", + "interval" + ], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [] + }, + "transform_quantity": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "TransformQuantity", + "type": "object", + "x-expandableFields": [] + }, + "transform_usage": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "TransformUsage", + "type": "object", + "x-expandableFields": [] + }, + "treasury.credit_reversal": { + "description": "You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": [ + "ach", + "stripe" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.credit_reversal" + ], + "type": "string" + }, + "received_credit": { + "description": "The ReceivedCredit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the CreditReversal", + "enum": [ + "canceled", + "posted", + "processing" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_received_credits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "financial_account", + "id", + "livemode", + "metadata", + "network", + "object", + "received_credit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedCreditsResourceCreditReversal", + "type": "object", + "x-expandableFields": [ + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.credit_reversal" + }, + "treasury.debit_reversal": { + "description": "You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_debits_resource_debit_reversal_linked_flows" + } + ], + "description": "Other flows linked to a DebitReversal.", + "nullable": true + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": [ + "ach", + "card" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.debit_reversal" + ], + "type": "string" + }, + "received_debit": { + "description": "The ReceivedDebit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the DebitReversal", + "enum": [ + "failed", + "processing", + "succeeded" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_received_debits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "network", + "object", + "received_debit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedDebitsResourceDebitReversal", + "type": "object", + "x-expandableFields": [ + "linked_flows", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.debit_reversal" + }, + "treasury.financial_account": { + "description": "Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.\nFinancialAccounts serve as the source and destination of Treasury’s money movement APIs.", + "properties": { + "active_features": { + "description": "The array of paths to active Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "balance": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_balance" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "features": { + "$ref": "#/components/schemas/treasury.financial_account_features" + }, + "financial_addresses": { + "description": "The set of credentials that resolve to a FinancialAccount.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_address" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.financial_account" + ], + "type": "string" + }, + "pending_features": { + "description": "The array of paths to pending Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "platform_restrictions": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_platform_restrictions" + } + ], + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "nullable": true + }, + "restricted_features": { + "description": "The array of paths to restricted Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "status": { + "description": "The enum specifying what state the account is in.", + "enum": [ + "closed", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_details": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_status_details" + }, + "supported_currencies": { + "description": "The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "balance", + "country", + "created", + "financial_addresses", + "id", + "livemode", + "object", + "status", + "status_details", + "supported_currencies" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccount", + "type": "object", + "x-expandableFields": [ + "balance", + "features", + "financial_addresses", + "platform_restrictions", + "status_details" + ], + "x-resourceId": "treasury.financial_account" + }, + "treasury.financial_account_features": { + "description": "Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.\nStripe or the platform can control Features via the requested field.", + "properties": { + "card_issuing": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "deposit_insurance": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "financial_addresses": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_addresses_features" + }, + "inbound_transfers": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_inbound_transfers" + }, + "intra_stripe_flows": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.financial_account_features" + ], + "type": "string" + }, + "outbound_payments": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_payments" + }, + "outbound_transfers": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_transfers" + } + }, + "required": [ + "object" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccountFeatures", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "deposit_insurance", + "financial_addresses", + "inbound_transfers", + "intra_stripe_flows", + "outbound_payments", + "outbound_transfers" + ], + "x-resourceId": "treasury.financial_account_features" + }, + "treasury.inbound_transfer": { + "description": "Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the InboundTransfer is able to be canceled.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "failure_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_failure_details" + } + ], + "description": "Details about this InboundTransfer's failure. Only set when status is `failed`.", + "nullable": true + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.inbound_transfer" + ], + "type": "string" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for an InboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "origin_payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/inbound_transfers" + } + ], + "description": "Details about the PaymentMethod for an InboundTransfer.", + "nullable": true + }, + "returned": { + "description": "Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.", + "nullable": true, + "type": "boolean" + }, + "statement_descriptor": { + "description": "Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been \"confirmed\" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.", + "enum": [ + "canceled", + "failed", + "processing", + "succeeded" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "financial_account", + "id", + "linked_flows", + "livemode", + "metadata", + "object", + "origin_payment_method", + "statement_descriptor", + "status", + "status_transitions" + ], + "title": "TreasuryInboundTransfersResourceInboundTransfer", + "type": "object", + "x-expandableFields": [ + "failure_details", + "linked_flows", + "origin_payment_method_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.inbound_transfer" + }, + "treasury.outbound_payment": { + "description": "Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).\n\nSimulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/outbound_payments_payment_method_details" + } + ], + "description": "Details about the PaymentMethod for an OutboundPayment.", + "nullable": true + }, + "end_user_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details" + } + ], + "description": "Details about the end user.", + "nullable": true + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.outbound_payment" + ], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_returned_status" + } + ], + "description": "Details about a returned OutboundPayment. Only set when the status is `returned`.", + "nullable": true + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been \"confirmed\" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.", + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPayment", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "end_user_details", + "returned_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.outbound_payment" + }, + "treasury.outbound_transfer": { + "description": "Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.\n\nSimulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod used as the payment instrument for an OutboundTransfer.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "destination_payment_method_details": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details" + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.outbound_transfer" + ], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_returned_details" + } + ], + "description": "Details about a returned OutboundTransfer. Only set when the status is `returned`.", + "nullable": true + }, + "statement_descriptor": { + "description": "Information about the OutboundTransfer to be sent to the recipient account.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been \"confirmed\" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.", + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "destination_payment_method_details", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundTransfersResourceOutboundTransfer", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "returned_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.outbound_transfer" + }, + "treasury.received_credit": { + "description": "ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.", + "enum": [ + "account_closed", + "account_frozen", + "other" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_received_credits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The rails used to send the funds.", + "enum": [ + "ach", + "card", + "stripe", + "us_domestic_wire" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.received_credit" + ], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_credits_resource_reversal_details" + } + ], + "description": "Details describing when a ReceivedCredit may be reversed.", + "nullable": true + }, + "status": { + "description": "Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.", + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "initiating_payment_method_details", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedCreditsResourceReceivedCredit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_credit" + }, + "treasury.received_debit": { + "description": "ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.", + "enum": [ + "account_closed", + "account_frozen", + "insufficient_funds", + "other" + ], + "nullable": true, + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_received_debits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The network used for the ReceivedDebit.", + "enum": [ + "ach", + "card", + "stripe" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.received_debit" + ], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_debits_resource_reversal_details" + } + ], + "description": "Details describing when a ReceivedDebit might be reversed.", + "nullable": true + }, + "status": { + "description": "Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.", + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedDebitsResourceReceivedDebit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_debit" + }, + "treasury.transaction": { + "description": "Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "balance_impact": { + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "entries": { + "description": "A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "ID of the flow that created the Transaction.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + } + ], + "description": "Details of the flow that created the Transaction.", + "nullable": true + }, + "flow_type": { + "description": "Type of the flow that created the Transaction.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.transaction" + ], + "type": "string" + }, + "status": { + "description": "Status of the Transaction.", + "enum": [ + "open", + "posted", + "void" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_transactions_resource_abstract_transaction_resource_status_transitions" + } + }, + "required": [ + "amount", + "balance_impact", + "created", + "currency", + "description", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "status", + "status_transitions" + ], + "title": "TreasuryTransactionsResourceTransaction", + "type": "object", + "x-expandableFields": [ + "balance_impact", + "entries", + "flow_details", + "status_transitions" + ], + "x-resourceId": "treasury.transaction" + }, + "treasury.transaction_entry": { + "description": "TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).", + "properties": { + "balance_impact": { + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "effective_at": { + "description": "When the TransactionEntry will impact the FinancialAccount's balance.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "Token of the flow associated with the TransactionEntry.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + } + ], + "description": "Details of the flow associated with the TransactionEntry.", + "nullable": true + }, + "flow_type": { + "description": "Type of the flow associated with the TransactionEntry.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.transaction_entry" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + }, + "type": { + "description": "The specific money movement that generated the TransactionEntry.", + "enum": [ + "credit_reversal", + "credit_reversal_posting", + "debit_reversal", + "inbound_transfer", + "inbound_transfer_return", + "issuing_authorization_hold", + "issuing_authorization_release", + "other", + "outbound_payment", + "outbound_payment_cancellation", + "outbound_payment_failure", + "outbound_payment_posting", + "outbound_payment_return", + "outbound_transfer", + "outbound_transfer_cancellation", + "outbound_transfer_failure", + "outbound_transfer_posting", + "outbound_transfer_return", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": [ + "balance_impact", + "created", + "currency", + "effective_at", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "transaction", + "type" + ], + "title": "TreasuryTransactionsResourceTransactionEntry", + "type": "object", + "x-expandableFields": [ + "balance_impact", + "flow_details", + "transaction" + ], + "x-resourceId": "treasury.transaction_entry" + }, + "treasury_financial_accounts_resource_aba_record": { + "description": "ABA Records contain U.S. bank account details per the ABA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "account_number_last4": { + "description": "The last four characters of the account number.", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number for the account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number_last4", + "bank_name", + "routing_number" + ], + "title": "TreasuryFinancialAccountsResourceABARecord", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_ach_toggle_settings": { + "description": "Toggle settings for enabling/disabling an ACH specific feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": [ + "active", + "pending", + "restricted" + ], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": [ + "requested", + "status", + "status_details" + ], + "title": "TreasuryFinancialAccountsResourceAchToggleSettings", + "type": "object", + "x-expandableFields": [ + "status_details" + ] + }, + "treasury_financial_accounts_resource_balance": { + "description": "Balance information for the FinancialAccount", + "properties": { + "cash": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds the user can spend right now.", + "type": "object" + }, + "inbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds not spendable yet, but will become available at a later time.", + "type": "object" + }, + "outbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "object" + } + }, + "required": [ + "cash", + "inbound_pending", + "outbound_pending" + ], + "title": "TreasuryFinancialAccountsResourceBalance", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_closed_status_details": { + "description": "", + "properties": { + "reasons": { + "description": "The array that contains reasons for a FinancialAccount closure.", + "items": { + "enum": [ + "account_rejected", + "closed_by_platform", + "other" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "reasons" + ], + "title": "TreasuryFinancialAccountsResourceClosedStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "aba": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_aba_record" + }, + "supported_networks": { + "description": "The list of networks that the address supports", + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": [ + "aba" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAddress", + "type": "object", + "x-expandableFields": [ + "aba" + ] + }, + "treasury_financial_accounts_resource_financial_addresses_features": { + "description": "Settings related to Financial Addresses features on a Financial Account", + "properties": { + "aba": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceFinancialAddressesFeatures", + "type": "object", + "x-expandableFields": [ + "aba" + ] + }, + "treasury_financial_accounts_resource_inbound_transfers": { + "description": "InboundTransfers contains inbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_ach_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceInboundTransfers", + "type": "object", + "x-expandableFields": [ + "ach" + ] + }, + "treasury_financial_accounts_resource_outbound_payments": { + "description": "Settings related to Outbound Payments features on a Financial Account", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundPayments", + "type": "object", + "x-expandableFields": [ + "ach", + "us_domestic_wire" + ] + }, + "treasury_financial_accounts_resource_outbound_transfers": { + "description": "OutboundTransfers contains outbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundTransfers", + "type": "object", + "x-expandableFields": [ + "ach", + "us_domestic_wire" + ] + }, + "treasury_financial_accounts_resource_platform_restrictions": { + "description": "Restrictions that a Connect Platform has placed on this FinancialAccount.", + "properties": { + "inbound_flows": { + "description": "Restricts all inbound money movement.", + "enum": [ + "restricted", + "unrestricted" + ], + "nullable": true, + "type": "string" + }, + "outbound_flows": { + "description": "Restricts all outbound money movement.", + "enum": [ + "restricted", + "unrestricted" + ], + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryFinancialAccountsResourcePlatformRestrictions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_status_details": { + "description": "", + "properties": { + "closed": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_closed_status_details" + } + ], + "description": "Details related to the closure of this FinancialAccount", + "nullable": true + } + }, + "title": "TreasuryFinancialAccountsResourceStatusDetails", + "type": "object", + "x-expandableFields": [ + "closed" + ] + }, + "treasury_financial_accounts_resource_toggle_settings": { + "description": "Toggle settings for enabling/disabling a feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": [ + "active", + "pending", + "restricted" + ], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": [ + "requested", + "status", + "status_details" + ], + "title": "TreasuryFinancialAccountsResourceToggleSettings", + "type": "object", + "x-expandableFields": [ + "status_details" + ] + }, + "treasury_financial_accounts_resource_toggles_setting_status_details": { + "description": "Additional details on the FinancialAccount Features information.", + "properties": { + "code": { + "description": "Represents the reason why the status is `pending` or `restricted`.", + "enum": [ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "resolution": { + "description": "Represents what the user should do, if anything, to activate the Feature.", + "enum": [ + "contact_stripe", + "provide_information", + "remove_restriction" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "restriction": { + "description": "The `platform_restrictions` that are restricting this Feature.", + "enum": [ + "inbound_flows", + "outbound_flows" + ], + "type": "string" + } + }, + "required": [ + "code" + ], + "title": "TreasuryFinancialAccountsResourceTogglesSettingStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_failure_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the failure.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "required": [ + "code" + ], + "title": "TreasuryInboundTransfersResourceFailureDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows": { + "description": "", + "properties": { + "received_debit": { + "description": "If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `canceled`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `failed`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "succeeded_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `succeeded`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_end_user_details": { + "description": "", + "properties": { + "ip_address": { + "description": "IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "present": { + "description": "`true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.", + "type": "boolean" + } + }, + "required": [ + "present" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `canceled`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `failed`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "posted_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `posted`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "returned_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `returned`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_returned_status": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "code", + "transaction" + ], + "title": "TreasuryOutboundPaymentsResourceReturnedStatus", + "type": "object", + "x-expandableFields": [ + "transaction" + ] + }, + "treasury_outbound_transfers_resource_returned_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "code", + "transaction" + ], + "title": "TreasuryOutboundTransfersResourceReturnedDetails", + "type": "object", + "x-expandableFields": [ + "transaction" + ] + }, + "treasury_outbound_transfers_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `canceled`", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `failed`", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "posted_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `posted`", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "returned_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `returned`", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryOutboundTransfersResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_linked_flows": { + "description": "", + "properties": { + "credit_reversal": { + "description": "The CreditReversal created as a result of this ReceivedCredit being reversed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_authorization": { + "description": "Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_transaction": { + "description": "Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "source_flow": { + "description": "ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "source_flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_credits_resource_source_flows_details" + } + ], + "description": "The expandable object of the source flow.", + "nullable": true + }, + "source_flow_type": { + "description": "The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedCreditsResourceLinkedFlows", + "type": "object", + "x-expandableFields": [ + "source_flow_details" + ] + }, + "treasury_received_credits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedCredit can be reversed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "restricted_reason": { + "description": "Set if a ReceivedCredit cannot be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted" + ], + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedCreditsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_source_flows_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "outbound_payment": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "payout": { + "$ref": "#/components/schemas/payout" + }, + "type": { + "description": "The type of the source flow that originated the ReceivedCredit.", + "enum": [ + "credit_reversal", + "other", + "outbound_payment", + "payout" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "TreasuryReceivedCreditsResourceSourceFlowsDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "outbound_payment", + "payout" + ] + }, + "treasury_received_credits_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the CreditReversal changed status to `posted`", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryReceivedCreditsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_debit_reversal_linked_flows": { + "description": "", + "properties": { + "issuing_dispute": { + "description": "Set if there is an Issuing dispute associated with the DebitReversal.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedDebitsResourceDebitReversalLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_linked_flows": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The DebitReversal created as a result of this ReceivedDebit being reversed.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "inbound_transfer": { + "description": "Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_authorization": { + "description": "Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "issuing_transaction": { + "description": "Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedDebitsResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedDebit can be reversed.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "restricted_reason": { + "description": "Set if a ReceivedDebit can't be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted" + ], + "nullable": true, + "type": "string" + } + }, + "title": "TreasuryReceivedDebitsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_status_transitions": { + "description": "", + "properties": { + "completed_at": { + "description": "Timestamp describing when the DebitReversal changed status to `completed`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryReceivedDebitsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_shared_resource_billing_details": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "address" + ], + "title": "TreasurySharedResourceBillingDetails", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details": { + "description": "", + "properties": { + "balance": { + "description": "Set when `type` is `balance`.", + "enum": [ + "payments" + ], + "type": "string" + }, + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/received_payment_method_details_financial_account" + }, + "issuing_card": { + "description": "Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.", + "enum": [ + "balance", + "financial_account", + "issuing_card", + "stripe", + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "treasury_shared_resource_initiating_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "bank_name": { + "description": "Bank name.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "routing_number": { + "description": "The routing number for the bank account.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_abstract_transaction_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the Transaction changed status to `posted`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "void_at": { + "description": "Timestamp describing when the Transaction changed status to `void`.", + "format": "unix-time", + "nullable": true, + "type": "integer" + } + }, + "title": "TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_balance_impact": { + "description": "Change to a FinancialAccount's balance", + "properties": { + "cash": { + "description": "The change made to funds the user can spend right now.", + "type": "integer" + }, + "inbound_pending": { + "description": "The change made to funds that are not spendable yet, but will become available at a later time.", + "type": "integer" + }, + "outbound_pending": { + "description": "The change made to funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "integer" + } + }, + "required": [ + "cash", + "inbound_pending", + "outbound_pending" + ], + "title": "TreasuryTransactionsResourceBalanceImpact", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_flow_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "debit_reversal": { + "$ref": "#/components/schemas/treasury.debit_reversal" + }, + "inbound_transfer": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + }, + "issuing_authorization": { + "$ref": "#/components/schemas/issuing.authorization" + }, + "outbound_payment": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "outbound_transfer": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "received_credit": { + "$ref": "#/components/schemas/treasury.received_credit" + }, + "received_debit": { + "$ref": "#/components/schemas/treasury.received_debit" + }, + "type": { + "description": "Type of the flow that created the Transaction. Set to the same value as `flow_type`.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "TreasuryTransactionsResourceFlowDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ] + }, + "us_bank_account_networks": { + "description": "", + "properties": { + "preferred": { + "description": "The preferred network.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "supported": { + "description": "All supported networks.", + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "supported" + ], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [] + }, + "usage_record": { + "description": "Usage records allow you to report customer usage and metrics to Stripe for\nmetered billing of subscription prices.\n\nRelated guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing).", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "usage_record" + ], + "type": "string" + }, + "quantity": { + "description": "The usage quantity for the specified date.", + "type": "integer" + }, + "subscription_item": { + "description": "The ID of the subscription item this usage record contains data for.", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "The timestamp when this usage occurred.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "quantity", + "subscription_item", + "timestamp" + ], + "title": "UsageRecord", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "usage_record" + }, + "usage_record_summary": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice in which this usage period has been billed for.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "usage_record_summary" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/period" + }, + "subscription_item": { + "description": "The ID of the subscription item this summary is describing.", + "maxLength": 5000, + "type": "string" + }, + "total_usage": { + "description": "The total usage within this usage period.", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "period", + "subscription_item", + "total_usage" + ], + "title": "UsageRecordSummary", + "type": "object", + "x-expandableFields": [ + "period" + ], + "x-resourceId": "usage_record_summary" + }, + "verification_session_redaction": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether this object and its related objects have been redacted or not.", + "enum": [ + "processing", + "redacted" + ], + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "verification_session_redaction", + "type": "object", + "x-expandableFields": [] + }, + "webhook_endpoint": { + "description": "You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).", + "properties": { + "api_version": { + "description": "The API version events are rendered as for this webhook endpoint.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application": { + "description": "The ID of the associated Connect application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "webhook_endpoint" + ], + "type": "string" + }, + "secret": { + "description": "The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the webhook. It can be `enabled` or `disabled`.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the webhook endpoint.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "enabled_events", + "id", + "livemode", + "metadata", + "object", + "status", + "url" + ], + "title": "NotificationWebhookEndpoint", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "webhook_endpoint" + } + }, + "securitySchemes": { + "basicAuth": { + "description": "Basic HTTP authentication. Allowed headers-- Authorization: Basic | Authorization: Basic ", + "scheme": "basic", + "type": "http" + }, + "bearerAuth": { + "bearerFormat": "auth-scheme", + "description": "Bearer HTTP authentication. Allowed headers-- Authorization: Bearer ", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "dev-platform@stripe.com", + "name": "Stripe Dev Platform Team", + "url": "https://stripe.com" + }, + "description": "The Stripe REST API. Please see https://stripe.com/docs/api for more details.", + "termsOfService": "https://stripe.com/us/terms/", + "title": "Stripe API", + "version": "2022-11-15", + "x-stripeSpecFilename": "spec3" + }, + "openapi": "3.0.0", + "paths": { + "/v1/account": { + "get": { + "description": "

Retrieves the details of an account.

", + "operationId": "GetAccount", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/account_links": { + "post": { + "description": "

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

", + "operationId": "PostAccountLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "The identifier of the account to create an account link for.", + "maxLength": 5000, + "type": "string" + }, + "collect": { + "description": "Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.", + "enum": [ + "currently_due", + "eventually_due" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "refresh_url": { + "description": "The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.", + "type": "string" + }, + "return_url": { + "description": "The URL that the user will be redirected to upon leaving or completing the linked flow.", + "type": "string" + }, + "type": { + "description": "The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.", + "enum": [ + "account_onboarding", + "account_update" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "account", + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts": { + "get": { + "description": "

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

", + "operationId": "GetAccounts", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "AccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

If you’ve already collected information for your connected accounts, you can pre-fill that information when\ncreating the account. Connect Onboarding won’t ask for the pre-filled information during account onboarding.\nYou can pre-fill any information on the account.

", + "operationId": "PostAccounts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "capabilities": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + }, + "tos_acceptance": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_token": { + "description": "An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "business_profile": { + "description": "Business information about the account.", + "properties": { + "mcc": { + "maxLength": 4, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 40000, + "type": "string" + }, + "support_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "support_email": { + "type": "string" + }, + "support_phone": { + "maxLength": 5000, + "type": "string" + }, + "support_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "business_profile_specs", + "type": "object" + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "description": "Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.", + "properties": { + "acss_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "affirm_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "afterpay_clearpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "au_becs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bacs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bancontact_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "blik_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "boleto_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cartes_bancaires_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "eps_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "fpx_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "giropay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "grabpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "ideal_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "india_international_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jcb_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "klarna_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "konbini_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "legacy_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "link_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "oxxo_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "p24_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "paynow_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "promptpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sofort_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_k": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_misc": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "transfers": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "treasury": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_account_ach_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + } + }, + "title": "capabilities_param", + "type": "object" + }, + "company": { + "description": "Information about the company or business. This field is available for any `business_type`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "executives_provided": { + "type": "boolean" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "company_specs", + "type": "object" + }, + "country": { + "description": "The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.", + "maxLength": 5000, + "type": "string" + }, + "default_currency": { + "description": "Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).", + "type": "string" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_license": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_memorandum_of_association": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_ministerial_decree": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_registration_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_tax_id_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_registration": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "documents_specs", + "type": "object" + }, + "email": { + "description": "The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "individual": { + "description": "Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "settings": { + "description": "Options for customizing how the account functions within Stripe.", + "properties": { + "branding": { + "properties": { + "icon": { + "maxLength": 5000, + "type": "string" + }, + "logo": { + "maxLength": 5000, + "type": "string" + }, + "primary_color": { + "maxLength": 5000, + "type": "string" + }, + "secondary_color": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "branding_settings_specs", + "type": "object" + }, + "card_issuing": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "card_issuing_settings_specs", + "type": "object" + }, + "card_payments": { + "properties": { + "decline_on": { + "properties": { + "avs_failure": { + "type": "boolean" + }, + "cvc_failure": { + "type": "boolean" + } + }, + "title": "decline_charge_on_specs", + "type": "object" + }, + "statement_descriptor_prefix": { + "maxLength": 10, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_prefix_kanji": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "card_payments_settings_specs", + "type": "object" + }, + "payments": { + "properties": { + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kanji": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payments_settings_specs", + "type": "object" + }, + "payouts": { + "properties": { + "debit_negative_balances": { + "type": "boolean" + }, + "schedule": { + "properties": { + "delay_days": { + "anyOf": [ + { + "enum": [ + "minimum" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "interval": { + "enum": [ + "daily", + "manual", + "monthly", + "weekly" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "monthly_anchor": { + "type": "integer" + }, + "weekly_anchor": { + "enum": [ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "transfer_schedule_specs", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payout_settings_specs", + "type": "object" + }, + "treasury": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "treasury_settings_specs", + "type": "object" + } + }, + "title": "settings_specs", + "type": "object" + }, + "tos_acceptance": { + "description": "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).", + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "service_agreement": { + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "tos_acceptance_specs", + "type": "object" + }, + "type": { + "description": "The type of Stripe account to create. May be one of `custom`, `express` or `standard`.", + "enum": [ + "custom", + "express", + "standard" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}": { + "delete": { + "description": "

With Connect, you can delete accounts you manage.

\n\n

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

\n\n

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

", + "operationId": "DeleteAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the details of an account.

", + "operationId": "GetAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.

\n\n

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

", + "operationId": "PostAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "capabilities": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + }, + "tos_acceptance": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_token": { + "description": "An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.", + "maxLength": 5000, + "type": "string" + }, + "business_profile": { + "description": "Business information about the account.", + "properties": { + "mcc": { + "maxLength": 4, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 40000, + "type": "string" + }, + "support_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "support_email": { + "type": "string" + }, + "support_phone": { + "maxLength": 5000, + "type": "string" + }, + "support_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "business_profile_specs", + "type": "object" + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "description": "Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.", + "properties": { + "acss_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "affirm_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "afterpay_clearpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "au_becs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bacs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bancontact_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "blik_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "boleto_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cartes_bancaires_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "eps_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "fpx_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "giropay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "grabpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "ideal_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "india_international_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jcb_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "klarna_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "konbini_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "legacy_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "link_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "oxxo_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "p24_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "paynow_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "promptpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sofort_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_k": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_misc": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "transfers": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "treasury": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_account_ach_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + } + }, + "title": "capabilities_param", + "type": "object" + }, + "company": { + "description": "Information about the company or business. This field is available for any `business_type`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "executives_provided": { + "type": "boolean" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "company_specs", + "type": "object" + }, + "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).", + "type": "string" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_license": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_memorandum_of_association": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_ministerial_decree": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_registration_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_tax_id_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_registration": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "documents_specs", + "type": "object" + }, + "email": { + "description": "The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "individual": { + "description": "Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "settings": { + "description": "Options for customizing how the account functions within Stripe.", + "properties": { + "branding": { + "properties": { + "icon": { + "maxLength": 5000, + "type": "string" + }, + "logo": { + "maxLength": 5000, + "type": "string" + }, + "primary_color": { + "maxLength": 5000, + "type": "string" + }, + "secondary_color": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "branding_settings_specs", + "type": "object" + }, + "card_issuing": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "card_issuing_settings_specs", + "type": "object" + }, + "card_payments": { + "properties": { + "decline_on": { + "properties": { + "avs_failure": { + "type": "boolean" + }, + "cvc_failure": { + "type": "boolean" + } + }, + "title": "decline_charge_on_specs", + "type": "object" + }, + "statement_descriptor_prefix": { + "maxLength": 10, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_prefix_kanji": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "card_payments_settings_specs", + "type": "object" + }, + "payments": { + "properties": { + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kanji": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payments_settings_specs", + "type": "object" + }, + "payouts": { + "properties": { + "debit_negative_balances": { + "type": "boolean" + }, + "schedule": { + "properties": { + "delay_days": { + "anyOf": [ + { + "enum": [ + "minimum" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "interval": { + "enum": [ + "daily", + "manual", + "monthly", + "weekly" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "monthly_anchor": { + "type": "integer" + }, + "weekly_anchor": { + "enum": [ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "transfer_schedule_specs", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payout_settings_specs", + "type": "object" + }, + "treasury": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "treasury_settings_specs", + "type": "object" + } + }, + "title": "settings_specs_update", + "type": "object" + }, + "tos_acceptance": { + "description": "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).", + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "service_agreement": { + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "tos_acceptance_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/bank_accounts": { + "post": { + "description": "

Create an external account for a given account.

", + "operationId": "PostAccountsAccountBankAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "default_for_currency": { + "description": "When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/bank_accounts/{id}": { + "delete": { + "description": "

Delete a specified external account for a given account.

", + "operationId": "DeleteAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve a specified external account for a given account.

", + "operationId": "GetAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

\n\n

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

", + "operationId": "PostAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "", + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "default_for_currency": { + "description": "When set to true, this becomes the default external account for its currency.", + "type": "boolean" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/capabilities": { + "get": { + "description": "

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

", + "operationId": "GetAccountsAccountCapabilities", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/capability" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ListAccountCapability", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/capabilities/{capability}": { + "get": { + "description": "

Retrieves information about the specified Account Capability.

", + "operationId": "GetAccountsAccountCapabilitiesCapability", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "capability", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/capability" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing Account Capability.

", + "operationId": "PostAccountsAccountCapabilitiesCapability", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "capability", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "requested": { + "description": "Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/capability" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/external_accounts": { + "get": { + "description": "

List external accounts for an account.

", + "operationId": "GetAccountsAccountExternalAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create an external account for a given account.

", + "operationId": "PostAccountsAccountExternalAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "default_for_currency": { + "description": "When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/external_accounts/{id}": { + "delete": { + "description": "

Delete a specified external account for a given account.

", + "operationId": "DeleteAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve a specified external account for a given account.

", + "operationId": "GetAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

\n\n

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

", + "operationId": "PostAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "", + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "default_for_currency": { + "description": "When set to true, this becomes the default external account for its currency.", + "type": "boolean" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/login_links": { + "post": { + "description": "

Creates a single-use login link for an Express account to access their Stripe dashboard.

\n\n

You may only create login links for Express accounts connected to your platform.

", + "operationId": "PostAccountsAccountLoginLinks", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/login_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/people": { + "get": { + "description": "

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

", + "operationId": "GetAccountsAccountPeople", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filters on the list of people returned based on the person's relationship to the account's company.", + "explode": true, + "in": "query", + "name": "relationship", + "required": false, + "schema": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "representative": { + "type": "boolean" + } + }, + "title": "all_people_relationship_specs", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/person" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PersonList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new person.

", + "operationId": "PostAccountsAccountPeople", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/people/{person}": { + "delete": { + "description": "

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

", + "operationId": "DeleteAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves an existing person.

", + "operationId": "GetAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing person.

", + "operationId": "PostAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/persons": { + "get": { + "description": "

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

", + "operationId": "GetAccountsAccountPersons", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filters on the list of people returned based on the person's relationship to the account's company.", + "explode": true, + "in": "query", + "name": "relationship", + "required": false, + "schema": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "representative": { + "type": "boolean" + } + }, + "title": "all_people_relationship_specs", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/person" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PersonList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new person.

", + "operationId": "PostAccountsAccountPersons", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/persons/{person}": { + "delete": { + "description": "

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

", + "operationId": "DeleteAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves an existing person.

", + "operationId": "GetAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing person.

", + "operationId": "PostAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/reject": { + "post": { + "description": "

With Connect, you may flag accounts as suspicious.

\n\n

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

", + "operationId": "PostAccountsAccountReject", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reason": { + "description": "The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apple_pay/domains": { + "get": { + "description": "

List apple pay domains.

", + "operationId": "GetApplePayDomains", + "parameters": [ + { + "in": "query", + "name": "domain_name", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/apple_pay_domain" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/apple_pay/domains", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApplePayDomainList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create an apple pay domain.

", + "operationId": "PostApplePayDomains", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "domain_name": { + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "domain_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apple_pay/domains/{domain}": { + "delete": { + "description": "

Delete an apple pay domain.

", + "operationId": "DeleteApplePayDomainsDomain", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve an apple pay domain.

", + "operationId": "GetApplePayDomainsDomain", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees": { + "get": { + "description": "

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

", + "operationId": "GetApplicationFees", + "parameters": [ + { + "description": "Only return application fees for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/application_fee" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/application_fees", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PlatformEarningList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{fee}/refunds/{id}": { + "get": { + "description": "

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

", + "operationId": "GetApplicationFeesFeeRefundsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "fee", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request only accepts metadata as an argument.

", + "operationId": "PostApplicationFeesFeeRefundsId", + "parameters": [ + { + "in": "path", + "name": "fee", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}": { + "get": { + "description": "

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

", + "operationId": "GetApplicationFeesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_fee" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}/refund": { + "post": { + "description": "", + "operationId": "PostApplicationFeesIdRefund", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "directive": { + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_fee" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}/refunds": { + "get": { + "description": "

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

", + "operationId": "GetApplicationFeesIdRefunds", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Refunds an application fee that has previously been collected but not yet refunded.\nFunds will be refunded to the Stripe account from which the fee was originally collected.

\n\n

You can optionally refund only part of an application fee.\nYou can do so multiple times, until the entire fee has been refunded.

\n\n

Once entirely refunded, an application fee can’t be refunded again.\nThis method will raise an error when called on an already-refunded application fee,\nor when trying to refund more money than is left on an application fee.

", + "operationId": "PostApplicationFeesIdRefunds", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apps/secrets": { + "get": { + "description": "

List all secrets stored on the given scope.

", + "operationId": "GetAppsSecrets", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "explode": true, + "in": "query", + "name": "scope", + "required": true, + "schema": { + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/apps.secret" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/apps/secrets", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SecretServiceResourceSecretList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create or replace a secret in the secret store.

", + "operationId": "PostAppsSecrets", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "scope": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "type": "integer" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "type": "string" + }, + "scope": { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + } + }, + "required": [ + "name", + "payload", + "scope" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apps/secrets/delete": { + "post": { + "description": "

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

", + "operationId": "PostAppsSecretsDelete", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "scope": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "scope": { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + } + }, + "required": [ + "name", + "scope" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apps/secrets/find": { + "get": { + "description": "

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

", + "operationId": "GetAppsSecretsFind", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A name for the secret that's unique within the scope.", + "in": "query", + "name": "name", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "explode": true, + "in": "query", + "name": "scope", + "required": true, + "schema": { + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance": { + "get": { + "description": "

Retrieves the current account balance, based on the authentication that was used to make the request.\n For a sample request, see Accounting for negative balances.

", + "operationId": "GetBalance", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance/history": { + "get": { + "description": "

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

\n\n

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

", + "operationId": "GetBalanceHistory", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.", + "in": "query", + "name": "payout", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns the original transaction.", + "in": "query", + "name": "source", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/balance_transactions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BalanceTransactionsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance/history/{id}": { + "get": { + "description": "

Retrieves the balance transaction with the given ID.

\n\n

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

", + "operationId": "GetBalanceHistoryId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance_transactions": { + "get": { + "description": "

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

\n\n

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

", + "operationId": "GetBalanceTransactions", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.", + "in": "query", + "name": "payout", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns the original transaction.", + "in": "query", + "name": "source", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/balance_transactions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BalanceTransactionsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance_transactions/{id}": { + "get": { + "description": "

Retrieves the balance transaction with the given ID.

\n\n

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

", + "operationId": "GetBalanceTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/billing_portal/configurations": { + "get": { + "description": "

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

", + "operationId": "GetBillingPortalConfigurations", + "parameters": [ + { + "description": "Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).", + "in": "query", + "name": "is_default", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing_portal.configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing_portal/configurations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PortalConfigurationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostBillingPortalConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "default_return_url": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "login_page": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "business_profile": { + "description": "The business information shown to customers in the portal.", + "properties": { + "headline": { + "maxLength": 60, + "type": "string" + }, + "privacy_policy_url": { + "type": "string" + }, + "terms_of_service_url": { + "type": "string" + } + }, + "title": "business_profile_create_param", + "type": "object" + }, + "default_return_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Information about the features available in the portal.", + "properties": { + "customer_update": { + "properties": { + "allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "customer_update_creation_param", + "type": "object" + }, + "invoice_history": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_list_param", + "type": "object" + }, + "payment_method_update": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_update_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "cancellation_reason": { + "properties": { + "enabled": { + "type": "boolean" + }, + "options": { + "anyOf": [ + { + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "required": [ + "enabled", + "options" + ], + "title": "subscription_cancellation_reason_creation_param", + "type": "object" + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "enum": [ + "at_period_end", + "immediately" + ], + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "enabled" + ], + "title": "subscription_cancel_creation_param", + "type": "object" + }, + "subscription_pause": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "subscription_pause_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "default_allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "products": { + "anyOf": [ + { + "items": { + "properties": { + "prices": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "prices", + "product" + ], + "title": "subscription_update_product_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "default_allowed_updates", + "enabled", + "products" + ], + "title": "subscription_update_creation_param", + "type": "object" + } + }, + "title": "features_creation_param", + "type": "object" + }, + "login_page": { + "description": "The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "login_page_create_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "required": [ + "business_profile", + "features" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/billing_portal/configurations/{configuration}": { + "get": { + "description": "

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

", + "operationId": "GetBillingPortalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostBillingPortalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "default_return_url": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "login_page": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "business_profile": { + "description": "The business information shown to customers in the portal.", + "properties": { + "headline": { + "maxLength": 60, + "type": "string" + }, + "privacy_policy_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "terms_of_service_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "business_profile_update_param", + "type": "object" + }, + "default_return_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Information about the features available in the portal.", + "properties": { + "customer_update": { + "properties": { + "allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + } + }, + "title": "customer_update_updating_param", + "type": "object" + }, + "invoice_history": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_list_param", + "type": "object" + }, + "payment_method_update": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_update_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "cancellation_reason": { + "properties": { + "enabled": { + "type": "boolean" + }, + "options": { + "anyOf": [ + { + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "required": [ + "enabled" + ], + "title": "subscription_cancellation_reason_updating_param", + "type": "object" + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "enum": [ + "at_period_end", + "immediately" + ], + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "title": "subscription_cancel_updating_param", + "type": "object" + }, + "subscription_pause": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "subscription_pause_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "default_allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "products": { + "anyOf": [ + { + "items": { + "properties": { + "prices": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "prices", + "product" + ], + "title": "subscription_update_product_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "title": "subscription_update_updating_param", + "type": "object" + } + }, + "title": "features_updating_param", + "type": "object" + }, + "login_page": { + "description": "The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "login_page_update_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/billing_portal/sessions": { + "post": { + "description": "

Creates a session of the customer portal.

", + "operationId": "PostBillingPortalSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "configuration": { + "description": "The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_data": { + "description": "Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.", + "properties": { + "after_completion": { + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_hosted_confirmation_param", + "type": "object" + }, + "redirect": { + "properties": { + "return_url": { + "type": "string" + } + }, + "required": [ + "return_url" + ], + "title": "after_completion_redirect_param", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "portal_homepage", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "flow_data_after_completion_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "subscription": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "subscription" + ], + "title": "flow_data_subscription_cancel_param", + "type": "object" + }, + "type": { + "enum": [ + "payment_method_update", + "subscription_cancel" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "flow_data_param", + "type": "object" + }, + "locale": { + "description": "The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW" + ], + "type": "string" + }, + "on_behalf_of": { + "description": "The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.", + "type": "string" + }, + "return_url": { + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website.", + "type": "string" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges": { + "get": { + "description": "

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

", + "operationId": "GetCharges", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return charges for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return charges for this transfer group.", + "in": "query", + "name": "transfer_group", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/charge" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/charges", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ChargeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

", + "operationId": "PostCharges", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card": { + "explode": true, + "style": "deepObject" + }, + "destination": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "application_fee": { + "type": "integer" + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees).", + "type": "integer" + }, + "capture": { + "description": "Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.", + "type": "boolean" + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer that will be charged in this request.", + "maxLength": 500, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.", + "maxLength": 40000, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "amount": { + "type": "integer" + } + }, + "required": [ + "account" + ], + "title": "destination_specs", + "type": "object" + }, + { + "type": "string" + } + ] + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "description": "The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of).", + "maxLength": 5000, + "type": "string" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "receipt_email": { + "description": "The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).", + "type": "string" + }, + "shipping": { + "description": "Shipping information for the charge. Helps prevent fraud on charges for physical goods.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + "source": { + "description": "A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options).", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/search": { + "get": { + "description": "

Search for charges you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetChargesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/charge" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}": { + "get": { + "description": "

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

", + "operationId": "GetChargesCharge", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostChargesCharge", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fraud_details": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fraud_details": { + "description": "A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.", + "properties": { + "user_report": { + "enum": [ + "", + "fraudulent", + "safe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "user_report" + ], + "title": "fraud_details", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "description": "Shipping information for the charge. Helps prevent fraud on charges for physical goods.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/capture": { + "post": { + "description": "

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

\n\n

Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

", + "operationId": "PostChargesChargeCapture", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.", + "type": "integer" + }, + "application_fee": { + "description": "An application fee to add on to this charge.", + "type": "integer" + }, + "application_fee_amount": { + "description": "An application fee amount to add on to this charge, which must be less than or equal to the original amount.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "receipt_email": { + "description": "The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.", + "type": "string" + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_specs", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/dispute": { + "get": { + "description": "

Retrieve a dispute for a specified charge.

", + "operationId": "GetChargesChargeDispute", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "", + "operationId": "PostChargesChargeDispute", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "evidence": { + "description": "Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.", + "properties": { + "access_activity_log": { + "maxLength": 20000, + "type": "string" + }, + "billing_address": { + "maxLength": 5000, + "type": "string" + }, + "cancellation_policy": { + "type": "string" + }, + "cancellation_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "cancellation_rebuttal": { + "maxLength": 20000, + "type": "string" + }, + "customer_communication": { + "type": "string" + }, + "customer_email_address": { + "maxLength": 5000, + "type": "string" + }, + "customer_name": { + "maxLength": 5000, + "type": "string" + }, + "customer_purchase_ip": { + "maxLength": 5000, + "type": "string" + }, + "customer_signature": { + "type": "string" + }, + "duplicate_charge_documentation": { + "type": "string" + }, + "duplicate_charge_explanation": { + "maxLength": 20000, + "type": "string" + }, + "duplicate_charge_id": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 20000, + "type": "string" + }, + "receipt": { + "type": "string" + }, + "refund_policy": { + "type": "string" + }, + "refund_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "refund_refusal_explanation": { + "maxLength": 20000, + "type": "string" + }, + "service_date": { + "maxLength": 5000, + "type": "string" + }, + "service_documentation": { + "type": "string" + }, + "shipping_address": { + "maxLength": 5000, + "type": "string" + }, + "shipping_carrier": { + "maxLength": 5000, + "type": "string" + }, + "shipping_date": { + "maxLength": 5000, + "type": "string" + }, + "shipping_documentation": { + "type": "string" + }, + "shipping_tracking_number": { + "maxLength": 5000, + "type": "string" + }, + "uncategorized_file": { + "type": "string" + }, + "uncategorized_text": { + "maxLength": 20000, + "type": "string" + } + }, + "title": "dispute_evidence_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "submit": { + "description": "Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/dispute/close": { + "post": { + "description": "", + "operationId": "PostChargesChargeDisputeClose", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refund": { + "post": { + "description": "

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

\n\n

Creating a new refund will refund a charge that has previously been created but not yet refunded.\nFunds will be refunded to the credit or debit card that was originally charged.

\n\n

You can optionally refund only part of a charge.\nYou can do so multiple times, until the entire charge has been refunded.

\n\n

Once entirely refunded, a charge can’t be refunded again.\nThis method will raise an error when called on an already-refunded charge,\nor when trying to refund more money than is left on a charge.

", + "operationId": "PostChargesChargeRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_intent": { + "maxLength": 5000, + "type": "string" + }, + "reason": { + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "type": "boolean" + }, + "reverse_transfer": { + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refunds": { + "get": { + "description": "

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

", + "operationId": "GetChargesChargeRefunds", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create a refund.

", + "operationId": "PostChargesChargeRefunds", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to refund.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "Customer whose customer balance to refund from.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "Address to send refund email, use customer email if not specified", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "origin": { + "description": "Origin of the refund", + "enum": [ + "customer_balance" + ], + "type": "string" + }, + "payment_intent": { + "maxLength": 5000, + "type": "string" + }, + "reason": { + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "type": "boolean" + }, + "reverse_transfer": { + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refunds/{refund}": { + "get": { + "description": "

Retrieves the details of an existing refund.

", + "operationId": "GetChargesChargeRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified refund.

", + "operationId": "PostChargesChargeRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions": { + "get": { + "description": "

Returns a list of Checkout Sessions.

", + "operationId": "GetCheckoutSessions", + "parameters": [ + { + "description": "Only return the Checkout Sessions for the Customer specified.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions for the Customer details specified.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "email": { + "type": "string" + } + }, + "required": [ + "email" + ], + "title": "customer_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Session for the PaymentIntent specified.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions for the Payment Link specified.", + "in": "query", + "name": "payment_link", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Session for the subscription specified.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/checkout.session" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a Session object.

", + "operationId": "PostCheckoutSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_expiration": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "consent_collection": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "customer_update": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "setup_intent_data": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_options": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "after_expiration": { + "description": "Configure actions after a Checkout Session has expired.", + "properties": { + "recovery": { + "properties": { + "allow_promotion_codes": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "recovery_params", + "type": "object" + } + }, + "title": "after_expiration_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Specify whether Checkout should collect the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "type": "string" + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nsession with your internal systems.", + "maxLength": 200, + "type": "string" + }, + "consent_collection": { + "description": "Configure fields for the Checkout Session to gather active consent from customers.", + "properties": { + "promotions": { + "enum": [ + "auto", + "none" + ], + "type": "string" + }, + "terms_of_service": { + "enum": [ + "none", + "required" + ], + "type": "string" + } + }, + "title": "consent_collection_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "custom", + "type" + ], + "title": "custom_field_label_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "type": { + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "type" + ], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer": { + "description": "ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card\npayment method will be used to prefill the email, name, card details, and billing address\non the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)\nwill be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.\n\nIf the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.\nIf the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.\n\nIf blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow.\n\nYou can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.", + "maxLength": 5000, + "type": "string" + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.\n\nWhen a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout\nwith [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).\n\nSessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)\nin the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.\n\nCan only be set in `payment` and `setup` mode.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once a session is\ncomplete, use the `customer` field.", + "type": "string" + }, + "customer_update": { + "description": "Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.", + "properties": { + "address": { + "enum": [ + "auto", + "never" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "name": { + "enum": [ + "auto", + "never" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "enum": [ + "auto", + "never" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "customer_update_params", + "type": "object" + }, + "discounts": { + "description": "The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.", + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discount_params", + "type": "object" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.", + "format": "unix-time", + "type": "integer" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "invoice_data_params", + "type": "object" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_creation_params", + "type": "object" + }, + "line_items": { + "description": "A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).\n\nFor `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.\n\nFor `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "adjustable_quantity_params", + "type": "object" + }, + "dynamic_tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "properties": { + "description": { + "maxLength": 40000, + "type": "string" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "product_data", + "type": "object" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency" + ], + "title": "price_data_with_product_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "line_item_params", + "type": "object" + }, + "type": "array" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "mode": { + "description": "The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.", + "enum": [ + "payment", + "setup", + "subscription" + ], + "type": "string" + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "application_fee_amount": { + "type": "integer" + }, + "capture_method": { + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "receipt_email": { + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "line1" + ], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "shipping", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_params", + "type": "object" + }, + "transfer_group": { + "type": "string" + } + }, + "title": "payment_intent_data_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.\nThis may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "affirm": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "alipay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "bancontact": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "boleto": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "installments_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "maxLength": 17, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "customer_balance": { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "eps": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "fpx": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "giropay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "grabpay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "ideal": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "klarna": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "konbini": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "oxxo": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "p24": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "paynow": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "pix": { + "properties": { + "expires_after_seconds": { + "type": "integer" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sofort": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "wechat_pay": { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.\n\nIn `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).\nIt is required in `setup` mode.\n\nRead more about the supported payment methods and their requirements in our [payment\nmethod details guide](/docs/payments/checkout/payment-methods).\n\nIf multiple payment methods are passed, Checkout will dynamically reorder them to\nprioritize the most relevant payment methods based on the customer's location and\nother characteristics.", + "items": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "phone_number_collection": { + "description": "Controls phone number collection settings for the session.\n\nWe recommend that you review your privacy policy and check with your legal contacts\nbefore using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "phone_number_collection_params", + "type": "object" + }, + "setup_intent_data": { + "description": "A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.", + "properties": { + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + } + }, + "title": "setup_intent_data_param", + "type": "object" + }, + "shipping_address_collection": { + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer.", + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "shipping_address_collection_params", + "type": "object" + }, + "shipping_options": { + "description": "The shipping rate options to apply to this Session.", + "items": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_option_params", + "type": "object" + }, + "type": "array" + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "description": "A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "default_tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "format": "unix-time", + "type": "integer" + }, + "trial_period_days": { + "type": "integer" + }, + "trial_settings": { + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "title": "subscription_data_params", + "type": "object" + }, + "success_url": { + "description": "The URL to which Stripe should send customers when payment or setup\nis complete.\nIf you’d like to use information from the successful Checkout Session on your page,\nread the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "description": "Controls tax ID collection settings for the session.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "tax_id_collection_params", + "type": "object" + } + }, + "required": [ + "success_url" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions/{session}": { + "get": { + "description": "

Retrieves a Session object.

", + "operationId": "GetCheckoutSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 66, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions/{session}/expire": { + "post": { + "description": "

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

\n\n

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

", + "operationId": "PostCheckoutSessionsSessionExpire", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions/{session}/line_items": { + "get": { + "description": "

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetCheckoutSessionsSessionLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/country_specs": { + "get": { + "description": "

Lists all Country Spec objects available in the API.

", + "operationId": "GetCountrySpecs", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/country_spec" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/country_specs", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CountrySpecList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/country_specs/{country}": { + "get": { + "description": "

Returns a Country Spec for a given Country code.

", + "operationId": "GetCountrySpecsCountry", + "parameters": [ + { + "in": "path", + "name": "country", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/country_spec" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/coupons": { + "get": { + "description": "

Returns a list of your coupons.

", + "operationId": "GetCoupons", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/coupon" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/coupons", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CouponsResourceCouponList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

\n\n

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

", + "operationId": "PostCoupons", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "applies_to": { + "explode": true, + "style": "deepObject" + }, + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_off": { + "description": "A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).", + "type": "integer" + }, + "applies_to": { + "description": "A hash containing directions for what this Coupon will apply discounts to.", + "properties": { + "products": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "applies_to_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount_off": { + "type": "integer" + } + }, + "required": [ + "amount_off" + ], + "title": "currency_option", + "type": "object" + }, + "description": "Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.", + "maxLength": 5000, + "type": "string" + }, + "max_redemptions": { + "description": "A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.", + "maxLength": 40, + "type": "string" + }, + "percent_off": { + "description": "A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).", + "type": "number" + }, + "redeem_by": { + "description": "Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/coupons/{coupon}": { + "delete": { + "description": "

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

", + "operationId": "DeleteCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the coupon with the given ID.

", + "operationId": "GetCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "amount_off": { + "type": "integer" + } + }, + "required": [ + "amount_off" + ], + "title": "currency_option", + "type": "object" + }, + "description": "Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.", + "maxLength": 40, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes": { + "get": { + "description": "

Returns a list of credit notes.

", + "operationId": "GetCreditNotes", + "parameters": [ + { + "description": "Only return credit notes for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return credit notes for the invoice specified by this invoice ID.", + "in": "query", + "name": "invoice", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/credit_note" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNotesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n
    \n
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • \n
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • \n
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • \n
\n\n

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

\n\n

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

", + "operationId": "PostCreditNotes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "lines": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "type": "integer" + }, + "credit_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice": { + "description": "ID of the invoice.", + "maxLength": 5000, + "type": "string" + }, + "lines": { + "description": "Line items that make up the credit note.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "type": { + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "memo": { + "description": "The credit note's memo appears on the credit note PDF.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "out_of_band_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "type": "integer" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "refund": { + "description": "ID of an existing refund to link this credit note to.", + "type": "string" + }, + "refund_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "type": "integer" + }, + "shipping_cost": { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + } + }, + "required": [ + "invoice" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/preview": { + "get": { + "description": "

Get a preview of a credit note without creating it.

", + "operationId": "GetCreditNotesPreview", + "parameters": [ + { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "in": "query", + "name": "amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "in": "query", + "name": "credit_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "ID of the invoice.", + "in": "query", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Line items that make up the credit note.", + "explode": true, + "in": "query", + "name": "lines", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "type": { + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The credit note's memo appears on the credit note PDF.", + "in": "query", + "name": "memo", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "explode": true, + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "in": "query", + "name": "out_of_band_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "in": "query", + "name": "reason", + "required": false, + "schema": { + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "ID of an existing refund to link this credit note to.", + "in": "query", + "name": "refund", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "in": "query", + "name": "refund_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "explode": true, + "in": "query", + "name": "shipping_cost", + "required": false, + "schema": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/preview/lines": { + "get": { + "description": "

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

", + "operationId": "GetCreditNotesPreviewLines", + "parameters": [ + { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "in": "query", + "name": "amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "in": "query", + "name": "credit_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "ID of the invoice.", + "in": "query", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Line items that make up the credit note.", + "explode": true, + "in": "query", + "name": "lines", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "type": { + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The credit note's memo appears on the credit note PDF.", + "in": "query", + "name": "memo", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "explode": true, + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "in": "query", + "name": "out_of_band_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "in": "query", + "name": "reason", + "required": false, + "schema": { + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "ID of an existing refund to link this credit note to.", + "in": "query", + "name": "refund", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "in": "query", + "name": "refund_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "explode": true, + "in": "query", + "name": "shipping_cost", + "required": false, + "schema": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/{credit_note}/lines": { + "get": { + "description": "

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetCreditNotesCreditNoteLines", + "parameters": [ + { + "in": "path", + "name": "credit_note", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/{id}": { + "get": { + "description": "

Retrieves the credit note object with the given identifier.

", + "operationId": "GetCreditNotesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing credit note.

", + "operationId": "PostCreditNotesId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "memo": { + "description": "Credit note memo.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/{id}/void": { + "post": { + "description": "

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

", + "operationId": "PostCreditNotesIdVoid", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers": { + "get": { + "description": "

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

", + "operationId": "GetCustomers", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.", + "in": "query", + "name": "email", + "required": false, + "schema": { + "maxLength": 512, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/customer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/customers", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerResourceCustomerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new customer object.

", + "operationId": "PostCustomers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "cash_balance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "tax": { + "explode": true, + "style": "deepObject" + }, + "tax_id_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.", + "type": "integer" + }, + "cash_balance": { + "description": "Balance information and default balance settings for this customer.", + "properties": { + "settings": { + "properties": { + "reconciliation_mode": { + "enum": [ + "automatic", + "manual", + "merchant_default" + ], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "title": "cash_balance_param", + "type": "object" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "email": { + "description": "Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.", + "maxLength": 512, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "description": "Default invoice settings for this customer.", + "properties": { + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "customer_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 256, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The sequence to be used on the customer's next invoice. Defaults to 1.", + "type": "integer" + }, + "payment_method": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 20, + "type": "string" + }, + "preferred_locales": { + "description": "Customer's preferred languages, ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's shipping information. Appears on invoices emailed to this customer." + }, + "source": { + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "tax": { + "description": "Tax details about the customer.", + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "description": "The customer's tax exemption. One of `none`, `exempt`, or `reverse`.", + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + }, + "tax_id_data": { + "description": "The customer's tax IDs.", + "items": { + "properties": { + "type": { + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + }, + "test_clock": { + "description": "ID of the test clock to attach to the customer.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/search": { + "get": { + "description": "

Search for customers you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetCustomersSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/customer" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}": { + "delete": { + "description": "

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

", + "operationId": "DeleteCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Customer object.

", + "operationId": "GetCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

\n\n

This request accepts mostly the same arguments as the customer creation call.

", + "operationId": "PostCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cash_balance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "tax": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.", + "type": "integer" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "cash_balance": { + "description": "Balance information and default balance settings for this customer.", + "properties": { + "settings": { + "properties": { + "reconciliation_mode": { + "enum": [ + "automatic", + "manual", + "merchant_default" + ], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "title": "cash_balance_param", + "type": "object" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_alipay_account": { + "description": "ID of Alipay account to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_bank_account": { + "description": "ID of bank account to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_card": { + "description": "ID of card to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_source": { + "description": "If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.\n\nProvide the ID of a payment source already attached to this customer to make it this customer's default payment source.\n\nIf you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.", + "maxLength": 500, + "type": "string" + }, + "description": { + "description": "An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "email": { + "description": "Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.", + "maxLength": 512, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "description": "Default invoice settings for this customer.", + "properties": { + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "customer_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 256, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The sequence to be used on the customer's next invoice. Defaults to 1.", + "type": "integer" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 20, + "type": "string" + }, + "preferred_locales": { + "description": "Customer's preferred languages, ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's shipping information. Appears on invoices emailed to this customer." + }, + "source": { + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "tax": { + "description": "Tax details about the customer.", + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "description": "The customer's tax exemption. One of `none`, `exempt`, or `reverse`.", + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/balance_transactions": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/customer_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerBalanceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostCustomersCustomerBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 350, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/balance_transactions/{transaction}": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostCustomersCustomerBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 350, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts": { + "get": { + "deprecated": true, + "description": "

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

", + "operationId": "GetCustomersCustomerBankAccounts", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/bank_account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerBankAccounts", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "deprecated": true, + "description": "

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

", + "operationId": "GetCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts/{id}/verify": { + "post": { + "description": "

Verify a specified bank account for a given customer.

", + "operationId": "PostCustomersCustomerBankAccountsIdVerify", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cards": { + "get": { + "deprecated": true, + "description": "

You can see a list of the cards belonging to a customer.\nNote that the 10 most recent sources are always available on the Customer object.\nIf you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

", + "operationId": "GetCustomersCustomerCards", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/card" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CardList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerCards", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cards/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "deprecated": true, + "description": "

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

", + "operationId": "GetCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance": { + "get": { + "description": "

Retrieves a customer’s cash balance.

", + "operationId": "GetCustomersCustomerCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cash_balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Changes the settings on a customer’s cash balance.

", + "operationId": "PostCustomersCustomerCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "settings": { + "description": "A hash of settings for this cash balance.", + "properties": { + "reconciliation_mode": { + "enum": [ + "automatic", + "manual", + "merchant_default" + ], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cash_balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance_transactions": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerCashBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerCashBalanceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance_transactions/{transaction}": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerCashBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a customer.

", + "operationId": "DeleteCustomersCustomerDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "", + "operationId": "GetCustomersCustomerDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/funding_instructions": { + "post": { + "description": "

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new\nfunding instructions will be created. If funding instructions have already been created for a given customer, the same\nfunding instructions will be retrieved. In other words, we will return the same funding instructions each time.

", + "operationId": "PostCustomersCustomerFundingInstructions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_transfer": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_transfer": { + "description": "Additional parameters for `bank_transfer` funding types", + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_account_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "funding_type": { + "description": "The `funding_type` to get the instructions for.", + "enum": [ + "bank_transfer" + ], + "type": "string" + } + }, + "required": [ + "bank_transfer", + "currency", + "funding_type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/funding_instructions" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/payment_methods": { + "get": { + "description": "

Returns a list of PaymentMethods for a given Customer

", + "operationId": "GetCustomersCustomerPaymentMethods", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerPaymentMethodResourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/payment_methods/{payment_method}": { + "get": { + "description": "

Retrieves a PaymentMethod object for a given Customer.

", + "operationId": "GetCustomersCustomerPaymentMethodsPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources": { + "get": { + "description": "

List sources for a specified customer.

", + "operationId": "GetCustomersCustomerSources", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter sources according to a particular object type.", + "in": "query", + "name": "object", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerSources", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve a specified source for a given customer.

", + "operationId": "GetCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources/{id}/verify": { + "post": { + "description": "

Verify a specified bank account for a given customer.

", + "operationId": "PostCustomersCustomerSourcesIdVerify", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/subscriptions": { + "get": { + "description": "

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

", + "operationId": "GetCustomersCustomerSubscriptions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new subscription on an existing customer.

", + "operationId": "PostCustomersCustomerSubscriptions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "backdate_start_date": { + "description": "For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor": { + "description": "A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "type": "integer", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.", + "format": "unix-time", + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "payment_behavior": { + "description": "Only applies to subscriptions with `collection_method=charge_automatically`.\n\nUse `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state.\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.\n\n`pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.\n\nSubscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.", + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "integer" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/subscriptions/{subscription_exposed_id}": { + "delete": { + "description": "

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

\n\n

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

\n\n

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

", + "operationId": "DeleteCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.", + "type": "boolean" + }, + "prorate": { + "description": "Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the subscription with the given ID.

", + "operationId": "GetCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

", + "operationId": "PostCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "cancel_at": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pause_collection": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "pause_collection": { + "anyOf": [ + { + "properties": { + "behavior": { + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "behavior" + ], + "title": "pause_collection_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value." + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a customer.

", + "operationId": "DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "", + "operationId": "GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/tax_ids": { + "get": { + "description": "

Returns a list of tax IDs for a customer.

", + "operationId": "GetCustomersCustomerTaxIds", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new TaxID object for a customer.

", + "operationId": "PostCustomersCustomerTaxIds", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "description": "Value of the tax ID.", + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/tax_ids/{id}": { + "delete": { + "description": "

Deletes an existing TaxID object.

", + "operationId": "DeleteCustomersCustomerTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the TaxID object with the given identifier.

", + "operationId": "GetCustomersCustomerTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/disputes": { + "get": { + "description": "

Returns a list of your disputes.

", + "operationId": "GetDisputes", + "parameters": [ + { + "description": "Only return disputes associated to the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/dispute" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/disputes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "DisputeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/disputes/{dispute}": { + "get": { + "description": "

Retrieves the dispute with the given ID.

", + "operationId": "GetDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

\n\n

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

", + "operationId": "PostDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "evidence": { + "description": "Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.", + "properties": { + "access_activity_log": { + "maxLength": 20000, + "type": "string" + }, + "billing_address": { + "maxLength": 5000, + "type": "string" + }, + "cancellation_policy": { + "type": "string" + }, + "cancellation_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "cancellation_rebuttal": { + "maxLength": 20000, + "type": "string" + }, + "customer_communication": { + "type": "string" + }, + "customer_email_address": { + "maxLength": 5000, + "type": "string" + }, + "customer_name": { + "maxLength": 5000, + "type": "string" + }, + "customer_purchase_ip": { + "maxLength": 5000, + "type": "string" + }, + "customer_signature": { + "type": "string" + }, + "duplicate_charge_documentation": { + "type": "string" + }, + "duplicate_charge_explanation": { + "maxLength": 20000, + "type": "string" + }, + "duplicate_charge_id": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 20000, + "type": "string" + }, + "receipt": { + "type": "string" + }, + "refund_policy": { + "type": "string" + }, + "refund_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "refund_refusal_explanation": { + "maxLength": 20000, + "type": "string" + }, + "service_date": { + "maxLength": 5000, + "type": "string" + }, + "service_documentation": { + "type": "string" + }, + "shipping_address": { + "maxLength": 5000, + "type": "string" + }, + "shipping_carrier": { + "maxLength": 5000, + "type": "string" + }, + "shipping_date": { + "maxLength": 5000, + "type": "string" + }, + "shipping_documentation": { + "type": "string" + }, + "shipping_tracking_number": { + "maxLength": 5000, + "type": "string" + }, + "uncategorized_file": { + "type": "string" + }, + "uncategorized_text": { + "maxLength": 20000, + "type": "string" + } + }, + "title": "dispute_evidence_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "submit": { + "description": "Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/disputes/{dispute}/close": { + "post": { + "description": "

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

\n\n

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

", + "operationId": "PostDisputesDisputeClose", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/ephemeral_keys": { + "post": { + "description": "

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

", + "operationId": "PostEphemeralKeys", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of the Customer you'd like to modify using the resulting ephemeral key.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "issuing_card": { + "description": "The ID of the Issuing Card you'd like to access using the resulting ephemeral key.", + "maxLength": 5000, + "type": "string" + }, + "verification_session": { + "description": "The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ephemeral_key" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/ephemeral_keys/{key}": { + "delete": { + "description": "

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

", + "operationId": "DeleteEphemeralKeysKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ephemeral_key" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/events": { + "get": { + "description": "

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

", + "operationId": "GetEvents", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.", + "in": "query", + "name": "delivery_success", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.", + "explode": true, + "in": "query", + "name": "types", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/event" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/events", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "NotificationEventList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/events/{id}": { + "get": { + "description": "

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

", + "operationId": "GetEventsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/event" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/exchange_rates": { + "get": { + "description": "

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

", + "operationId": "GetExchangeRates", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/exchange_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/exchange_rates", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExchangeRateList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/exchange_rates/{rate_id}": { + "get": { + "description": "

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

", + "operationId": "GetExchangeRatesRateId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "rate_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/exchange_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/file_links": { + "get": { + "description": "

Returns a list of file links.

", + "operationId": "GetFileLinks", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Filter links by their expiration status. By default, all links are returned.", + "in": "query", + "name": "expired", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return links for the given file.", + "in": "query", + "name": "file", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileLinkList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new file link object.

", + "operationId": "PostFileLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp after which the link will no longer be usable.", + "format": "unix-time", + "type": "integer" + }, + "file": { + "description": "The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/file_links/{link}": { + "get": { + "description": "

Retrieves the file link with the given ID.

", + "operationId": "GetFileLinksLink", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "link", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostFileLinksLink", + "parameters": [ + { + "in": "path", + "name": "link", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "expires_at": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/files": { + "get": { + "description": "

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

", + "operationId": "GetFiles", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The file purpose to filter queries by. If none is provided, files will not be filtered by purpose.", + "in": "query", + "name": "purpose", + "required": false, + "schema": { + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/file" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/files", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

\n\n

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

", + "operationId": "PostFiles", + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "file_link_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "file": { + "description": "A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol).", + "type": "string" + }, + "file_link_data": { + "description": "Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.", + "properties": { + "create": { + "type": "boolean" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "required": [ + "create" + ], + "title": "file_link_creation_params", + "type": "object" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "identity_document", + "pci_document", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "file", + "purpose" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "servers": [ + { + "url": "https://files.stripe.com/" + } + ] + } + }, + "/v1/files/{file}": { + "get": { + "description": "

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

", + "operationId": "GetFilesFile", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "file", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts": { + "get": { + "description": "

Returns a list of Financial Connections Account objects.

", + "operationId": "GetFinancialConnectionsAccounts", + "parameters": [ + { + "description": "If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.", + "explode": true, + "in": "query", + "name": "account_holder", + "required": false, + "schema": { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "accountholder_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If present, only return accounts that were collected as part of the given session.", + "in": "query", + "name": "session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}": { + "get": { + "description": "

Retrieves the details of an Financial Connections Account.

", + "operationId": "GetFinancialConnectionsAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}/disconnect": { + "post": { + "description": "

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

", + "operationId": "PostFinancialConnectionsAccountsAccountDisconnect", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}/owners": { + "get": { + "description": "

Lists all owners for a given Account

", + "operationId": "GetFinancialConnectionsAccountsAccountOwners", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ID of the ownership object to fetch owners from.", + "in": "query", + "name": "ownership", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}/refresh": { + "post": { + "description": "

Refreshes the data associated with a Financial Connections Account.

", + "operationId": "PostFinancialConnectionsAccountsAccountRefresh", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features that you would like to refresh.", + "items": { + "enum": [ + "balance", + "ownership" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": [ + "features" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/sessions": { + "post": { + "description": "

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

", + "operationId": "PostFinancialConnectionsSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_holder": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "filters": { + "explode": true, + "style": "deepObject" + }, + "permissions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder": { + "description": "The account holder to link accounts for.", + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "account", + "customer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "accountholder_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "filters": { + "description": "Filters to restrict the kinds of accounts to collect.", + "properties": { + "countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "countries" + ], + "title": "filters_params", + "type": "object" + }, + "permissions": { + "description": "List of data features that you would like to request access to.\n\nPossible values are `balances`, `transactions`, `ownership`, and `payment_method`.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder", + "permissions" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/sessions/{session}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Session

", + "operationId": "GetFinancialConnectionsSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_reports": { + "get": { + "description": "

List all verification reports.

", + "operationId": "GetIdentityVerificationReports", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationReports of this type", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.", + "in": "query", + "name": "verification_session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/identity.verification_report" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/identity/verification_reports", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "GelatoVerificationReportList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_reports/{report}": { + "get": { + "description": "

Retrieves an existing VerificationReport

", + "operationId": "GetIdentityVerificationReportsReport", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_report" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions": { + "get": { + "description": "

Returns a list of VerificationSessions

", + "operationId": "GetIdentityVerificationSessions", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "processing", + "requires_input", + "verified" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/identity.verification_session" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/identity/verification_sessions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "GelatoVerificationSessionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a VerificationSession object.

\n\n

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

\n\n

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

\n\n

Related guide: Verify your users’ identity documents.

", + "operationId": "PostIdentityVerificationSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "options": { + "description": "A set of options for the session’s verification checks.", + "properties": { + "document": { + "anyOf": [ + { + "properties": { + "allowed_types": { + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "type": "boolean" + }, + "require_live_capture": { + "type": "boolean" + }, + "require_matching_selfie": { + "type": "boolean" + } + }, + "title": "document_options", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "session_options_param", + "type": "object" + }, + "return_url": { + "description": "The URL that the user will be redirected to upon completing the verification flow.", + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions/{session}": { + "get": { + "description": "

Retrieves the details of a VerificationSession that was previously created.

\n\n

When the session status is requires_input, you can use this method to retrieve a valid\nclient_secret or url to allow re-submission.

", + "operationId": "GetIdentityVerificationSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a VerificationSession object.

\n\n

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

", + "operationId": "PostIdentityVerificationSessionsSession", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "options": { + "description": "A set of options for the session’s verification checks.", + "properties": { + "document": { + "anyOf": [ + { + "properties": { + "allowed_types": { + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "type": "boolean" + }, + "require_live_capture": { + "type": "boolean" + }, + "require_matching_selfie": { + "type": "boolean" + } + }, + "title": "document_options", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "session_options_param", + "type": "object" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions/{session}/cancel": { + "post": { + "description": "

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

\n\n

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

", + "operationId": "PostIdentityVerificationSessionsSessionCancel", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions/{session}/redact": { + "post": { + "description": "

Redact a VerificationSession to remove all collected information from Stripe. This will redact\nthe VerificationSession and all objects related to it, including VerificationReports, Events,\nrequest logs, etc.

\n\n

A VerificationSession object can be redacted when it is in requires_input or verified\nstatus. Redacting a VerificationSession in requires_action\nstate will automatically cancel it.

\n\n

The redaction process may take up to four days. When the redaction process is in progress, the\nVerificationSession’s redaction.status field will be set to processing; when the process is\nfinished, it will change to redacted and an identity.verification_session.redacted event\nwill be emitted.

\n\n

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the\nfields that contain personal data will be replaced by the string [redacted] or a similar\nplaceholder. The metadata field will also be erased. Redacted objects cannot be updated or\nused for any purpose.

\n\n

Learn more.

", + "operationId": "PostIdentityVerificationSessionsSessionRedact", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoiceitems": { + "get": { + "description": "

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

", + "operationId": "GetInvoiceitems", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.", + "in": "query", + "name": "invoice", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.", + "in": "query", + "name": "pending", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoiceitem" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/invoiceitems", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoicesItemsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

", + "operationId": "PostInvoiceitems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the invoice item or invoice line item." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice": { + "description": "The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the invoice item.", + "type": "integer" + }, + "subscription": { + "description": "The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "tax_rates": { + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "unit_amount": { + "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoiceitems/{invoiceitem}": { + "delete": { + "description": "

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

", + "operationId": "DeleteInvoiceitemsInvoiceitem", + "parameters": [ + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the invoice item with the given ID.

", + "operationId": "GetInvoiceitemsInvoiceitem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

", + "operationId": "PostInvoiceitemsInvoiceitem", + "parameters": [ + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the invoice item.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates." + }, + "unit_amount": { + "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices": { + "get": { + "description": "

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

", + "operationId": "GetInvoices", + "parameters": [ + { + "description": "The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.", + "in": "query", + "name": "collection_method", + "required": false, + "schema": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return invoices for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "due_date", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "draft", + "open", + "paid", + "uncollectible", + "void" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return invoices for the subscription specified by this subscription ID.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoice" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/invoices", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoicesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostInvoices", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_tax_ids": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "from_invoice": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "rendering_options": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + }, + "shipping_details": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft." + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).", + "type": "integer" + }, + "auto_advance": { + "description": "Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "currency": { + "description": "The currency to create this invoice in. Defaults to that of `customer` if not specified.", + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of up to 4 custom fields to be displayed on the invoice." + }, + "customer": { + "description": "The ID of the customer who will be billed.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 1500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts." + }, + "due_date": { + "description": "The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.", + "format": "unix-time", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": "string" + }, + "from_invoice": { + "description": "Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.", + "properties": { + "action": { + "enum": [ + "revision" + ], + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "action", + "invoice" + ], + "title": "from_invoice", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "type": "string" + }, + "payment_settings": { + "description": "Configuration settings for the PaymentIntent that is generated when the invoice is finalized.", + "properties": { + "default_mandate": { + "maxLength": 5000, + "type": "string" + }, + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_items_behavior": { + "description": "How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted.", + "enum": [ + "exclude", + "include", + "include_and_require" + ], + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "description": "Settings for the cost of shipping for this invoice.", + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_cost", + "type": "object" + }, + "shipping_details": { + "description": "Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + }, + "statement_descriptor": { + "description": "Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.", + "maxLength": 22, + "type": "string" + }, + "subscription": { + "description": "The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.", + "maxLength": 5000, + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/search": { + "get": { + "description": "

Search for invoices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetInvoicesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoice" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/upcoming": { + "get": { + "description": "

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

\n\n

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

\n\n

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

", + "operationId": "GetInvoicesUpcoming", + "parameters": [ + { + "description": "Settings for automatic tax lookup for this invoice preview.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Details about the customer you want to invoice or overrides for an existing customer.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.", + "explode": true, + "in": "query", + "name": "discounts", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "List of invoice items to add or update in the upcoming invoice preview.", + "explode": true, + "in": "query", + "name": "invoice_items", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "in": "query", + "name": "schedule", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.", + "explode": true, + "in": "query", + "name": "subscription_billing_cycle_anchor", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.", + "explode": true, + "in": "query", + "name": "subscription_cancel_at", + "required": false, + "schema": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "in": "query", + "name": "subscription_cancel_at_period_end", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "This simulates the subscription being canceled or expired immediately.", + "in": "query", + "name": "subscription_cancel_now", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.", + "explode": true, + "in": "query", + "name": "subscription_default_tax_rates", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A list of up to 20 subscription items, each with an attached price.", + "explode": true, + "in": "query", + "name": "subscription_items", + "required": false, + "schema": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "in": "query", + "name": "subscription_proration_behavior", + "required": false, + "schema": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.", + "in": "query", + "name": "subscription_proration_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.", + "in": "query", + "name": "subscription_resume_at", + "required": false, + "schema": { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Date a subscription is intended to start (can be future or past)", + "in": "query", + "name": "subscription_start_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.", + "explode": true, + "in": "query", + "name": "subscription_trial_end", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "in": "query", + "name": "subscription_trial_from_plan", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/upcoming/lines": { + "get": { + "description": "

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetInvoicesUpcomingLines", + "parameters": [ + { + "description": "Settings for automatic tax lookup for this invoice preview.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Details about the customer you want to invoice or overrides for an existing customer.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.", + "explode": true, + "in": "query", + "name": "discounts", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "List of invoice items to add or update in the upcoming invoice preview.", + "explode": true, + "in": "query", + "name": "invoice_items", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "in": "query", + "name": "schedule", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.", + "explode": true, + "in": "query", + "name": "subscription_billing_cycle_anchor", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.", + "explode": true, + "in": "query", + "name": "subscription_cancel_at", + "required": false, + "schema": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "in": "query", + "name": "subscription_cancel_at_period_end", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "This simulates the subscription being canceled or expired immediately.", + "in": "query", + "name": "subscription_cancel_now", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.", + "explode": true, + "in": "query", + "name": "subscription_default_tax_rates", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A list of up to 20 subscription items, each with an attached price.", + "explode": true, + "in": "query", + "name": "subscription_items", + "required": false, + "schema": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "in": "query", + "name": "subscription_proration_behavior", + "required": false, + "schema": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.", + "in": "query", + "name": "subscription_proration_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.", + "in": "query", + "name": "subscription_resume_at", + "required": false, + "schema": { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Date a subscription is intended to start (can be future or past)", + "in": "query", + "name": "subscription_start_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.", + "explode": true, + "in": "query", + "name": "subscription_trial_end", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "in": "query", + "name": "subscription_trial_from_plan", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}": { + "delete": { + "description": "

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

", + "operationId": "DeleteInvoicesInvoice", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the invoice with the given ID.

", + "operationId": "GetInvoicesInvoice", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Draft invoices are fully editable. Once an invoice is finalized,\nmonetary values, as well as collection_method, become uneditable.

\n\n

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,\nsending reminders for, or automatically reconciling invoices, pass\nauto_advance=false.

", + "operationId": "PostInvoicesInvoice", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_tax_ids": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "rendering_options": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + }, + "shipping_details": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft." + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).", + "type": "integer" + }, + "auto_advance": { + "description": "Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields." + }, + "days_until_due": { + "description": "The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates." + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 1500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts." + }, + "due_date": { + "description": "The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.", + "format": "unix-time", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details." + }, + "payment_settings": { + "description": "Configuration settings for the PaymentIntent that is generated when the invoice is finalized.", + "properties": { + "default_mandate": { + "maxLength": 5000, + "type": "string" + }, + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_settings", + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "anyOf": [ + { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_cost", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Settings for the cost of shipping for this invoice." + }, + "shipping_details": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer." + }, + "statement_descriptor": { + "description": "Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/finalize": { + "post": { + "description": "

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

", + "operationId": "PostInvoicesInvoiceFinalize", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "auto_advance": { + "description": "Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/lines": { + "get": { + "description": "

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetInvoicesInvoiceLines", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/mark_uncollectible": { + "post": { + "description": "

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

", + "operationId": "PostInvoicesInvoiceMarkUncollectible", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/pay": { + "post": { + "description": "

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

", + "operationId": "PostInvoicesInvoicePay", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "forgive": { + "description": "In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. \n\nPassing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.", + "type": "boolean" + }, + "mandate": { + "description": "ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.", + "maxLength": 5000, + "type": "string" + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.", + "type": "boolean" + }, + "payment_method": { + "description": "A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/send": { + "post": { + "description": "

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

\n\n

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

", + "operationId": "PostInvoicesInvoiceSend", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/void": { + "post": { + "description": "

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

", + "operationId": "PostInvoicesInvoiceVoid", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations": { + "get": { + "description": "

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingAuthorizations", + "parameters": [ + { + "description": "Only return authorizations that belong to the given card.", + "in": "query", + "name": "card", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations that belong to the given cardholder.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "closed", + "pending", + "reversed" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.authorization" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/authorizations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingAuthorizationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations/{authorization}": { + "get": { + "description": "

Retrieves an Issuing Authorization object.

", + "operationId": "GetIssuingAuthorizationsAuthorization", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingAuthorizationsAuthorization", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations/{authorization}/approve": { + "post": { + "description": "

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow. \nYou can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.

", + "operationId": "PostIssuingAuthorizationsAuthorizationApprove", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations/{authorization}/decline": { + "post": { + "description": "

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.\nYou can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.

", + "operationId": "PostIssuingAuthorizationsAuthorizationDecline", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cardholders": { + "get": { + "description": "

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingCardholders", + "parameters": [ + { + "description": "Only return cardholders that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return cardholders that have the given email address.", + "in": "query", + "name": "email", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given phone number.", + "in": "query", + "name": "phone_number", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "blocked", + "inactive" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given type. One of `individual` or `company`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/cardholders", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingCardholderList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingCardholders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing": { + "description": "The cardholder's billing address.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "postal_code" + ], + "title": "required_address", + "type": "object" + } + }, + "required": [ + "address" + ], + "title": "billing_specs", + "type": "object" + }, + "company": { + "description": "Additional information about a `company` cardholder.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_param", + "type": "object" + }, + "email": { + "description": "The cardholder's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "individual": { + "description": "Additional information about an `individual` cardholder.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 5000, + "type": "string" + }, + "front": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "person_verification_document_param", + "type": "object" + } + }, + "title": "person_verification_param", + "type": "object" + } + }, + "title": "individual_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.", + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "type": "string" + }, + "spending_controls": { + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + }, + "spending_limits_currency": { + "type": "string" + } + }, + "title": "authorization_controls_param_v2", + "type": "object" + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.", + "enum": [ + "active", + "inactive" + ], + "type": "string" + }, + "type": { + "description": "One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.", + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "name", + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cardholders/{cardholder}": { + "get": { + "description": "

Retrieves an Issuing Cardholder object.

", + "operationId": "GetIssuingCardholdersCardholder", + "parameters": [ + { + "in": "path", + "name": "cardholder", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingCardholdersCardholder", + "parameters": [ + { + "in": "path", + "name": "cardholder", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing": { + "description": "The cardholder's billing address.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "postal_code" + ], + "title": "required_address", + "type": "object" + } + }, + "required": [ + "address" + ], + "title": "billing_specs", + "type": "object" + }, + "company": { + "description": "Additional information about a `company` cardholder.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_param", + "type": "object" + }, + "email": { + "description": "The cardholder's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "individual": { + "description": "Additional information about an `individual` cardholder.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 5000, + "type": "string" + }, + "front": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "person_verification_document_param", + "type": "object" + } + }, + "title": "person_verification_param", + "type": "object" + } + }, + "title": "individual_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.", + "type": "string" + }, + "spending_controls": { + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + }, + "spending_limits_currency": { + "type": "string" + } + }, + "title": "authorization_controls_param_v2", + "type": "object" + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards.", + "enum": [ + "active", + "inactive" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cards": { + "get": { + "description": "

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingCards", + "parameters": [ + { + "description": "Only return cards belonging to the Cardholder with the provided ID.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that were issued during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given expiration month.", + "in": "query", + "name": "exp_month", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given expiration year.", + "in": "query", + "name": "exp_year", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return cards that have the given last four digits.", + "in": "query", + "name": "last4", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Only return cards that have the given type. One of `virtual` or `physical`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "physical", + "virtual" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.card" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/cards", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingCardList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an Issuing Card object.

", + "operationId": "PostIssuingCards", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cardholder": { + "description": "The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency for the card.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "replacement_for": { + "description": "The card this is meant to be a replacement for (if any).", + "maxLength": 5000, + "type": "string" + }, + "replacement_reason": { + "description": "If `replacement_for` is specified, this should indicate why that card is being replaced.", + "enum": [ + "damaged", + "expired", + "lost", + "stolen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "description": "The address where the card will be shipped.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "postal_code" + ], + "title": "required_address", + "type": "object" + }, + "customs": { + "properties": { + "eori_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "customs_param", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "require_signature": { + "type": "boolean" + }, + "service": { + "enum": [ + "express", + "priority", + "standard" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "enum": [ + "bulk", + "individual" + ], + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "shipping_specs", + "type": "object" + }, + "spending_controls": { + "description": "Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "authorization_controls_param", + "type": "object" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": [ + "active", + "inactive" + ], + "type": "string" + }, + "type": { + "description": "The type of card to issue. Possible values are `physical` or `virtual`.", + "enum": [ + "physical", + "virtual" + ], + "type": "string" + } + }, + "required": [ + "currency", + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cards/{card}": { + "get": { + "description": "

Retrieves an Issuing Card object.

", + "operationId": "GetIssuingCardsCard", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingCardsCard", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pin": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason why the `status` of this card is `canceled`.", + "enum": [ + "lost", + "stolen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "pin": { + "description": "The desired new PIN for this card.", + "properties": { + "encrypted_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "encrypted_pin_param", + "type": "object" + }, + "spending_controls": { + "description": "Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "authorization_controls_param", + "type": "object" + }, + "status": { + "description": "Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.", + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/disputes": { + "get": { + "description": "

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingDisputes", + "parameters": [ + { + "description": "Select Issuing disputes that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Select Issuing disputes with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "expired", + "lost", + "submitted", + "unsubmitted", + "won" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Select the Issuing dispute for the given transaction.", + "in": "query", + "name": "transaction", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.dispute" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/disputes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingDisputeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

", + "operationId": "PostIssuingDisputes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "treasury": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.", + "type": "integer" + }, + "evidence": { + "description": "Evidence provided for the dispute.", + "properties": { + "canceled": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_policy_provided": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "canceled", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "duplicate": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_statement": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cash_receipt": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "check_image": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "original_transaction": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "duplicate", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fraudulent": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + } + }, + "title": "fraudulent", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "merchandise_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "return_description": { + "maxLength": 1500, + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "merchandise_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "not_received": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "not_received", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "other": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "other", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "reason": { + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "service_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "evidence_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "transaction": { + "description": "The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.", + "maxLength": 5000, + "type": "string" + }, + "treasury": { + "description": "Params for disputes related to Treasury FinancialAccounts", + "properties": { + "received_debit": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "title": "treasury_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/disputes/{dispute}": { + "get": { + "description": "

Retrieves an Issuing Dispute object.

", + "operationId": "GetIssuingDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

", + "operationId": "PostIssuingDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "evidence": { + "description": "Evidence provided for the dispute.", + "properties": { + "canceled": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_policy_provided": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "canceled", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "duplicate": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_statement": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cash_receipt": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "check_image": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "original_transaction": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "duplicate", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fraudulent": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + } + }, + "title": "fraudulent", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "merchandise_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "return_description": { + "maxLength": 1500, + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "merchandise_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "not_received": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "not_received", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "other": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "other", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "reason": { + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "service_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "evidence_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/disputes/{dispute}/submit": { + "post": { + "description": "

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

", + "operationId": "PostIssuingDisputesDisputeSubmit", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/settlements": { + "get": { + "description": "

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingSettlements", + "parameters": [ + { + "description": "Only return issuing settlements that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.settlement" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/settlements", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingSettlementList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/settlements/{settlement}": { + "get": { + "description": "

Retrieves an Issuing Settlement object.

", + "operationId": "GetIssuingSettlementsSettlement", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingSettlementsSettlement", + "parameters": [ + { + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/transactions": { + "get": { + "description": "

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingTransactions", + "parameters": [ + { + "description": "Only return transactions that belong to the given card.", + "in": "query", + "name": "card", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that belong to the given cardholder.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that have the given type. One of `capture` or `refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "capture", + "refund" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/transactions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/transactions/{transaction}": { + "get": { + "description": "

Retrieves an Issuing Transaction object.

", + "operationId": "GetIssuingTransactionsTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/link_account_sessions": { + "post": { + "description": "

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

", + "operationId": "PostLinkAccountSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_holder": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "filters": { + "explode": true, + "style": "deepObject" + }, + "permissions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder": { + "description": "The account holder to link accounts for.", + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "account", + "customer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "accountholder_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "filters": { + "description": "Filters to restrict the kinds of accounts to collect.", + "properties": { + "countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "countries" + ], + "title": "filters_params", + "type": "object" + }, + "permissions": { + "description": "List of data features that you would like to request access to.\n\nPossible values are `balances`, `transactions`, `ownership`, and `payment_method`.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder", + "permissions" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/link_account_sessions/{session}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Session

", + "operationId": "GetLinkAccountSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts": { + "get": { + "description": "

Returns a list of Financial Connections Account objects.

", + "operationId": "GetLinkedAccounts", + "parameters": [ + { + "description": "If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.", + "explode": true, + "in": "query", + "name": "account_holder", + "required": false, + "schema": { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "accountholder_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If present, only return accounts that were collected as part of the given session.", + "in": "query", + "name": "session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}": { + "get": { + "description": "

Retrieves the details of an Financial Connections Account.

", + "operationId": "GetLinkedAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}/disconnect": { + "post": { + "description": "

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

", + "operationId": "PostLinkedAccountsAccountDisconnect", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}/owners": { + "get": { + "description": "

Lists all owners for a given Account

", + "operationId": "GetLinkedAccountsAccountOwners", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ID of the ownership object to fetch owners from.", + "in": "query", + "name": "ownership", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}/refresh": { + "post": { + "description": "

Refreshes the data associated with a Financial Connections Account.

", + "operationId": "PostLinkedAccountsAccountRefresh", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features that you would like to refresh.", + "items": { + "enum": [ + "balance", + "ownership" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": [ + "features" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/mandates/{mandate}": { + "get": { + "description": "

Retrieves a Mandate object.

", + "operationId": "GetMandatesMandate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "mandate", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mandate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents": { + "get": { + "description": "

Returns a list of PaymentIntents.

", + "operationId": "GetPaymentIntents", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return PaymentIntents for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_intent" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_intents", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsPaymentIntentList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a PaymentIntent object.

\n\n

After the PaymentIntent is created, attach a payment method and confirm\nto continue the payment. You can read more about the different payment flows\navailable via the Payment Intents API here.

\n\n

When confirm=true is used during creation, it is equivalent to creating\nand confirming the PaymentIntent in the same call. You may use any parameters\navailable in the confirm API when confirm=true\nis supplied.

", + "operationId": "PostPaymentIntents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "automatic_payment_methods": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "off_session": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "automatic_payment_methods": { + "description": "When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_payment_methods_param", + "type": "object" + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "confirm": { + "description": "Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided.", + "type": "boolean" + }, + "confirmation_method": { + "enum": [ + "automatic", + "manual" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "error_on_requires_action": { + "description": "Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "maxLength": 5000, + "type": "string" + }, + "mandate_data": { + "description": "This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "off_session": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "one_off", + "recurring" + ], + "maxLength": 5000, + "type": "string" + } + ], + "description": "Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm)." + }, + "on_behalf_of": { + "description": "The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "string" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.\n\nIf this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "maxLength": 11, + "type": "string" + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 22, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "persistent_token": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to [\"card\"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "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).", + "type": "string" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "description": "Shipping information for this PaymentIntent.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment succeeds.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_creation_params", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "type": "string" + }, + "use_stripe_sdk": { + "description": "Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.", + "type": "boolean" + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/search": { + "get": { + "description": "

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetPaymentIntentsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_intent" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}": { + "get": { + "description": "

Retrieves the details of a PaymentIntent that has previously been created.

\n\n

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

\n\n

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

", + "operationId": "GetPaymentIntentsIntent", + "parameters": [ + { + "description": "The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates properties on a PaymentIntent object without confirming.

\n\n

Depending on which properties you update, you may need to confirm the\nPaymentIntent again. For example, updating the payment_method will\nalways require you to confirm the PaymentIntent again. If you prefer to\nupdate and confirm at the same time, we recommend updating properties via\nthe confirm API instead.

", + "operationId": "PostPaymentIntentsIntent", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "receipt_email": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)." + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "maxLength": 11, + "type": "string" + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 22, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "persistent_token": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "receipt_email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails)." + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).\n\nIf `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.", + "enum": [ + "", + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/apply_customer_balance": { + "post": { + "description": "

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

", + "operationId": "PostPaymentIntentsIntentApplyCustomerBalance", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be applied to this PaymentIntent from the customer’s cash balance.\n\nA positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).\n\nThe maximum amount is the amount of the PaymentIntent.\n\nWhen omitted, the amount defaults to the remaining amount requested on the PaymentIntent.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/cancel": { + "post": { + "description": "

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.

\n\n

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

\n\n

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.

", + "operationId": "PostPaymentIntentsIntentCancel", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`", + "enum": [ + "abandoned", + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/capture": { + "post": { + "description": "

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

\n\n

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

\n\n

Learn more about separate authorization and capture.

", + "operationId": "PostPaymentIntentsIntentCapture", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_to_capture": { + "description": "The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided.", + "type": "integer" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment\nis captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/confirm": { + "post": { + "description": "

Confirm that your customer intends to pay with current or provided\npayment method. Upon confirmation, the PaymentIntent will attempt to initiate\na payment.\nIf the selected payment method requires additional authentication steps, the\nPaymentIntent will transition to the requires_action status and\nsuggest additional actions via next_action. If payment fails,\nthe PaymentIntent will transition to the requires_payment_method status. If\npayment succeeds, the PaymentIntent will transition to the succeeded\nstatus (or requires_capture, if capture_method is set to manual).\nIf the confirmation_method is automatic, payment may be attempted\nusing our client SDKs\nand the PaymentIntent’s client_secret.\nAfter next_actions are handled by the client, no additional\nconfirmation is required to complete the payment.\nIf the confirmation_method is manual, all payment attempts must be\ninitiated using a secret key.\nIf any actions are required for the payment, the PaymentIntent will\nreturn to the requires_confirmation state\nafter those actions are completed. Your server needs to then\nexplicitly re-confirm the PaymentIntent to initiate the next payment\nattempt. Read the expanded documentation\nto learn more about manual confirmation.

", + "operationId": "PostPaymentIntentsIntentConfirm", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "off_session": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "receipt_email": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of the PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "error_on_requires_action": { + "description": "Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "ID of the mandate to be used for this payment.", + "maxLength": 5000, + "type": "string" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + { + "properties": { + "customer_acceptance": { + "properties": { + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "online", + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "client_key_param", + "type": "object" + } + ], + "description": "This hash contains details about the Mandate to create" + }, + "off_session": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "one_off", + "recurring" + ], + "maxLength": 5000, + "type": "string" + } + ], + "description": "Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards)." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "maxLength": 11, + "type": "string" + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 22, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "persistent_token": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "receipt_email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails)." + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.\nIf you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.\nThis parameter is only used for cards and other redirect-based payment methods.", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).\n\nIf `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.", + "enum": [ + "", + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "use_stripe_sdk": { + "description": "Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/increment_authorization": { + "post": { + "description": "

Perform an incremental authorization on an eligible\nPaymentIntent. To be eligible, the\nPaymentIntent’s status must be requires_capture and\nincremental_authorization_supported\nmust be true.

\n\n

Incremental authorizations attempt to increase the authorized amount on\nyour customer’s card to the new, higher amount provided. As with the\ninitial authorization, incremental authorizations may be declined. A\nsingle PaymentIntent can call this endpoint multiple times to further\nincrease the authorized amount.

\n\n

If the incremental authorization succeeds, the PaymentIntent object is\nreturned with the updated\namount.\nIf the incremental authorization fails, a\ncard_declined error is returned, and no\nfields on the PaymentIntent or Charge are updated. The PaymentIntent\nobject remains capturable for the previously authorized amount.

\n\n

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.\nOnce captured, a PaymentIntent can no longer be incremented.

\n\n

Learn more about incremental authorizations.

", + "operationId": "PostPaymentIntentsIntentIncrementAuthorization", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.", + "type": "integer" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment is captured.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + } + }, + "required": [ + "amount" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/verify_microdeposits": { + "post": { + "description": "

Verifies microdeposits on a PaymentIntent object.

", + "operationId": "PostPaymentIntentsIntentVerifyMicrodeposits", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret of the PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "descriptor_code": { + "description": "A six-character code starting with SM present in the microdeposit sent to the bank account.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_links": { + "get": { + "description": "

Returns a list of your payment links.

", + "operationId": "GetPaymentLinks", + "parameters": [ + { + "description": "Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourcePaymentLinkList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a payment link.

", + "operationId": "PostPaymentLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_completion": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "consent_collection": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_options": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "after_completion": { + "description": "Behavior after the purchase is complete.", + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_confirmation_page_params", + "type": "object" + }, + "redirect": { + "properties": { + "url": { + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "after_completion_redirect_params", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "after_completion_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.", + "type": "integer" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.", + "type": "number" + }, + "automatic_tax": { + "description": "Configuration for automatic tax collection.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "consent_collection": { + "description": "Configure fields to gather active consent from customers.", + "properties": { + "promotions": { + "enum": [ + "auto", + "none" + ], + "type": "string" + }, + "terms_of_service": { + "enum": [ + "none", + "required" + ], + "type": "string" + } + }, + "title": "consent_collection_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price.", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "custom", + "type" + ], + "title": "custom_field_label_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "type": { + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "type" + ], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer_creation": { + "description": "Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "invoice_settings_params", + "type": "object" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_creation_create_params", + "type": "object" + }, + "line_items": { + "description": "The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "adjustable_quantity_params", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": [ + "price", + "quantity" + ], + "title": "line_items_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "type": "object" + }, + "on_behalf_of": { + "description": "The account on behalf of which to charge.", + "type": "string" + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "capture_method": { + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_data_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "phone_number_collection": { + "description": "Controls phone number collection settings during checkout.\n\nWe recommend that you review your privacy policy and check with your legal contacts.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "phone_number_collection_params", + "type": "object" + }, + "shipping_address_collection": { + "description": "Configuration for collecting the customer's shipping address.", + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "shipping_address_collection_params", + "type": "object" + }, + "shipping_options": { + "description": "The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "items": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "shipping_option_params", + "type": "object" + }, + "type": "array" + }, + "submit_type": { + "description": "Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "trial_period_days": { + "type": "integer" + } + }, + "title": "subscription_data_params", + "type": "object" + }, + "tax_id_collection": { + "description": "Controls tax ID collection during checkout.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "tax_id_collection_params", + "type": "object" + }, + "transfer_data": { + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_params", + "type": "object" + } + }, + "required": [ + "line_items" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_links/{payment_link}": { + "get": { + "description": "

Retrieve a payment link.

", + "operationId": "GetPaymentLinksPaymentLink", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a payment link.

", + "operationId": "PostPaymentLinksPaymentLink", + "parameters": [ + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_completion": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "description": "Behavior after the purchase is complete.", + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_confirmation_page_params", + "type": "object" + }, + "redirect": { + "properties": { + "url": { + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "after_completion_redirect_params", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "after_completion_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Configuration for automatic tax collection.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "custom", + "type" + ], + "title": "custom_field_label_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "type": { + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "type" + ], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported." + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer_creation": { + "description": "Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "invoice_settings_params", + "type": "object" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_creation_update_params", + "type": "object" + }, + "line_items": { + "description": "The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "adjustable_quantity_params", + "type": "object" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": [ + "id" + ], + "title": "line_items_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods)." + }, + "shipping_address_collection": { + "anyOf": [ + { + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "shipping_address_collection_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Configuration for collecting the customer's shipping address." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_links/{payment_link}/line_items": { + "get": { + "description": "

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetPaymentLinksPaymentLinkLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods": { + "get": { + "description": "

Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods API instead.

", + "operationId": "GetPaymentMethods", + "parameters": [ + { + "description": "The ID of the customer whose PaymentMethods will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_methods", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsPaymentMethodList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

\n\n

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

", + "operationId": "PostPaymentMethods", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "acss_debit": { + "explode": true, + "style": "deepObject" + }, + "affirm": { + "explode": true, + "style": "deepObject" + }, + "afterpay_clearpay": { + "explode": true, + "style": "deepObject" + }, + "alipay": { + "explode": true, + "style": "deepObject" + }, + "au_becs_debit": { + "explode": true, + "style": "deepObject" + }, + "bacs_debit": { + "explode": true, + "style": "deepObject" + }, + "bancontact": { + "explode": true, + "style": "deepObject" + }, + "billing_details": { + "explode": true, + "style": "deepObject" + }, + "blik": { + "explode": true, + "style": "deepObject" + }, + "boleto": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "customer_balance": { + "explode": true, + "style": "deepObject" + }, + "eps": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fpx": { + "explode": true, + "style": "deepObject" + }, + "giropay": { + "explode": true, + "style": "deepObject" + }, + "grabpay": { + "explode": true, + "style": "deepObject" + }, + "ideal": { + "explode": true, + "style": "deepObject" + }, + "interac_present": { + "explode": true, + "style": "deepObject" + }, + "klarna": { + "explode": true, + "style": "deepObject" + }, + "konbini": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "oxxo": { + "explode": true, + "style": "deepObject" + }, + "p24": { + "explode": true, + "style": "deepObject" + }, + "paynow": { + "explode": true, + "style": "deepObject" + }, + "pix": { + "explode": true, + "style": "deepObject" + }, + "promptpay": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "sepa_debit": { + "explode": true, + "style": "deepObject" + }, + "sofort": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + }, + "wechat_pay": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "acss_debit": { + "description": "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "description": "If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "description": "If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "description": "If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "description": "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "description": "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "description": "If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "description": "Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "description": "If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "description": "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "card": { + "anyOf": [ + { + "properties": { + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "card_details_params", + "type": "object" + }, + { + "properties": { + "token": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "token" + ], + "title": "token_params", + "type": "object" + } + ], + "description": "If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: \"tok_visa\"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.", + "x-stripeBypassValidation": true + }, + "customer": { + "description": "The `Customer` to whom the original PaymentMethod is attached.", + "maxLength": 5000, + "type": "string" + }, + "customer_balance": { + "description": "If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "description": "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.", + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fpx": { + "description": "If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.", + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "description": "If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "description": "If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "description": "If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.", + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "description": "If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "description": "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "description": "If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "description": "If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "oxxo": { + "description": "If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "description": "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.", + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "payment_method": { + "description": "The PaymentMethod to share.", + "maxLength": 5000, + "type": "string" + }, + "paynow": { + "description": "If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "description": "If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "description": "If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "description": "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.", + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "description": "If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.", + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "description": "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.", + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "description": "If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.", + "properties": {}, + "title": "param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods/{payment_method}": { + "get": { + "description": "

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

", + "operationId": "GetPaymentMethodsPaymentMethod", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

", + "operationId": "PostPaymentMethodsPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_details": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_details": { + "description": "Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "card": { + "description": "If this is a `card` PaymentMethod, this hash contains the user's card details.", + "properties": { + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + } + }, + "title": "update_api_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "link": { + "description": "If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "us_bank_account": { + "description": "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.", + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + } + }, + "title": "update_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods/{payment_method}/attach": { + "post": { + "description": "

Attaches a PaymentMethod object to a Customer.

\n\n

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent\nor a PaymentIntent with setup_future_usage.\nThese approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach\nendpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for\nfuture use, which makes later declines and payment friction more likely.\nSee Optimizing cards for future payments for more information about setting up\nfuture payments.

\n\n

To use this PaymentMethod as the default for invoice or subscription payments,\nset invoice_settings.default_payment_method,\non the Customer to the PaymentMethod’s ID.

", + "operationId": "PostPaymentMethodsPaymentMethodAttach", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of the customer to which to attach the PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods/{payment_method}/detach": { + "post": { + "description": "

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

", + "operationId": "PostPaymentMethodsPaymentMethodDetach", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts": { + "get": { + "description": "

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

", + "operationId": "GetPayouts", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "arrival_date", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The ID of an external account - only return payouts sent to this external account.", + "in": "query", + "name": "destination", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payout" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payouts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PayoutList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

\n\n

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

\n\n

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

", + "operationId": "PostPayouts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents representing how much to payout.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination": { + "description": "The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).)", + "enum": [ + "instant", + "standard" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "source_type": { + "description": "The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`.", + "enum": [ + "bank_account", + "card", + "fpx" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "statement_descriptor": { + "description": "A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all.", + "maxLength": 22, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts/{payout}": { + "get": { + "description": "

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

", + "operationId": "GetPayoutsPayout", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

", + "operationId": "PostPayoutsPayout", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts/{payout}/cancel": { + "post": { + "description": "

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

", + "operationId": "PostPayoutsPayoutCancel", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts/{payout}/reverse": { + "post": { + "description": "

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

\n\n

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

", + "operationId": "PostPayoutsPayoutReverse", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/plans": { + "get": { + "description": "

Returns a list of your plans.

", + "operationId": "GetPlans", + "parameters": [ + { + "description": "Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return plans for the given product.", + "in": "query", + "name": "product", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/plan" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/plans", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PlanList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

", + "operationId": "PostPlans", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "product": { + "explode": true, + "style": "deepObject" + }, + "tiers": { + "explode": true, + "style": "deepObject" + }, + "transform_usage": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the plan is currently available for new subscriptions. Defaults to `true`.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "type": "string" + }, + "amount": { + "description": "A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.", + "type": "integer" + }, + "amount_decimal": { + "description": "Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.", + "format": "decimal", + "type": "string" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "Specifies billing frequency. Either `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "anyOf": [ + { + "description": "The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a [service product](https://stripe.com/docs/api#product_object-type).", + "properties": { + "active": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + }, + "unit_label": { + "maxLength": 12, + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "inline_product_params", + "type": "object" + }, + { + "description": "The ID of the product whose pricing the created plan will represent.", + "maxLength": 5000, + "type": "string" + } + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.", + "enum": [ + "graduated", + "volume" + ], + "type": "string" + }, + "transform_usage": { + "description": "Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.", + "properties": { + "divide_by": { + "type": "integer" + }, + "round": { + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "transform_usage_param", + "type": "object" + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "type": "integer" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "currency", + "interval" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/plans/{plan}": { + "delete": { + "description": "

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

", + "operationId": "DeletePlansPlan", + "parameters": [ + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the plan with the given ID.

", + "operationId": "GetPlansPlan", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

", + "operationId": "PostPlansPlan", + "parameters": [ + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the plan is currently available for new subscriptions.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "description": "The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.", + "maxLength": 5000, + "type": "string" + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/prices": { + "get": { + "description": "

Returns a list of your prices.

", + "operationId": "GetPrices", + "parameters": [ + { + "description": "Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return prices for the given currency.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return the price with these lookup_keys, if any exist.", + "explode": true, + "in": "query", + "name": "lookup_keys", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return prices for the given product.", + "in": "query", + "name": "product", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return prices with these recurring fields.", + "explode": true, + "in": "query", + "name": "recurring", + "required": false, + "schema": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "usage_type": { + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "title": "all_prices_recurring_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return prices of type `recurring` or `one_time`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "one_time", + "recurring" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/price" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/prices", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PriceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new price for an existing product. The price can be recurring or one-time.

", + "operationId": "PostPrices", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "custom_unit_amount": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "product_data": { + "explode": true, + "style": "deepObject" + }, + "recurring": { + "explode": true, + "style": "deepObject" + }, + "tiers": { + "explode": true, + "style": "deepObject" + }, + "transform_quantity": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the price can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "custom_unit_amount": { + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "description": "The ID of the product that this price will belong to.", + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "description": "These fields can be used to create a new product that this price will belong to.", + "properties": { + "active": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + }, + "unit_label": { + "maxLength": 12, + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "inline_product_params", + "type": "object" + }, + "recurring": { + "description": "The recurring components of a price such as `interval` and `usage_type`.", + "properties": { + "aggregate_usage": { + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "type": "string" + }, + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "usage_type": { + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "interval" + ], + "title": "recurring", + "type": "object" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.", + "enum": [ + "graduated", + "volume" + ], + "type": "string" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.", + "type": "boolean" + }, + "transform_quantity": { + "description": "Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.", + "properties": { + "divide_by": { + "type": "integer" + }, + "round": { + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "transform_usage_param", + "type": "object" + }, + "unit_amount": { + "description": "A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/prices/search": { + "get": { + "description": "

Search for prices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetPricesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/price" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/prices/{price}": { + "get": { + "description": "

Retrieves the price with the given ID.

", + "operationId": "GetPricesPrice", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "price", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

", + "operationId": "PostPricesPrice", + "parameters": [ + { + "in": "path", + "name": "price", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the price can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "currency_options": { + "anyOf": [ + { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies)." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/products": { + "get": { + "description": "

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

", + "operationId": "GetProducts", + "parameters": [ + { + "description": "Only return products that are active or inactive (e.g., pass `false` to list all inactive products).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return products that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).", + "explode": true, + "in": "query", + "name": "ids", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return products that can be shipped (i.e., physical, not digital products).", + "in": "query", + "name": "shippable", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return products with the given url.", + "in": "query", + "name": "url", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/product" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/products", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ProductList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new product object.

", + "operationId": "PostProducts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_price_data": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "images": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "package_dimensions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the product is currently available for purchase. Defaults to `true`.", + "type": "boolean" + }, + "default_price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.", + "properties": { + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency" + ], + "title": "price_data_without_product", + "type": "object" + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "package_dimensions": { + "description": "The dimensions of this product for shipping purposes.", + "properties": { + "height": { + "type": "number" + }, + "length": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": [ + "height", + "length", + "weight", + "width" + ], + "title": "package_dimensions_specs", + "type": "object" + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": "boolean" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.\n\nThis may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `\"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.\n It must contain at least one letter.", + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "type": "string" + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 12, + "type": "string" + }, + "url": { + "description": "A URL of a publicly-accessible webpage for this product.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/products/search": { + "get": { + "description": "

Search for products you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetProductsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/product" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/products/{id}": { + "delete": { + "description": "

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

", + "operationId": "DeleteProductsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

", + "operationId": "GetProductsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostProductsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "images": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "package_dimensions": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "url": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the product is available for purchase.", + "type": "boolean" + }, + "default_price": { + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "images": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "properties": { + "height": { + "type": "number" + }, + "length": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": [ + "height", + "length", + "weight", + "width" + ], + "title": "package_dimensions_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": "boolean" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.\n\nThis may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `\"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.\n It must contain at least one letter. May only be set if `type=service`.", + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.", + "maxLength": 12, + "type": "string" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A URL of a publicly-accessible webpage for this product." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/promotion_codes": { + "get": { + "description": "

Returns a list of your promotion codes.

", + "operationId": "GetPromotionCodes", + "parameters": [ + { + "description": "Filter promotion codes by whether they are active.", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return promotion codes that have this case-insensitive code.", + "in": "query", + "name": "code", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return promotion codes for this coupon.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return promotion codes that are restricted to this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/promotion_code" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/promotion_codes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PromotionCodesResourcePromotionCodeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

", + "operationId": "PostPromotionCodes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the promotion code is currently active.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.", + "maxLength": 500, + "type": "string" + }, + "coupon": { + "description": "The coupon for this promotion code.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.", + "format": "unix-time", + "type": "integer" + }, + "max_redemptions": { + "description": "A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.", + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "restrictions": { + "description": "Settings that restrict the redemption of the promotion code.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "minimum_amount": { + "type": "integer" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + "first_time_transaction": { + "type": "boolean" + }, + "minimum_amount": { + "type": "integer" + }, + "minimum_amount_currency": { + "type": "string" + } + }, + "title": "restrictions_params", + "type": "object" + } + }, + "required": [ + "coupon" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/promotion_codes/{promotion_code}": { + "get": { + "description": "

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

", + "operationId": "GetPromotionCodesPromotionCode", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "promotion_code", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

", + "operationId": "PostPromotionCodesPromotionCode", + "parameters": [ + { + "in": "path", + "name": "promotion_code", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "restrictions": { + "description": "Settings that restrict the redemption of the promotion code.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "minimum_amount": { + "type": "integer" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "title": "restrictions_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes": { + "get": { + "description": "

Returns a list of your quotes.

", + "operationId": "GetQuotes", + "parameters": [ + { + "description": "The ID of the customer whose quotes will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the quote.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "accepted", + "canceled", + "draft", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/quote" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/quotes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceQuoteList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

", + "operationId": "PostQuotes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "from_quote": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field." + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field." + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "customer": { + "description": "The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set." + }, + "description": { + "description": "A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "maxLength": 500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The discounts applied to the quote. You can only set up to one discount." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "maxLength": 500, + "type": "string" + }, + "from_quote": { + "description": "Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.", + "properties": { + "is_revision": { + "type": "boolean" + }, + "quote": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "quote" + ], + "title": "from_quote_params", + "type": "object" + }, + "header": { + "description": "A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "maxLength": 50, + "type": "string" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "quote_param", + "type": "object" + }, + "line_items": { + "description": "A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "line_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge." + }, + "subscription_data": { + "description": "When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "effective_date": { + "anyOf": [ + { + "enum": [ + "current_period_end" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_data_create_params", + "type": "object" + }, + "test_clock": { + "description": "ID of the test clock to attach to the quote.", + "maxLength": 5000, + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The data with which to automatically create a Transfer for each of the invoices." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}": { + "get": { + "description": "

Retrieves the quote with the given ID.

", + "operationId": "GetQuotesQuote", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A quote models prices and services for a customer.

", + "operationId": "PostQuotesQuote", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field." + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field." + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "customer": { + "description": "The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set." + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The discounts applied to the quote. You can only set up to one discount." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 500, + "type": "string" + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 50, + "type": "string" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "quote_param", + "type": "object" + }, + "line_items": { + "description": "A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.", + "items": { + "properties": { + "id": { + "maxLength": 5000, + "type": "string" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "line_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge." + }, + "subscription_data": { + "description": "When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "effective_date": { + "anyOf": [ + { + "enum": [ + "current_period_end" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_data_update_params", + "type": "object" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The data with which to automatically create a Transfer for each of the invoices." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/accept": { + "post": { + "description": "

Accepts the specified quote.

", + "operationId": "PostQuotesQuoteAccept", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/cancel": { + "post": { + "description": "

Cancels the quote.

", + "operationId": "PostQuotesQuoteCancel", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/computed_upfront_line_items": { + "get": { + "description": "

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

", + "operationId": "GetQuotesQuoteComputedUpfrontLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/finalize": { + "post": { + "description": "

Finalizes the quote.

", + "operationId": "PostQuotesQuoteFinalize", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/line_items": { + "get": { + "description": "

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetQuotesQuoteLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/pdf": { + "get": { + "description": "

Download the PDF for a finalized quote

", + "operationId": "GetQuotesQuotePdf", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/pdf": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/early_fraud_warnings": { + "get": { + "description": "

Returns a list of early fraud warnings.

", + "operationId": "GetRadarEarlyFraudWarnings", + "parameters": [ + { + "description": "Only return early fraud warnings for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.early_fraud_warning" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/early_fraud_warnings", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarEarlyFraudWarningList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/early_fraud_warnings/{early_fraud_warning}": { + "get": { + "description": "

Retrieves the details of an early fraud warning that has previously been created.

\n\n

Please refer to the early fraud warning object reference for more details.

", + "operationId": "GetRadarEarlyFraudWarningsEarlyFraudWarning", + "parameters": [ + { + "in": "path", + "name": "early_fraud_warning", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.early_fraud_warning" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_list_items": { + "get": { + "description": "

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetRadarValueListItems", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Return items belonging to the parent list whose value matches the specified value (using an \"is like\" match).", + "in": "query", + "name": "value", + "required": false, + "schema": { + "maxLength": 800, + "type": "string" + }, + "style": "form" + }, + { + "description": "Identifier for the parent value list this item belongs to.", + "in": "query", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/value_list_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new ValueListItem object, which is added to the specified parent value list.

", + "operationId": "PostRadarValueListItems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "value": { + "description": "The value of the item (whose type must match the type of the parent value list).", + "maxLength": 800, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list which the created item will be added to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "value", + "value_list" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_list_items/{item}": { + "delete": { + "description": "

Deletes a ValueListItem object, removing it from its parent value list.

", + "operationId": "DeleteRadarValueListItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a ValueListItem object.

", + "operationId": "GetRadarValueListItemsItem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_lists": { + "get": { + "description": "

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetRadarValueLists", + "parameters": [ + { + "description": "The alias used to reference the value list when writing rules.", + "in": "query", + "name": "alias", + "required": false, + "schema": { + "maxLength": 100, + "type": "string" + }, + "style": "form" + }, + { + "description": "A value contained within a value list - returns all value lists containing this value.", + "in": "query", + "name": "contains", + "required": false, + "schema": { + "maxLength": 800, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.value_list" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/value_lists", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarListListList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new ValueList object, which can then be referenced in rules.

", + "operationId": "PostRadarValueLists", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "item_type": { + "description": "Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "string" + ], + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The human-readable name of the value list.", + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "alias", + "name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_lists/{value_list}": { + "delete": { + "description": "

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

", + "operationId": "DeleteRadarValueListsValueList", + "parameters": [ + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a ValueList object.

", + "operationId": "GetRadarValueListsValueList", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

", + "operationId": "PostRadarValueListsValueList", + "parameters": [ + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The human-readable name of the value list.", + "maxLength": 100, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/refunds": { + "get": { + "description": "

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

", + "operationId": "GetRefunds", + "parameters": [ + { + "description": "Only return refunds for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return refunds for the PaymentIntent specified by this ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/refunds", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "APIMethodRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create a refund.

", + "operationId": "PostRefunds", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to refund.", + "type": "integer" + }, + "charge": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "Customer whose customer balance to refund from.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "Address to send refund email, use customer email if not specified", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "origin": { + "description": "Origin of the refund", + "enum": [ + "customer_balance" + ], + "type": "string" + }, + "payment_intent": { + "maxLength": 5000, + "type": "string" + }, + "reason": { + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "type": "boolean" + }, + "reverse_transfer": { + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/refunds/{refund}": { + "get": { + "description": "

Retrieves the details of an existing refund.

", + "operationId": "GetRefundsRefund", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request only accepts metadata as an argument.

", + "operationId": "PostRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/refunds/{refund}/cancel": { + "post": { + "description": "

Cancels a refund with a status of requires_action.

\n\n

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

", + "operationId": "PostRefundsRefundCancel", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_runs": { + "get": { + "description": "

Returns a list of Report Runs, with the most recent appearing first.

", + "operationId": "GetReportingReportRuns", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/reporting.report_run" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/reporting/report_runs", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FinancialReportingFinanceReportRunList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

", + "operationId": "PostReportingReportRuns", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "parameters": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "parameters": { + "description": "Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.", + "properties": { + "columns": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "interval_end": { + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "format": "unix-time", + "type": "integer" + }, + "payout": { + "type": "string" + }, + "reporting_category": { + "enum": [ + "advance", + "advance_funding", + "anticipation_repayment", + "charge", + "charge_failure", + "connect_collection_transfer", + "connect_reserved_funds", + "contribution", + "dispute", + "dispute_reversal", + "fee", + "financing_paydown", + "financing_paydown_reversal", + "financing_payout", + "financing_payout_reversal", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "network_cost", + "other_adjustment", + "partial_capture_reversal", + "payout", + "payout_reversal", + "platform_earning", + "platform_earning_refund", + "refund", + "refund_failure", + "risk_reserved_funds", + "tax", + "topup", + "topup_reversal", + "transfer", + "transfer_reversal" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "timezone": { + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Ciudad_Juarez", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Factory", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Pacific-New", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "run_parameter_specs", + "type": "object" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `\"balance.summary.1\"`.", + "type": "string" + } + }, + "required": [ + "report_type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_runs/{report_run}": { + "get": { + "description": "

Retrieves the details of an existing Report Run.

", + "operationId": "GetReportingReportRunsReportRun", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report_run", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_types": { + "get": { + "description": "

Returns a full list of Report Types.

", + "operationId": "GetReportingReportTypes", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/reporting.report_type" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FinancialReportingFinanceReportTypeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_types/{report_type}": { + "get": { + "description": "

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

", + "operationId": "GetReportingReportTypesReportType", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report_type", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_type" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reviews": { + "get": { + "description": "

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetReviews", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/review" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarReviewList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reviews/{review}": { + "get": { + "description": "

Retrieves a Review object.

", + "operationId": "GetReviewsReview", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "review", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/review" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reviews/{review}/approve": { + "post": { + "description": "

Approves a Review object, closing it and removing it from the list of reviews.

", + "operationId": "PostReviewsReviewApprove", + "parameters": [ + { + "in": "path", + "name": "review", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/review" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_attempts": { + "get": { + "description": "

Returns a list of SetupAttempts associated with a provided SetupIntent.

", + "operationId": "GetSetupAttempts", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value\ncan be a string with an integer Unix timestamp, or it can be a\ndictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return SetupAttempts created by the SetupIntent specified by\nthis ID.", + "in": "query", + "name": "setup_intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/setup_attempt" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/setup_attempts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsSetupIntentSetupAttemptList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents": { + "get": { + "description": "

Returns a list of SetupIntents.

", + "operationId": "GetSetupIntents", + "parameters": [ + { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "in": "query", + "name": "attach_to_self", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return SetupIntents for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return SetupIntents associated with the specified payment method.", + "in": "query", + "name": "payment_method", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/setup_intent" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/setup_intents", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsSetupIntentList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a SetupIntent object.

\n\n

After the SetupIntent is created, attach a payment method and confirm\nto collect any required permissions to charge the payment method later.

", + "operationId": "PostSetupIntents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_directions": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "single_use": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "confirm": { + "description": "Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.", + "type": "boolean" + }, + "customer": { + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": "array" + }, + "mandate_data": { + "description": "This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).", + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "description": "The Stripe account ID for which this SetupIntent is created.", + "type": "string" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "blik": { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "link": { + "properties": { + "persistent_token": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to [\"card\"].", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).", + "type": "string" + }, + "single_use": { + "description": "If this hash is populated, this SetupIntent will generate a single_use Mandate on success.", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "setup_intent_single_use_params", + "type": "object" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.", + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}": { + "get": { + "description": "

Retrieves the details of a SetupIntent that has previously been created.

\n\n

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

\n\n

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

", + "operationId": "GetSetupIntentsIntent", + "parameters": [ + { + "description": "The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a SetupIntent object.

", + "operationId": "PostSetupIntentsIntent", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_directions": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "customer": { + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "blik": { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "link": { + "properties": { + "persistent_token": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to [\"card\"].", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}/cancel": { + "post": { + "description": "

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

\n\n

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

", + "operationId": "PostSetupIntentsIntentCancel", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate`", + "enum": [ + "abandoned", + "duplicate", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}/confirm": { + "post": { + "description": "

Confirm that your customer intends to set up the current or\nprovided payment method. For example, you would confirm a SetupIntent\nwhen a customer hits the “Save” button on a payment method management\npage on your website.

\n\n

If the selected payment method does not require any additional\nsteps from the customer, the SetupIntent will transition to the\nsucceeded status.

\n\n

Otherwise, it will transition to the requires_action status and\nsuggest additional actions via next_action. If setup fails,\nthe SetupIntent will transition to the\nrequires_payment_method status.

", + "operationId": "PostSetupIntentsIntentConfirm", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "client_secret": { + "description": "The client secret of the SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + { + "properties": { + "customer_acceptance": { + "properties": { + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "online", + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "client_key_param", + "type": "object" + } + ], + "description": "This hash contains details about the Mandate to create" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "blik": { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "link": { + "properties": { + "persistent_token": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate on the payment method's app or site.\nIf you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.\nThis parameter is only used for cards and other redirect-based payment methods.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}/verify_microdeposits": { + "post": { + "description": "

Verifies microdeposits on a SetupIntent object.

", + "operationId": "PostSetupIntentsIntentVerifyMicrodeposits", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret of the SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "descriptor_code": { + "description": "A six-character code starting with SM present in the microdeposit sent to the bank account.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/shipping_rates": { + "get": { + "description": "

Returns a list of your shipping rates.

", + "operationId": "GetShippingRates", + "parameters": [ + { + "description": "Only return shipping rates that are active or inactive.", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return shipping rates for the given currency.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/shipping_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/shipping_rates", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ShippingResourcesShippingRateList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new shipping rate object.

", + "operationId": "PostShippingRates", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "delivery_estimate": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fixed_amount": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "delivery_estimate": { + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fixed_amount": { + "description": "Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "type": "string" + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/shipping_rates/{shipping_rate_token}": { + "get": { + "description": "

Returns the shipping rate object with the given ID.

", + "operationId": "GetShippingRatesShippingRateToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "shipping_rate_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing shipping rate object.

", + "operationId": "PostShippingRatesShippingRateToken", + "parameters": [ + { + "in": "path", + "name": "shipping_rate_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fixed_amount": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fixed_amount": { + "description": "Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "title": "currency_option_update", + "type": "object" + }, + "type": "object" + } + }, + "title": "fixed_amount_update", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sigma/scheduled_query_runs": { + "get": { + "description": "

Returns a list of scheduled query runs.

", + "operationId": "GetSigmaScheduledQueryRuns", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/scheduled_query_run" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/sigma/scheduled_query_runs", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SigmaScheduledQueryRunList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sigma/scheduled_query_runs/{scheduled_query_run}": { + "get": { + "description": "

Retrieves the details of an scheduled query run.

", + "operationId": "GetSigmaScheduledQueryRunsScheduledQueryRun", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "scheduled_query_run", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scheduled_query_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources": { + "post": { + "description": "

Creates a new source object.

", + "operationId": "PostSources", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + }, + "receiver": { + "explode": true, + "style": "deepObject" + }, + "redirect": { + "explode": true, + "style": "deepObject" + }, + "source_order": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.", + "type": "string" + }, + "customer": { + "description": "The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow": { + "description": "The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.", + "enum": [ + "code_verification", + "none", + "receiver", + "redirect" + ], + "maxLength": 5000, + "type": "string" + }, + "mandate": { + "description": "Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.", + "properties": { + "acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "offline": { + "properties": { + "contact_email": { + "type": "string" + } + }, + "required": [ + "contact_email" + ], + "title": "mandate_offline_acceptance_params", + "type": "object" + }, + "online": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_online_acceptance_params", + "type": "object" + }, + "status": { + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "mandate_acceptance_params", + "type": "object" + }, + "amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "currency": { + "type": "string" + }, + "interval": { + "enum": [ + "one_time", + "scheduled", + "variable" + ], + "maxLength": 5000, + "type": "string" + }, + "notification_method": { + "enum": [ + "deprecated_none", + "email", + "manual", + "none", + "stripe_email" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_params", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "original_source": { + "description": "The source to share.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + }, + "receiver": { + "description": "Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).", + "properties": { + "refund_attributes_method": { + "enum": [ + "email", + "manual", + "none" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "receiver_params", + "type": "object" + }, + "redirect": { + "description": "Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).", + "properties": { + "return_url": { + "type": "string" + } + }, + "required": [ + "return_url" + ], + "title": "redirect_params", + "type": "object" + }, + "source_order": { + "description": "Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.", + "properties": { + "items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "parent": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "enum": [ + "discount", + "shipping", + "sku", + "tax" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "order_item_specs", + "type": "object" + }, + "type": "array" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "line1" + ], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address" + ], + "title": "order_shipping", + "type": "object" + } + }, + "title": "shallow_order_specs", + "type": "object" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.", + "maxLength": 5000, + "type": "string" + }, + "token": { + "description": "An optional token used to create the source. When passed, token properties will override source parameters.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "enum": [ + "reusable", + "single_use" + ], + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}": { + "get": { + "description": "

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

", + "operationId": "GetSourcesSource", + "parameters": [ + { + "description": "The client secret of the source. Required if a publishable key is used to retrieve the source.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

", + "operationId": "PostSourcesSource", + "parameters": [ + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + }, + "source_order": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount associated with the source.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.", + "properties": { + "acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "offline": { + "properties": { + "contact_email": { + "type": "string" + } + }, + "required": [ + "contact_email" + ], + "title": "mandate_offline_acceptance_params", + "type": "object" + }, + "online": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_online_acceptance_params", + "type": "object" + }, + "status": { + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "mandate_acceptance_params", + "type": "object" + }, + "amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "currency": { + "type": "string" + }, + "interval": { + "enum": [ + "one_time", + "scheduled", + "variable" + ], + "maxLength": 5000, + "type": "string" + }, + "notification_method": { + "enum": [ + "deprecated_none", + "email", + "manual", + "none", + "stripe_email" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_params", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "owner": { + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + }, + "source_order": { + "description": "Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.", + "properties": { + "items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "parent": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "enum": [ + "discount", + "shipping", + "sku", + "tax" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "order_item_specs", + "type": "object" + }, + "type": "array" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "line1" + ], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address" + ], + "title": "order_shipping", + "type": "object" + } + }, + "title": "order_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/mandate_notifications/{mandate_notification}": { + "get": { + "description": "

Retrieves a new Source MandateNotification.

", + "operationId": "GetSourcesSourceMandateNotificationsMandateNotification", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "mandate_notification", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source_mandate_notification" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/source_transactions": { + "get": { + "description": "

List source transactions for a given source.

", + "operationId": "GetSourcesSourceSourceTransactions", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/source_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/source_transactions/{source_transaction}": { + "get": { + "description": "

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

", + "operationId": "GetSourcesSourceSourceTransactionsSourceTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "source_transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/verify": { + "post": { + "description": "

Verify a given source.

", + "operationId": "PostSourcesSourceVerify", + "parameters": [ + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "values": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "values": { + "description": "The values needed to verify the source.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items": { + "get": { + "description": "

Returns a list of your subscription items for a given subscription.

", + "operationId": "GetSubscriptionItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The ID of the subscription whose items will be retrieved.", + "in": "query", + "name": "subscription", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscription_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionsItemsSubscriptionItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Adds a new item to an existing subscription. No existing items will be changed or replaced.

", + "operationId": "PostSubscriptionItems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + }, + "quantity": { + "description": "The quantity you'd like to apply to the subscription item you're creating.", + "type": "integer" + }, + "subscription": { + "description": "The identifier of the subscription to modify.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates." + } + }, + "required": [ + "subscription" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items/{item}": { + "delete": { + "description": "

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

", + "operationId": "DeleteSubscriptionItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": { + "clear_usage": { + "description": "Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.", + "type": "boolean" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the subscription item with the given ID.

", + "operationId": "GetSubscriptionItemsItem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the plan or quantity of an item on a current subscription.

", + "operationId": "PostSubscriptionItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "price": { + "description": "The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + }, + "quantity": { + "description": "The quantity you'd like to apply to the subscription item you're creating.", + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items/{subscription_item}/usage_record_summaries": { + "get": { + "description": "

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

\n\n

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

", + "operationId": "GetSubscriptionItemsSubscriptionItemUsageRecordSummaries", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "in": "path", + "name": "subscription_item", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/usage_record_summary" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "UsageEventsResourceUsageRecordSummaryList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items/{subscription_item}/usage_records": { + "post": { + "description": "

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

\n\n

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

\n\n

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

\n\n

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

", + "operationId": "PostSubscriptionItemsSubscriptionItemUsageRecords", + "parameters": [ + { + "in": "path", + "name": "subscription_item", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "timestamp": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "action": { + "description": "Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value.", + "enum": [ + "increment", + "set" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "quantity": { + "description": "The usage quantity for the specified timestamp.", + "type": "integer" + }, + "timestamp": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ], + "description": "The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `\"now\"`, Stripe records usage for the current time. Default is `\"now\"` if a value is not provided." + } + }, + "required": [ + "quantity" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/usage_record" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules": { + "get": { + "description": "

Retrieves the list of your subscription schedules.

", + "operationId": "GetSubscriptionSchedules", + "parameters": [ + { + "description": "Only return subscription schedules that were created canceled the given date interval.", + "explode": true, + "in": "query", + "name": "canceled_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that completed during the given date interval.", + "explode": true, + "in": "query", + "name": "completed_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules for the given customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return subscription schedules that were released during the given date interval.", + "explode": true, + "in": "query", + "name": "released_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that have not started yet.", + "in": "query", + "name": "scheduled", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription_schedule" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscription_schedules", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionSchedulesResourceScheduleList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

", + "operationId": "PostSubscriptionSchedules", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_settings": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "phases": { + "explode": true, + "style": "deepObject" + }, + "start_date": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The identifier of the customer to create the subscription schedule for.", + "maxLength": 5000, + "type": "string" + }, + "default_settings": { + "description": "Object representing the subscription schedule's default settings.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "default_settings_params", + "type": "object" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "from_subscription": { + "description": "Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "phases": { + "description": "List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.", + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "items" + ], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "start_date": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ], + "description": "When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules/{schedule}": { + "get": { + "description": "

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

", + "operationId": "GetSubscriptionSchedulesSchedule", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing subscription schedule.

", + "operationId": "PostSubscriptionSchedulesSchedule", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_settings": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "phases": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "default_settings": { + "description": "Object representing the subscription schedule's default settings.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "default_settings_params", + "type": "object" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "phases": { + "description": "List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.", + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "end_date": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ] + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ] + } + }, + "required": [ + "items" + ], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "description": "If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules/{schedule}/cancel": { + "post": { + "description": "

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

", + "operationId": "PostSubscriptionSchedulesScheduleCancel", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.", + "type": "boolean" + }, + "prorate": { + "description": "If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules/{schedule}/release": { + "post": { + "description": "

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

", + "operationId": "PostSubscriptionSchedulesScheduleRelease", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preserve_cancel_date": { + "description": "Keep any cancellation on the subscription that the schedule has set", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions": { + "get": { + "description": "

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

", + "operationId": "GetSubscriptions", + "parameters": [ + { + "description": "The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.", + "in": "query", + "name": "collection_method", + "required": false, + "schema": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "current_period_end", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "current_period_start", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The ID of the customer whose subscriptions will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter for subscriptions that contain this recurring price ID.", + "in": "query", + "name": "price", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "all", + "canceled", + "ended", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscriptions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionsSubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

\n\n

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.\nThe payment_behavior parameter determines the exact behavior of the initial payment.

\n\n

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead.\nSchedules provide the flexibility to model more complex billing configurations that change over time.

", + "operationId": "PostSubscriptions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "backdate_start_date": { + "description": "For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor": { + "description": "A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "type": "integer", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.", + "format": "unix-time", + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "The identifier of the customer to subscribe.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription." + }, + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge, for each of the subscription's invoices." + }, + "payment_behavior": { + "description": "Only applies to subscriptions with `collection_method=charge_automatically`.\n\nUse `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state.\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.\n\n`pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.\n\nSubscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.", + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "integer" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/search": { + "get": { + "description": "

Search for subscriptions you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetSubscriptionsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/{subscription_exposed_id}": { + "delete": { + "description": "

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

\n\n

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

\n\n

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

", + "operationId": "DeleteSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.", + "type": "boolean" + }, + "prorate": { + "description": "Will generate a proration invoice item that credits remaining unused time until the subscription period end.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the subscription with the given ID.

", + "operationId": "GetSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

", + "operationId": "PostSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "cancel_at": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "pause_collection": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates." + }, + "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.", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge, for each of the subscription's invoices." + }, + "pause_collection": { + "anyOf": [ + { + "properties": { + "behavior": { + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "behavior" + ], + "title": "pause_collection_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value." + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/{subscription_exposed_id}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a subscription.

", + "operationId": "DeleteSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/{subscription}/resume": { + "post": { + "description": "

Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.

", + "operationId": "PostSubscriptionsSubscriptionResume", + "parameters": [ + { + "in": "path", + "name": "subscription", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_codes": { + "get": { + "description": "

A list of all tax codes available to add to Products in order to allow specific tax calculations.

", + "operationId": "GetTaxCodes", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax_code" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxProductResourceTaxCodeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_codes/{id}": { + "get": { + "description": "

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

", + "operationId": "GetTaxCodesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_rates": { + "get": { + "description": "

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

", + "operationId": "GetTaxRates", + "parameters": [ + { + "description": "Optional flag to filter by tax rates that are either active or inactive (archived).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Optional range for filtering created date.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).", + "in": "query", + "name": "inclusive", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax_rates", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxRatesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new tax rate.

", + "operationId": "PostTaxRates", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rate, which will be shown to users.", + "maxLength": 50, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "inclusive": { + "description": "This specifies if the tax rate is inclusive or exclusive.", + "type": "boolean" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 50, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 2, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "type": "string" + } + }, + "required": [ + "display_name", + "inclusive", + "percentage" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_rates/{tax_rate}": { + "get": { + "description": "

Retrieves a tax rate with the given ID

", + "operationId": "GetTaxRatesTaxRate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "tax_rate", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing tax rate.

", + "operationId": "PostTaxRatesTaxRate", + "parameters": [ + { + "in": "path", + "name": "tax_rate", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rate, which will be shown to users.", + "maxLength": 50, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 50, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 2, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/configurations": { + "get": { + "description": "

Returns a list of Configuration objects.

", + "operationId": "GetTerminalConfigurations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "if present, only return the account default or non-default configurations.", + "in": "query", + "name": "is_account_default", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/terminal.configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/terminal/configurations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TerminalConfigurationConfigurationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new Configuration object.

", + "operationId": "PostTerminalConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bbpos_wisepos_e": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "tipping": { + "explode": true, + "style": "deepObject" + }, + "verifone_p400": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bbpos_wisepos_e": { + "description": "An object containing device type specific settings for BBPOS WisePOS E readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "bbpos_wise_pose", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "tipping": { + "anyOf": [ + { + "properties": { + "aud": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "cad": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "chf": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "czk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "dkk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "eur": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "gbp": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "hkd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "myr": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nok": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nzd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sek": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sgd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "usd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + } + }, + "title": "tipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Tipping configurations for readers supporting on-reader tips" + }, + "verifone_p400": { + "description": "An object containing device type specific settings for Verifone P400 readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "verifone_p400", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/configurations/{configuration}": { + "delete": { + "description": "

Deletes a Configuration object.

", + "operationId": "DeleteTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Configuration object.

", + "operationId": "GetTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.configuration" + }, + { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a new Configuration object.

", + "operationId": "PostTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bbpos_wisepos_e": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "tipping": { + "explode": true, + "style": "deepObject" + }, + "verifone_p400": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bbpos_wisepos_e": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "bbpos_wise_pose", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "An object containing device type specific settings for BBPOS WisePOS E readers" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "tipping": { + "anyOf": [ + { + "properties": { + "aud": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "cad": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "chf": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "czk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "dkk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "eur": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "gbp": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "hkd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "myr": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nok": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nzd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sek": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sgd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "usd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + } + }, + "title": "tipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Tipping configurations for readers supporting on-reader tips" + }, + "verifone_p400": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "verifone_p400", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "An object containing device type specific settings for Verifone P400 readers" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.configuration" + }, + { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/connection_tokens": { + "post": { + "description": "

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

", + "operationId": "PostTerminalConnectionTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "location": { + "description": "The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.connection_token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/locations": { + "get": { + "description": "

Returns a list of Location objects.

", + "operationId": "GetTerminalLocations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/terminal.location" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/terminal/locations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TerminalLocationLocationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new Location object.\nFor further details, including which address fields are required in each country, see the Manage locations guide.

", + "operationId": "PostTerminalLocations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The full address of the location.", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "create_location_address_param", + "type": "object" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 1000, + "type": "string" + }, + "display_name": { + "description": "A name for the location.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": [ + "address", + "display_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.location" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/locations/{location}": { + "delete": { + "description": "

Deletes a Location object.

", + "operationId": "DeleteTerminalLocationsLocation", + "parameters": [ + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.location" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Location object.

", + "operationId": "GetTerminalLocationsLocation", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "$ref": "#/components/schemas/deleted_terminal.location" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostTerminalLocationsLocation", + "parameters": [ + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The full address of the location.", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 1000, + "type": "string" + }, + "display_name": { + "description": "A name for the location.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "$ref": "#/components/schemas/deleted_terminal.location" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers": { + "get": { + "description": "

Returns a list of Reader objects.

", + "operationId": "GetTerminalReaders", + "parameters": [ + { + "description": "Filters readers by device type", + "in": "query", + "name": "device_type", + "required": false, + "schema": { + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "simulated_wisepos_e", + "stripe_m2", + "verifone_P400" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A location ID to filter the response list to only readers at the specific location", + "in": "query", + "name": "location", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A status filter to filter readers to only offline or online readers", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "offline", + "online" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "A list of readers", + "items": { + "$ref": "#/components/schemas/terminal.reader" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TerminalReaderRetrieveReader", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new Reader object.

", + "operationId": "PostTerminalReaders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.", + "maxLength": 5000, + "type": "string" + }, + "location": { + "description": "The location to assign the reader to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "registration_code": { + "description": "A code generated by the reader used for registering to an account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "registration_code" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}": { + "delete": { + "description": "

Deletes a Reader object.

", + "operationId": "DeleteTerminalReadersReader", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Reader object.

", + "operationId": "GetTerminalReadersReader", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.reader" + }, + { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostTerminalReadersReader", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "The new label of the reader.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.reader" + }, + { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/cancel_action": { + "post": { + "description": "

Cancels the current reader action.

", + "operationId": "PostTerminalReadersReaderCancelAction", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/process_payment_intent": { + "post": { + "description": "

Initiates a payment flow on a Reader.

", + "operationId": "PostTerminalReadersReaderProcessPaymentIntent", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "process_config": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_intent": { + "description": "PaymentIntent ID", + "maxLength": 5000, + "type": "string" + }, + "process_config": { + "description": "Configuration overrides", + "properties": { + "skip_tipping": { + "type": "boolean" + }, + "tipping": { + "properties": { + "amount_eligible": { + "type": "integer" + } + }, + "title": "tipping_config", + "type": "object" + } + }, + "title": "process_config", + "type": "object" + } + }, + "required": [ + "payment_intent" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/process_setup_intent": { + "post": { + "description": "

Initiates a setup intent flow on a Reader.

", + "operationId": "PostTerminalReadersReaderProcessSetupIntent", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer_consent_collected": { + "description": "Customer Consent Collected", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "setup_intent": { + "description": "SetupIntent ID", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "customer_consent_collected", + "setup_intent" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/refund_payment": { + "post": { + "description": "

Initiates a refund on a Reader

", + "operationId": "PostTerminalReadersReaderRefundPayment", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in __cents__ representing how much of this charge to refund.", + "type": "integer" + }, + "charge": { + "description": "ID of the Charge to refund.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_intent": { + "description": "ID of the PaymentIntent to refund.", + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/set_reader_display": { + "post": { + "description": "

Sets reader display to show cart details.

", + "operationId": "PostTerminalReadersReaderSetReaderDisplay", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "cart": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cart": { + "description": "Cart", + "properties": { + "currency": { + "type": "string" + }, + "line_items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": [ + "amount", + "description", + "quantity" + ], + "title": "line_item", + "type": "object" + }, + "type": "array" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "required": [ + "currency", + "line_items", + "total" + ], + "title": "cart", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type", + "enum": [ + "cart" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/customers/{customer}/fund_cash_balance": { + "post": { + "description": "

Create an incoming testmode bank transfer

", + "operationId": "PostTestHelpersCustomersCustomerFundCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reference": { + "description": "A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/deliver": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to delivered.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingDeliver", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/fail": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to failure.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingFail", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/return": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to returned.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingReturn", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/ship": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to shipped.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingShip", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/refunds/{refund}/expire": { + "post": { + "description": "

Expire a refund with a status of requires_action.

", + "operationId": "PostTestHelpersRefundsRefundExpire", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/terminal/readers/{reader}/present_payment_method": { + "post": { + "description": "

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

", + "operationId": "PostTestHelpersTerminalReadersReaderPresentPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_present": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "interac_present": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_present": { + "description": "Simulated data for the card_present payment method.", + "properties": { + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "card_present", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interac_present": { + "description": "Simulated data for the interac_present payment method.", + "properties": { + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "interac_present", + "type": "object" + }, + "type": { + "description": "Simulated payment type.", + "enum": [ + "card_present", + "interac_present" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/test_clocks": { + "get": { + "description": "

Returns a list of your test clocks.

", + "operationId": "GetTestHelpersTestClocks", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/test_helpers/test_clocks", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BillingClocksResourceBillingClockList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new test clock that can be attached to new customers and quotes.

", + "operationId": "PostTestHelpersTestClocks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "frozen_time": { + "description": "The initial frozen time for this test clock.", + "format": "unix-time", + "type": "integer" + }, + "name": { + "description": "The name for this test clock.", + "maxLength": 300, + "type": "string" + } + }, + "required": [ + "frozen_time" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/test_clocks/{test_clock}": { + "delete": { + "description": "

Deletes a test clock.

", + "operationId": "DeleteTestHelpersTestClocksTestClock", + "parameters": [ + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a test clock.

", + "operationId": "GetTestHelpersTestClocksTestClock", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/test_clocks/{test_clock}/advance": { + "post": { + "description": "

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

", + "operationId": "PostTestHelpersTestClocksTestClockAdvance", + "parameters": [ + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "frozen_time": { + "description": "The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "frozen_time" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/fail": { + "post": { + "description": "

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdFail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "failure_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "failure_details": { + "description": "Details about a failed InboundTransfer.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "failure_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/return": { + "post": { + "description": "

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdReturn", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed": { + "post": { + "description": "

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdSucceed", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/fail": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdFail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/post": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdPost", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/return": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdReturn", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "returned_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "returned_details": { + "description": "Optional hash to set the the return code.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "returned_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "returned_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "returned_details": { + "description": "Details about a returned OutboundTransfer.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "returned_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/received_credits": { + "post": { + "description": "

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

", + "operationId": "PostTestHelpersTreasuryReceivedCredits", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "initiating_payment_method_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to send funds to.", + "type": "string" + }, + "initiating_payment_method_details": { + "description": "Initiating payment method details for the object.", + "properties": { + "type": { + "enum": [ + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_bank_account_source_params", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "source_params", + "type": "object" + }, + "network": { + "description": "The rails used for the object.", + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "network" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_credit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/received_debits": { + "post": { + "description": "

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

", + "operationId": "PostTestHelpersTreasuryReceivedDebits", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "initiating_payment_method_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "initiating_payment_method_details": { + "description": "Initiating payment method details for the object.", + "properties": { + "type": { + "enum": [ + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_bank_account_source_params", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "source_params", + "type": "object" + }, + "network": { + "description": "The rails used for the object.", + "enum": [ + "ach" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "network" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_debit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tokens": { + "post": { + "description": "

Creates a single-use token that represents a bank account’s details.\nThis token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

", + "operationId": "PostTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account": { + "explode": true, + "style": "deepObject" + }, + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cvc_update": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "person": { + "explode": true, + "style": "deepObject" + }, + "pii": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "Information for the account this token will represent.", + "properties": { + "business_type": { + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "company": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "executives_provided": { + "type": "boolean" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "ownership_declaration_shown_and_signed": { + "type": "boolean" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "connect_js_account_token_company_specs", + "type": "object" + }, + "individual": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "connect_js_account_token_specs", + "type": "object" + }, + "bank_account": { + "description": "The bank account this token will represent.", + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "token_create_bank_account", + "type": "object", + "x-stripeBypassValidation": true + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "credit_card_specs", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "x-stripeBypassValidation": true + }, + "customer": { + "description": "The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).", + "maxLength": 5000, + "type": "string" + }, + "cvc_update": { + "description": "The updated CVC value this token will represent.", + "properties": { + "cvc": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "cvc" + ], + "title": "cvc_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "person": { + "description": "Information for the person this token will represent.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "documents": { + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "nationality": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "person_token_specs", + "type": "object" + }, + "pii": { + "description": "The PII this token will represent.", + "properties": { + "id_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "pii_token_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tokens/{token}": { + "get": { + "description": "

Retrieves the token with the given ID.

", + "operationId": "GetTokensToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/topups": { + "get": { + "description": "

Returns a list of top-ups.

", + "operationId": "GetTopups", + "parameters": [ + { + "description": "A positive integer representing how much to transfer.", + "explode": true, + "in": "query", + "name": "amount", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "pending", + "succeeded" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/topup" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/topups", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TopupList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Top up the balance of an account

", + "operationId": "PostTopups", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to transfer.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "source": { + "description": "The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.", + "maxLength": 15, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this top-up as part of a group.", + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/topups/{topup}": { + "get": { + "description": "

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

", + "operationId": "GetTopupsTopup", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the metadata of a top-up. Other top-up details are not editable by design.

", + "operationId": "PostTopupsTopup", + "parameters": [ + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/topups/{topup}/cancel": { + "post": { + "description": "

Cancels a top-up. Only pending top-ups can be canceled.

", + "operationId": "PostTopupsTopupCancel", + "parameters": [ + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers": { + "get": { + "description": "

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

", + "operationId": "GetTransfers", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transfers for the destination specified by this account ID.", + "in": "query", + "name": "destination", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transfers with the specified transfer group.", + "in": "query", + "name": "transfer_group", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/transfers", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

", + "operationId": "PostTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents (or local equivalent) representing how much to transfer.", + "type": "integer" + }, + "currency": { + "description": "3-letter [ISO code for currency](https://stripe.com/docs/payouts).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination": { + "description": "The ID of a connected Stripe account. See the Connect documentation for details.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source_transaction": { + "description": "You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details.", + "type": "string" + }, + "source_type": { + "description": "The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.", + "enum": [ + "bank_account", + "card", + "fpx" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "type": "string" + } + }, + "required": [ + "currency", + "destination" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers/{id}/reversals": { + "get": { + "description": "

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

", + "operationId": "GetTransfersIdReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new reversal, you must specify a transfer to create it on.

\n\n

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

\n\n

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

", + "operationId": "PostTransfersIdReversals", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers/{transfer}": { + "get": { + "description": "

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

", + "operationId": "GetTransfersTransfer", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request accepts only metadata as an argument.

", + "operationId": "PostTransfersTransfer", + "parameters": [ + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers/{transfer}/reversals/{id}": { + "get": { + "description": "

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

", + "operationId": "GetTransfersTransferReversalsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request only accepts metadata and description as arguments.

", + "operationId": "PostTransfersTransferReversalsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/credit_reversals": { + "get": { + "description": "

Returns a list of CreditReversals.

", + "operationId": "GetTreasuryCreditReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return CreditReversals for the ReceivedCredit ID.", + "in": "query", + "name": "received_credit", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return CreditReversals for a given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "posted", + "processing" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedCreditsResourceCreditReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Reverses a ReceivedCredit and creates a CreditReversal object.

", + "operationId": "PostTreasuryCreditReversals", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "received_credit": { + "description": "The ReceivedCredit to reverse.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_credit" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.credit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/credit_reversals/{credit_reversal}": { + "get": { + "description": "

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

", + "operationId": "GetTreasuryCreditReversalsCreditReversal", + "parameters": [ + { + "in": "path", + "name": "credit_reversal", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.credit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/debit_reversals": { + "get": { + "description": "

Returns a list of DebitReversals.

", + "operationId": "GetTreasuryDebitReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for the ReceivedDebit ID.", + "in": "query", + "name": "received_debit", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for a given resolution.", + "in": "query", + "name": "resolution", + "required": false, + "schema": { + "enum": [ + "lost", + "won" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for a given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "completed", + "processing" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.debit_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedDebitsResourceDebitReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Reverses a ReceivedDebit and creates a DebitReversal object.

", + "operationId": "PostTreasuryDebitReversals", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "received_debit": { + "description": "The ReceivedDebit to reverse.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.debit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/debit_reversals/{debit_reversal}": { + "get": { + "description": "

Retrieves a DebitReversal object.

", + "operationId": "GetTreasuryDebitReversalsDebitReversal", + "parameters": [ + { + "in": "path", + "name": "debit_reversal", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.debit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/financial_accounts": { + "get": { + "description": "

Returns a list of FinancialAccounts.

", + "operationId": "GetTreasuryFinancialAccounts", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "An object ID cursor for use in pagination.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit ranging from 1 to 100 (defaults to 10).", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "An object ID cursor for use in pagination.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/treasury.financial_account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/financial_accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccounts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "platform_restrictions": { + "explode": true, + "style": "deepObject" + }, + "supported_currencies": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.", + "properties": { + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "financial_addresses": { + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "title": "feature_access", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "platform_restrictions": { + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "properties": { + "inbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + }, + "outbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + } + }, + "title": "platform_restrictions", + "type": "object" + }, + "supported_currencies": { + "description": "The currencies the FinancialAccount can hold a balance in.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "supported_currencies" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/financial_accounts/{financial_account}": { + "get": { + "description": "

Retrieves the details of a FinancialAccount.

", + "operationId": "GetTreasuryFinancialAccountsFinancialAccount", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the details of a FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccount", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "platform_restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.", + "properties": { + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "financial_addresses": { + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "title": "feature_access", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "platform_restrictions": { + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "properties": { + "inbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + }, + "outbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + } + }, + "title": "platform_restrictions", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/financial_accounts/{financial_account}/features": { + "get": { + "description": "

Retrieves Features information associated with the FinancialAccount.

", + "operationId": "GetTreasuryFinancialAccountsFinancialAccountFeatures", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account_features" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the Features associated with a FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccountFeatures", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_issuing": { + "explode": true, + "style": "deepObject" + }, + "deposit_insurance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "financial_addresses": { + "explode": true, + "style": "deepObject" + }, + "inbound_transfers": { + "explode": true, + "style": "deepObject" + }, + "intra_stripe_flows": { + "explode": true, + "style": "deepObject" + }, + "outbound_payments": { + "explode": true, + "style": "deepObject" + }, + "outbound_transfers": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_issuing": { + "description": "Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "description": "Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_addresses": { + "description": "Contains Features that add FinancialAddresses to the FinancialAccount.", + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "description": "Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "description": "Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "description": "Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "description": "Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account_features" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/inbound_transfers": { + "get": { + "description": "

Returns a list of InboundTransfers sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryInboundTransfers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "processing", + "succeeded" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryInboundTransfersResourceInboundTransferList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an InboundTransfer.

", + "operationId": "PostTreasuryInboundTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to send funds to.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for the InboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "The complete description that appears on your customers' statements. Maximum 10 characters.", + "maxLength": 10, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "origin_payment_method" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/inbound_transfers/{id}": { + "get": { + "description": "

Retrieves the details of an existing InboundTransfer.

", + "operationId": "GetTreasuryInboundTransfersId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel": { + "post": { + "description": "

Cancels an InboundTransfer.

", + "operationId": "PostTreasuryInboundTransfersInboundTransferCancel", + "parameters": [ + { + "in": "path", + "name": "inbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_payments": { + "get": { + "description": "

Returns a list of OutboundPayments sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryOutboundPayments", + "parameters": [ + { + "description": "Only return OutboundPayments sent to this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/outbound_payments", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an OutboundPayment.

", + "operationId": "PostTreasuryOutboundPayments", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "destination_payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "destination_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "end_user_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method_data": { + "description": "Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.", + "properties": { + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "financial_account": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": { + "enum": [ + "financial_account", + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data", + "type": "object" + }, + "destination_payment_method_options": { + "description": "Payment method-specific configuration for this OutboundPayment.", + "properties": { + "us_bank_account": { + "anyOf": [ + { + "properties": { + "network": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "end_user_details": { + "description": "End user details.", + "properties": { + "ip_address": { + "type": "string" + }, + "present": { + "type": "boolean" + } + }, + "required": [ + "present" + ], + "title": "end_user_details_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_payments/{id}": { + "get": { + "description": "

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

", + "operationId": "GetTreasuryOutboundPaymentsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_payments/{id}/cancel": { + "post": { + "description": "

Cancel an OutboundPayment.

", + "operationId": "PostTreasuryOutboundPaymentsIdCancel", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_transfers": { + "get": { + "description": "

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryOutboundTransfers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryOutboundTransfersResourceOutboundTransferList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an OutboundTransfer.

", + "operationId": "PostTreasuryOutboundTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "destination_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod to use as the payment instrument for the OutboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method_options": { + "description": "Hash describing payment method configuration details.", + "properties": { + "us_bank_account": { + "anyOf": [ + { + "properties": { + "network": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_transfers/{outbound_transfer}": { + "get": { + "description": "

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

", + "operationId": "GetTreasuryOutboundTransfersOutboundTransfer", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel": { + "post": { + "description": "

An OutboundTransfer can be canceled if the funds have not yet been paid out.

", + "operationId": "PostTreasuryOutboundTransfersOutboundTransferCancel", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_credits": { + "get": { + "description": "

Returns a list of ReceivedCredits.

", + "operationId": "GetTreasuryReceivedCredits", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The FinancialAccount that received the funds.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return ReceivedCredits described by the flow.", + "explode": true, + "in": "query", + "name": "linked_flows", + "required": false, + "schema": { + "properties": { + "source_flow_type": { + "enum": [ + "credit_reversal", + "other", + "outbound_payment", + "payout" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "source_flow_type" + ], + "title": "linked_flows_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return ReceivedCredits that have the given status: `succeeded` or `failed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.received_credit" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedCreditsResourceReceivedCreditList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_credits/{id}": { + "get": { + "description": "

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

", + "operationId": "GetTreasuryReceivedCreditsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_credit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_debits": { + "get": { + "description": "

Returns a list of ReceivedDebits.

", + "operationId": "GetTreasuryReceivedDebits", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The FinancialAccount that funds were pulled from.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return ReceivedDebits that have the given status: `succeeded` or `failed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.received_debit" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedDebitsResourceReceivedDebitList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_debits/{id}": { + "get": { + "description": "

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

", + "operationId": "GetTreasuryReceivedDebitsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_debit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transaction_entries": { + "get": { + "description": "

Retrieves a list of TransactionEntry objects.

", + "operationId": "GetTreasuryTransactionEntries", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "effective_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.", + "in": "query", + "name": "order_by", + "required": false, + "schema": { + "enum": [ + "created", + "effective_at" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return TransactionEntries associated with this Transaction.", + "in": "query", + "name": "transaction", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transaction_entries/{id}": { + "get": { + "description": "

Retrieves a TransactionEntry object.

", + "operationId": "GetTreasuryTransactionEntriesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.transaction_entry" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transactions": { + "get": { + "description": "

Retrieves a list of Transaction objects.

", + "operationId": "GetTreasuryTransactions", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.", + "in": "query", + "name": "order_by", + "required": false, + "schema": { + "enum": [ + "created", + "posted_at" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return Transactions that have the given status: `open`, `posted`, or `void`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "open", + "posted", + "void" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.", + "explode": true, + "in": "query", + "name": "status_transitions", + "required": false, + "schema": { + "properties": { + "posted_at": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + } + }, + "title": "status_transition_timestamp_specs", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryTransactionsResourceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transactions/{id}": { + "get": { + "description": "

Retrieves the details of an existing Transaction.

", + "operationId": "GetTreasuryTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/webhook_endpoints": { + "get": { + "description": "

Returns a list of your webhook endpoints.

", + "operationId": "GetWebhookEndpoints", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/webhook_endpoint" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/webhook_endpoints", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "NotificationWebhookEndpointList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

", + "operationId": "PostWebhookEndpoints", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "enabled_events": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "api_version": { + "description": "Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.", + "enum": [ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "connect": { + "description": "Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.", + "type": "boolean" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": "string" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "enum": [ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "invoiceitem.updated", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "order.created", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "sku.created", + "sku.deleted", + "sku.updated", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "required": [ + "enabled_events", + "url" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/webhook_endpoints/{webhook_endpoint}": { + "delete": { + "description": "

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

", + "operationId": "DeleteWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the webhook endpoint with the given ID.

", + "operationId": "GetWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

", + "operationId": "PostWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "enabled_events": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": "string" + }, + "disabled": { + "description": "Disable the webhook endpoint if set to true.", + "type": "boolean" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "enum": [ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "invoiceitem.updated", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "order.created", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "sku.created", + "sku.deleted", + "sku.updated", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + } + }, + "security": [ + { + "basicAuth": [] + }, + { + "bearerAuth": [] + } + ], + "servers": [ + { + "url": "https://api.stripe.com/" + } + ] +} \ No newline at end of file diff --git a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts index 093a27bfa1a..bbcd74efb21 100644 --- a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts @@ -177,847 +177,17 @@ describe("stripe.webhooks", async () => { // } // }); - // describe("schemas", async () => { - // test("formResponse 1", async () => { - // const data = { - // event_id: "LtWXD3crgy", - // event_type: "form_response", - // form_response: { - // answers: [ - // { - // field: { - // id: "DlXFaesGBpoF", - // type: "long_text", - // }, - // text: "It's cold right now! I live in an older medium-sized city with a university. Geographically, the area is hilly.", - // type: "text", - // }, - // { - // email: "laura@example.com", - // field: { - // id: "SMEUb7VJz92Q", - // type: "email", - // }, - // type: "email", - // }, - // { - // field: { - // id: "JwWggjAKtOkA", - // type: "short_text", - // }, - // text: "Laura", - // type: "text", - // }, - // { - // date: "2005-10-15", - // field: { - // id: "KoJxDM3c6x8h", - // type: "date", - // }, - // type: "date", - // }, - // { - // choices: { - // labels: ["London", "Sydney"], - // }, - // field: { - // id: "PNe8ZKBK8C2Q", - // type: "picture_choice", - // }, - // type: "choices", - // }, - // { - // field: { - // id: "Q7M2XAwY04dW", - // type: "number", - // }, - // number: 5, - // type: "number", - // }, - // { - // boolean: true, - // field: { - // id: "gFFf3xAkJKsr", - // type: "legal", - // }, - // type: "boolean", - // }, - // { - // choice: { - // label: "London", - // }, - // field: { - // id: "k6TP9oLGgHjl", - // type: "multiple_choice", - // }, - // type: "choice", - // }, - // { - // boolean: false, - // field: { - // id: "RUqkXSeXBXSd", - // type: "yes_no", - // }, - // type: "boolean", - // }, - // { - // field: { - // id: "NRsxU591jIW9", - // type: "opinion_scale", - // }, - // number: 2, - // type: "number", - // }, - // { - // field: { - // id: "WOTdC00F8A3h", - // type: "rating", - // }, - // number: 3, - // type: "number", - // }, - // { - // field: { - // id: "pn48RmPazVdM", - // type: "number", - // }, - // number: 4, - // type: "number", - // }, - // { - // field: { - // id: "M5tXK5kG7IeA", - // ref: "readable_ref_calendly", - // type: "calendly", - // }, - // type: "url", - // url: "https://calendly.com/scheduled_events/EVENT_TYPE/invitees/INVITEE", - // }, - // ], - // calculated: { - // score: 9, - // }, - // definition: { - // endings: [ - // { - // id: "dN5FLyFpCMFo", - // properties: { - // button_mode: "default_redirect", - // button_text: "Create a typeform", - // share_icons: true, - // show_button: true, - // }, - // ref: "01GRC8GR2017M6WW347T86VV39", - // title: "Bye!", - // type: "thankyou_screen", - // }, - // ], - // fields: [ - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "DlXFaesGBpoF", - // ref: "readable_ref_long_text", - // title: - // "Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", - // type: "long_text", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "SMEUb7VJz92Q", - // ref: "readable_ref_email", - // title: - // "If you're OK with our city management following up if they have further questions, please give us your email address.", - // type: "email", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "JwWggjAKtOkA", - // ref: "readable_ref_short_text", - // title: "What is your first name?", - // type: "short_text", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "KoJxDM3c6x8h", - // ref: "readable_ref_date", - // title: "When did you move to the place where you live?", - // type: "date", - // }, - // { - // allow_multiple_selections: true, - // allow_other_choice: false, - // id: "PNe8ZKBK8C2Q", - // ref: "readable_ref_picture_choice", - // title: - // "Which pictures do you like? You can choose as many as you like.", - // type: "picture_choice", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "Q7M2XAwY04dW", - // ref: "readable_ref_number1", - // title: - // "On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", - // type: "number", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "gFFf3xAkJKsr", - // ref: "readable_ref_legal", - // title: - // "By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", - // type: "legal", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "k6TP9oLGgHjl", - // ref: "readable_ref_multiple_choice", - // title: "Which of these cities is your favorite?", - // type: "multiple_choice", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "RUqkXSeXBXSd", - // ref: "readable_ref_yes_no", - // title: "Do you have a favorite city we haven't listed?", - // type: "yes_no", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "NRsxU591jIW9", - // ref: "readable_ref_opinion_scale", - // title: - // "How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", - // type: "opinion_scale", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "WOTdC00F8A3h", - // ref: "readable_ref_rating", - // title: - // "How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", - // type: "rating", - // }, - // { - // allow_multiple_selections: false, - // allow_other_choice: false, - // id: "pn48RmPazVdM", - // ref: "readable_ref_number2", - // title: - // "On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", - // type: "number", - // }, - // { - // id: "M5tXK5kG7IeA", - // properties: {}, - // ref: "readable_ref_calendly", - // title: "Book a time with me", - // type: "calendly", - // }, - // ], - // id: "lT4Z3j", - // title: "Webhooks example", - // }, - // ending: { - // id: "dN5FLyFpCMFo", - // ref: "01GRC8GR2017M6WW347T86VV39", - // }, - // form_id: "lT4Z3j", - // hidden: { - // user_id: "abc123456", - // }, - // landed_at: "2018-01-18T18:07:02Z", - // submitted_at: "2018-01-18T18:17:02Z", - // token: "a3a12ec67a1365927098a606107fac15", - // variables: [ - // { - // key: "score", - // number: 4, - // type: "number", - // }, - // { - // key: "name", - // text: "typeform", - // type: "text", - // }, - // ], - // }, - // }; - - // const validationResult = await validate(data, events.formResponse.schema); - // console.log(validationResult); - // expect(validationResult).toEqual({ - // success: true, - // }); - // }); + describe("schemas", async () => { + test("check 1", async () => { + const data = events.checkoutCompleted.examples[0]; - // test("formResponse 2", async () => { - // const data = { - // event_id: "01GTSD5R1YKSV4DE4YH0WTHDSJ", - // event_type: "form_response", - // form_response: { - // token: "hphw0h2xjkq50gx81hphwiu6jkh43j6b", - // ending: { id: "DefaultTyScreen", ref: "default_tys" }, - // answers: [ - // { - // type: "number", - // field: { - // id: "w4L7U4WU7USv", - // ref: "2c62a515-ef36-438e-a4a4-222a39e2e99e", - // type: "nps", - // }, - // number: 5, - // }, - // { - // text: "fghhfg", - // type: "text", - // field: { - // id: "zU5ISuBXtB56", - // ref: "01E0D1GYEQKP759R4NP94X7V1D", - // type: "long_text", - // }, - // }, - // { - // type: "choice", - // field: { - // id: "VLghy7KPHsxX", - // ref: "01E0D1GYEQSC82ZJHD7NFF072Q", - // type: "multiple_choice", - // }, - // choice: { label: "35 to 44" }, - // }, - // { - // type: "choice", - // field: { - // id: "AddS20Xg25Qm", - // ref: "01E0D1GYEQK8THD0P29B10ADRQ", - // type: "dropdown", - // }, - // choice: { label: "Albania" }, - // }, - // { - // type: "choice", - // field: { - // id: "HGOZa4w1y0KA", - // ref: "01E0D1GYEQD9BB15HQM3GHTP48", - // type: "dropdown", - // }, - // choice: { label: "Airlines / Aviation" }, - // }, - // { - // type: "choice", - // field: { - // id: "KvMvx4hBtOcV", - // ref: "01E0D1GYEQ17BCE98BZPASH3K6", - // type: "multiple_choice", - // }, - // choice: { label: "51 to 200" }, - // }, - // ], - // form_id: "KywLXMeB", - // landed_at: "2023-03-05T17:29:54Z", - // definition: { - // id: "KywLXMeB", - // title: "Net Promoter Score® (copy)", - // fields: [ - // { - // id: "w4L7U4WU7USv", - // ref: "2c62a515-ef36-438e-a4a4-222a39e2e99e", - // type: "nps", - // title: - // "How likely are you to recommend us to a friend or colleague?", - // properties: {}, - // }, - // { - // id: "zU5ISuBXtB56", - // ref: "01E0D1GYEQKP759R4NP94X7V1D", - // type: "long_text", - // title: "Why did you choose ?", - // properties: {}, - // }, - // { - // id: "VLghy7KPHsxX", - // ref: "01E0D1GYEQSC82ZJHD7NFF072Q", - // type: "multiple_choice", - // title: "What's your age?", - // choices: [ - // { id: "SQsDGQMdaGn2", label: "Under 18" }, - // { id: "PldS57HPKq31", label: "18 to 24" }, - // { id: "h9xZWNI7wyDt", label: "25 to 34" }, - // { id: "cgDtmheGvgXA", label: "35 to 44" }, - // { id: "Xu9RKmULlXxA", label: "45 to 54" }, - // { id: "3xGelJVg6BQ3", label: "55 to 64" }, - // { id: "yO8pK25uvTED", label: "65 to 74" }, - // { id: "Y4mxwlJH0IsU", label: "75 or older" }, - // ], - // properties: {}, - // }, - // { - // id: "AddS20Xg25Qm", - // ref: "01E0D1GYEQK8THD0P29B10ADRQ", - // type: "dropdown", - // title: "What's your country of residence?", - // choices: [ - // { id: "ggpVHxwo5xyY", label: "Afghanistan" }, - // { id: "mOP9eVTnIJCC", label: "Albania" }, - // { id: "KNOnnKx2exYM", label: "Algeria" }, - // { id: "457irbXVMAVL", label: "Andorra" }, - // { id: "5GwOYQdjunSR", label: "Angola" }, - // { id: "GgfrKlBo3rRE", label: "Antigua and Barbuda" }, - // { id: "g6MVZiPUIMdV", label: "Argentina" }, - // { id: "snLjlzg7V2FO", label: "Armenia" }, - // { id: "OwfIvcYYDQD9", label: "Aruba" }, - // { id: "KskA2KLyDNGr", label: "Australia" }, - // { id: "wQ4o0wrPUuV6", label: "Austria" }, - // { id: "Orp7HpktRv4O", label: "Azerbaijan" }, - // { id: "TFP5A8J08YxC", label: "Bahamas" }, - // { id: "BK7RXLCdYvlB", label: "Bahrain" }, - // { id: "Dtzd0fty095k", label: "Bangladesh" }, - // { id: "tbMJa4OHwMpe", label: "Barbados" }, - // { id: "AvVzIoDDPVHJ", label: "Belarus" }, - // { id: "IAXpsFx2yj09", label: "Belgium" }, - // { id: "fF5aHJmR3WS6", label: "Belize" }, - // { id: "M45AobghyYUL", label: "Benin" }, - // { id: "E66Q0BZ8iqh4", label: "Bhutan" }, - // { id: "ua2XJ0Mj0QFi", label: "Bolivia" }, - // { id: "a1BvdshzHVuU", label: "Bosnia and Herzegovina" }, - // { id: "mOqNmwmDV5bb", label: "Botswana" }, - // { id: "Do2TnRVgf1YO", label: "Brazil" }, - // { id: "FXfkCxsLSUvU", label: "Brunei" }, - // { id: "zsIw5gE2DDUH", label: "Bulgaria" }, - // { id: "XoMFygcC8MGc", label: "Burkina Faso" }, - // { id: "xPk1ogSDfO4V", label: "Burma" }, - // { id: "osLlzk1Zj3B8", label: "Burundi" }, - // { id: "dsvh9KcqcwW1", label: "Cambodia" }, - // { id: "xC8nBXYLAGRk", label: "Cameroon" }, - // { id: "GYfkjM0QJhPx", label: "Canada" }, - // { id: "bfcfNu4sGQTJ", label: "Cape Verde" }, - // { id: "u5e9EdEoaKOB", label: "Central African Republic" }, - // { id: "pA0gp2dLXVnm", label: "Chad" }, - // { id: "cldLTkwvMcnv", label: "Chile" }, - // { id: "vcS7F8eVdzst", label: "China" }, - // { id: "5pyvWuSkh3v6", label: "Colombia" }, - // { id: "L1RHnTrgnyFa", label: "Comoros" }, - // { - // id: "XiO6zcYufsT7", - // label: "Democratic Republic of the Congo", - // }, - // { id: "bZQXYgBHlXkd", label: "Costa Rica" }, - // { id: "yv8sBfGnZuNn", label: "Cote d'Ivoire" }, - // { id: "QqFHSnlHa1BT", label: "Croatia" }, - // { id: "gf5mNngs9Szn", label: "Cuba" }, - // { id: "sSQmANHUeCU5", label: "Curacao" }, - // { id: "cdySLFXuAqPK", label: "Cyprus" }, - // { id: "w9ITvUlq00zk", label: "Czech Republic" }, - // { id: "DQXayFU1WOMd", label: "Denmark" }, - // { id: "915jWua5Y6UO", label: "Djibouti" }, - // { id: "FEOBwmkZh5jR", label: "Dominica" }, - // { id: "PbABWSJmsXxp", label: "Dominican Republic" }, - // { id: "Sm3isUQqRPU3", label: "East Timor" }, - // { id: "KTBj6pfJkUgT", label: "Ecuador" }, - // { id: "2kRpeiExhDMg", label: "Egypt" }, - // { id: "rkOERPwZUQ6q", label: "El Salvador" }, - // { id: "Xyoe3jrO6h7E", label: "Equatorial Guinea" }, - // { id: "maJ0pI5bdirI", label: "Eritrea" }, - // { id: "X31dYiw25wmD", label: "Estonia" }, - // { id: "9pd1nKNrQ0GL", label: "Ethiopia" }, - // { id: "DgZs5L5B2Hqi", label: "Fiji" }, - // { id: "ZZAvbCBbNAJH", label: "Finland" }, - // { id: "IuXU5KZ2VN91", label: "France" }, - // { id: "OnZSAKWaJIU8", label: "Gabon" }, - // { id: "cmHEGf3NH2sA", label: "Gambia" }, - // { id: "xDYXjww9Xtgo", label: "Georgia" }, - // { id: "NuBE9QCiSDc2", label: "Germany" }, - // { id: "RrIlTGlQRKSE", label: "Ghana" }, - // { id: "XqQ1PXOzsJUG", label: "Greece" }, - // { id: "RkMh2hl4WXh0", label: "Grenada" }, - // { id: "6oQwzPhJrj7R", label: "Guatemala" }, - // { id: "5afXBrBpRN0w", label: "Guinea" }, - // { id: "qFvl0OVqT5Or", label: "Guinea-Bissau" }, - // { id: "3tZqajnmemz0", label: "Guyana" }, - // { id: "yhpg38rY1jFJ", label: "Haiti" }, - // { id: "0H7Oa3hmtNpW", label: "Holy See" }, - // { id: "75OSvjbpTbNV", label: "Honduras" }, - // { id: "TaefzvkdvTg4", label: "Hong Kong" }, - // { id: "AeMRpGZgcyVG", label: "Hungary" }, - // { id: "KBJizGOFHAMl", label: "Iceland" }, - // { id: "DIDO3s3yBl8t", label: "India" }, - // { id: "EJ8pibBAPXGB", label: "Indonesia" }, - // { id: "sOjRUeecgUSF", label: "Iran" }, - // { id: "Hur1mJ1bmQAc", label: "Iraq" }, - // { id: "X7GjPWpIfA5w", label: "Ireland" }, - // { id: "qklzBVYmx3JQ", label: "Israel" }, - // { id: "pfKzb57zkhxz", label: "Italy" }, - // { id: "PeMKcsNVsE67", label: "Jamaica" }, - // { id: "dtLFo2hjuayU", label: "Japan" }, - // { id: "M7rMlJaKyepP", label: "Jordan" }, - // { id: "5w05kNWyDhSk", label: "Kazakhstan" }, - // { id: "jb3Or7SlMrEL", label: "Kenya" }, - // { id: "0vGWD1l9eyRC", label: "Kiribati" }, - // { id: "hRmyNAMQg7Wx", label: "Kosovo" }, - // { id: "EAWjwqRsXpUN", label: "Kuwait" }, - // { id: "AKydA2diOPJ9", label: "Kyrgyzstan" }, - // { id: "Y3BwdRzjzg4w", label: "Laos" }, - // { id: "azcPEY3tw8zB", label: "Latvia" }, - // { id: "iaDA1gcwvLok", label: "Lebanon" }, - // { id: "99NiMd7U6MNH", label: "Lesotho" }, - // { id: "0kvw7ftffYNV", label: "Liberia" }, - // { id: "71pMBrCicOjj", label: "Libya" }, - // { id: "gzamHsfQuqHJ", label: "Liechtenstein" }, - // { id: "wusYAZJ9AOPU", label: "Lithuania" }, - // { id: "3TT3T1ctU7cu", label: "Luxembourg" }, - // { id: "iKKZEARJNWnH", label: "Macau" }, - // { id: "pwYlUwiMDsMn", label: "Macedonia" }, - // { id: "SJ4LJtOUhi8T", label: "Madagascar" }, - // { id: "0lV7E5J5BjL2", label: "Malawi" }, - // { id: "D3hxSqJ3ecGI", label: "Malaysia" }, - // { id: "MD9vfEtORl5I", label: "Maldives" }, - // { id: "lm0qiEoUyWJQ", label: "Mali" }, - // { id: "pY1svv8Wmmik", label: "Malta" }, - // { id: "Vyxcknp5FxkZ", label: "Marshall Islands" }, - // { id: "Et2OIYo09lFh", label: "Mauritania" }, - // { id: "TTFv8wWUGxrL", label: "Mauritius" }, - // { id: "V700pfY1WmiR", label: "Mexico" }, - // { id: "yOSMmEdLCCuv", label: "Micronesia" }, - // { id: "gsu3MFEl8w3Y", label: "Moldova" }, - // { id: "cTaKbfzMbd4E", label: "Monaco" }, - // { id: "ilsmf1EByAby", label: "Mongolia" }, - // { id: "mjyCLTqOBBzD", label: "Montenegro" }, - // { id: "45QMORuJSJqs", label: "Morocco" }, - // { id: "UPKZfXtHAtL4", label: "Mozambique" }, - // { id: "6JGAFZWk2F0c", label: "Namibia" }, - // { id: "RAzzAwKCHVWV", label: "Nauru" }, - // { id: "VLIdG7FehvOA", label: "Nepal" }, - // { id: "nfkjJlekuBL5", label: "Netherlands" }, - // { id: "ZX4R5DSFr0JB", label: "Netherlands Antilles" }, - // { id: "vD0epxjGd9mx", label: "New Zealand" }, - // { id: "MEwOvWXLx3oY", label: "Nicaragua" }, - // { id: "L4h3KmLJH7jS", label: "Niger" }, - // { id: "jPUbeuiEYe0b", label: "Nigeria" }, - // { id: "uPlyhEafOdQp", label: "North Korea" }, - // { id: "WFyflJIL33Fj", label: "Norway" }, - // { id: "YjjYDLM8FqUF", label: "Oman" }, - // { id: "EncJ3TVvCLQv", label: "Pakistan" }, - // { id: "vBSEk4bamECF", label: "Palau" }, - // { id: "AxxDvya6pDlt", label: "Palestinian Territories" }, - // { id: "WCeodSquLgpb", label: "Panama" }, - // { id: "ataYnxT13TvK", label: "Papua New Guinea" }, - // { id: "J2jKGUzmjf4S", label: "Paraguay" }, - // { id: "VcwyY6ff1u7d", label: "Peru" }, - // { id: "EVmEBkD5Xix2", label: "Philippines" }, - // { id: "iF5y1bW1v8hm", label: "Poland" }, - // { id: "v40zNHMaqbr7", label: "Portugal" }, - // { id: "VvuFo8NEWwHr", label: "Qatar" }, - // { id: "88CwuIlqIV7Y", label: "Romania" }, - // { id: "lxh51YkksSoN", label: "Russia" }, - // { id: "np8fMzz33Dok", label: "Rwanda" }, - // { id: "ZIlLXuzLa5n0", label: "Saint Kitts and Nevis" }, - // { id: "PLf7ZfXhuHmh", label: "Saint Lucia" }, - // { - // id: "H2esyJBCWQ66", - // label: "Saint Vincent and the Grenadines", - // }, - // { id: "e0srYwLU8IsT", label: "Samoa" }, - // { id: "dYfyeFXfqgne", label: "San Marino" }, - // { id: "y25FmWFP3iVv", label: "Sao Tome and Principe" }, - // { id: "NLCwpMSpZmio", label: "Saudi Arabia" }, - // { id: "qO9XHeoBSRni", label: "Senegal" }, - // { id: "o5zx2a2buPSe", label: "Serbia" }, - // { id: "vV3nsJDxtDoU", label: "Seychelles" }, - // { id: "LCNpig2cPPRY", label: "Sierra Leone" }, - // { id: "eXHNHTIlWwlR", label: "Singapore" }, - // { id: "qVlfEHaLx4wk", label: "Sint Maarten" }, - // { id: "j1mHj03aq7cA", label: "Slovakia" }, - // { id: "0capewNWlzMn", label: "Slovenia" }, - // { id: "Eaanmrqauymz", label: "Solomon Islands" }, - // { id: "pQfkoAzDEra2", label: "Somalia" }, - // { id: "ymlXBNG9kQ45", label: "South Africa" }, - // { id: "VZMvFMKde19O", label: "South Korea" }, - // { id: "N9x58Op8Y57d", label: "South Sudan" }, - // { id: "c5EmR4eZ0wuC", label: "Spain" }, - // { id: "piVS3FMOVDKT", label: "Sri Lanka" }, - // { id: "epQb60K5Af7c", label: "Sudan" }, - // { id: "1vHyzuFIvA8q", label: "Suriname" }, - // { id: "GuWeqIDLSFRK", label: "Swaziland" }, - // { id: "slJUXW371ZF9", label: "Sweden" }, - // { id: "HvFLKGb0BruO", label: "Switzerland" }, - // { id: "hMLZFBhUCWbj", label: "Syria" }, - // { id: "WlEH0Xc5b6QP", label: "Taiwan" }, - // { id: "AjkPdFBfoUrg", label: "Tajikistan" }, - // { id: "i14Hxyqtsrwb", label: "Tanzania" }, - // { id: "gMzxmmeYfNRs", label: "Thailand" }, - // { id: "OAtKqjECvKJi", label: "Togo" }, - // { id: "i2pUEWLq2Pg7", label: "Tonga" }, - // { id: "u6cZtgnU4bXf", label: "Trinidad and Tobago" }, - // { id: "0xUYURCIqgsb", label: "Tunisia" }, - // { id: "ciTWM7yCnAJ0", label: "Turkey" }, - // { id: "EALLOUAoWToz", label: "Turkmenistan" }, - // { id: "0yfWs9vbLJm6", label: "Tuvalu" }, - // { id: "Wp47o77MuFlH", label: "Uganda" }, - // { id: "1wduuBAdGHpv", label: "Ukraine" }, - // { id: "0faSCuoqHr5d", label: "United Arab Emirates" }, - // { id: "Xur3acA5TU9L", label: "United Kingdom" }, - // { id: "lvQrSWcgW31q", label: "United States of America" }, - // { id: "GRfsHMa5nQs2", label: "Uruguay" }, - // { id: "Wrkp5dvgu18A", label: "Uzbekistan" }, - // { id: "imCoEDqhKcS4", label: "Vanuatu" }, - // { id: "aDaPDPlWAsTJ", label: "Venezuela" }, - // { id: "qn70yN7yXmng", label: "Vietnam" }, - // { id: "hBnBHj91cw6J", label: "Yemen" }, - // { id: "gZm8uBgeQ2lN", label: "Zambia" }, - // { id: "sABMpOSW32x1", label: "Zimbabwe" }, - // ], - // properties: {}, - // }, - // { - // id: "HGOZa4w1y0KA", - // ref: "01E0D1GYEQD9BB15HQM3GHTP48", - // type: "dropdown", - // title: "Which industry do you work in?", - // choices: [ - // { id: "77lPtDHFiOzB", label: "Accounting" }, - // { id: "KX8Kme95lkS6", label: "Airlines / Aviation" }, - // { - // id: "EIyBdznqN1Gw", - // label: "Alternative Dispute Resolution", - // }, - // { id: "e84axRfJwxq8", label: "Alternative Medicine" }, - // { id: "5fuLx4qlpNPk", label: "Animation" }, - // { id: "1n6J5yJJzcse", label: "Apparel & Fashion" }, - // { id: "PnN0H8tdTB80", label: "Architecture & Planning" }, - // { id: "D34NLCmd23YZ", label: "Arts & Crafts" }, - // { id: "lYITB5VoOIcF", label: "Automotive" }, - // { id: "H5NC4pjcbCqV", label: "Aviation & Aerospace" }, - // { id: "2gFWS40gDg1A", label: "Banking" }, - // { id: "54GpagRojhHs", label: "Biotechnology" }, - // { id: "ZwG1VhxHNjst", label: "Broadcast Media" }, - // { id: "9pAePnDgsiw1", label: "Building Materials" }, - // { - // id: "4cnAiFIKDufn", - // label: "Business Supplies & Equipment", - // }, - // { id: "AXEa04WRZI8r", label: "Capital Markets" }, - // { id: "XWuVYl07gv3O", label: "Chemicals" }, - // { id: "bEwdkJHDML1x", label: "Civic & Social Organization" }, - // { id: "M7kxd79NpPo9", label: "Civil Engineering" }, - // { id: "YJl3aVWCQjiN", label: "Commercial Real Estate" }, - // { id: "pkvJ75nOYtez", label: "Computer & Network Security" }, - // { id: "j0oQIfxom25I", label: "Computer Games" }, - // { id: "s9gvhKjKl7NF", label: "Computer Hardware" }, - // { id: "NMTGWsKzo4gm", label: "Computer Networking" }, - // { id: "6WmYi5g83Kvx", label: "Computer Software" }, - // { id: "MDRi2eq5efa6", label: "Construction" }, - // { id: "7GjU5OcS2aD3", label: "Consumer Electronics" }, - // { id: "jOvy0iZ8LH1l", label: "Consumer Goods" }, - // { id: "XSyoiJHLzQvS", label: "Consumer Services" }, - // { id: "6bNIAAJGHpa1", label: "Cosmetics" }, - // { id: "gEUe3ZwU4uZH", label: "Dairy" }, - // { id: "615eY7EoT3OG", label: "Defense & Space" }, - // { id: "vX4yklDQXKYd", label: "Design" }, - // { id: "3XMkqTwR010U", label: "Education Management" }, - // { id: "tUqTNp80txlK", label: "E-Learning" }, - // { - // id: "WbKX6hdmikja", - // label: "Electrical / Electronic Manufacturing", - // }, - // { id: "kWq8zLpPXGWr", label: "Entertainment" }, - // { id: "3zdElcaTLqmO", label: "Environmental Services" }, - // { id: "OncO5lcBVRQZ", label: "Events Services" }, - // { id: "Glob2ZFgGlqI", label: "Executive Office" }, - // { id: "Xm0uvRO2LaCV", label: "Facilities Services" }, - // { id: "Ol75oYMO79Iv", label: "Farming" }, - // { id: "UO6ohgvOipmx", label: "Financial Services" }, - // { id: "TimuH2bxqtxR", label: "Fine Art" }, - // { id: "2C8avtFKfKgZ", label: "Fishery" }, - // { id: "YfFbdsRqFfAy", label: "Food & Beverages" }, - // { id: "DfeP1p9yQK8J", label: "Food Production" }, - // { id: "ZGUWXE62lOvf", label: "Fund-Raising" }, - // { id: "X1ZMol7KUWiT", label: "Furniture" }, - // { id: "Ke7yN9v817OJ", label: "Gambling & Casinos" }, - // { id: "TWr7lQ63TtqR", label: "Glass, Ceramics & Concrete" }, - // { id: "s5KwhlZXQZ5U", label: "Government Administration" }, - // { id: "BgwNUDeFX5dl", label: "Government Relations" }, - // { id: "Y0DwYfctqkox", label: "Graphic Design" }, - // { id: "mqX4N97ZzYGp", label: "Health, Wellness & Fitness" }, - // { id: "ojcG3WKf9av0", label: "Higher Education" }, - // { id: "0iPTcSwStPZR", label: "Hospital & Health Care" }, - // { id: "JsRJNwBz3lLr", label: "Hospitality" }, - // { id: "D1UM3Rf5qKUv", label: "Human Resources" }, - // { id: "YDIlUGJwrCsV", label: "Import & Export" }, - // { id: "BkvHblIr6YuV", label: "Individual & Family Services" }, - // { id: "NVqagPACTmu4", label: "Industrial Automation" }, - // { id: "f3knBiVcAXSe", label: "Information Services" }, - // { - // id: "D3Aoe6Aurir2", - // label: "Information Technology & Services", - // }, - // { id: "Gc5Epj3X6KA7", label: "Insurance" }, - // { id: "grB5kmdsQYq0", label: "International Affairs" }, - // { - // id: "YTGDn3WbKltc", - // label: "International Trade & Development", - // }, - // { id: "Dw9bWINQWTaP", label: "Internet" }, - // { id: "e18g5yqMuBej", label: "Investment Banking" }, - // { id: "hS3hgRf2YQPi", label: "Investment Management" }, - // { id: "LlZWE1u749ZK", label: "Judiciary" }, - // { id: "jsH5mWxEAhtK", label: "Law Enforcement" }, - // { id: "iLqzLB8ZRgzA", label: "Law Practice" }, - // { id: "1TVvDiHJCaIj", label: "Legal Services" }, - // { id: "X4p2nuvWW8N6", label: "Legislative Office" }, - // { id: "PWMMKGTwJoRw", label: "Leisure, Travel & Tourism" }, - // { id: "89gZFc6LHyZ5", label: "Libraries" }, - // { id: "WkHt2RG6Jl3X", label: "Logistics & Supply Chain" }, - // { id: "hBFJmaZswc9n", label: "Luxury Goods & Jewelry" }, - // { id: "hjCMl5N8afHM", label: "Machinery" }, - // { id: "VbV1uW52jmny", label: "Management Consulting" }, - // { id: "xhlgTG3dYPMb", label: "Maritime" }, - // { id: "16vkJZrkXlca", label: "Market Research" }, - // { id: "qZGO9vzmNPq2", label: "Marketing & Advertising" }, - // { - // id: "rHm0Nt3uZl7F", - // label: "Mechanical or Industrial Engineering", - // }, - // { id: "OwP4JeBr0j0G", label: "Media Production" }, - // { id: "miMRHxk0l959", label: "Medical Devices" }, - // { id: "Hhn53Eclnas6", label: "Medical Practice" }, - // { id: "BMagEysbHmMK", label: "Mental Health Care" }, - // { id: "u7lU7MTxsunj", label: "Military" }, - // { id: "WfRuLtRj7BKP", label: "Mining & Metals" }, - // { id: "tc01goGeJFVW", label: "Motion Pictures & Film" }, - // { id: "bBYBSyukCAFY", label: "Museums & Institutions" }, - // { id: "6yR1VeBfFhEh", label: "Music" }, - // { id: "fuoMnv0V0nMT", label: "Nanotechnology" }, - // { id: "rDcUbjtUm5yv", label: "Newspapers" }, - // { - // id: "aHKguzWt7l0K", - // label: "Non-Profit Organization Management", - // }, - // { id: "t3ZEhGezG7Z3", label: "Oil & Energy" }, - // { id: "WcbW8j48MxMT", label: "Online Media" }, - // { id: "Tpdw3tCpKAsK", label: "Outsourcing / Offshoring" }, - // { id: "5fBlSGSpjVEo", label: "Package / Freight Delivery" }, - // { id: "uQNe1hNahQCB", label: "Packaging & Containers" }, - // { id: "lIFZqYG6cUxq", label: "Paper & Forest Products" }, - // { id: "TUboFmLiI4fV", label: "Performing Arts" }, - // { id: "uxvAp7acAWCK", label: "Pharmaceuticals" }, - // { id: "0IZadLrSljxJ", label: "Philanthropy" }, - // { id: "J3xo4a1qXYIx", label: "Photography" }, - // { id: "Vqsx9VF52ZOh", label: "Plastics" }, - // { id: "A7vMqTFmkSKF", label: "Political Organization" }, - // { - // id: "tfnLrZhqcvoW", - // label: "Primary / Secondary Education", - // }, - // { id: "SDnZiz1dQXuz", label: "Printing" }, - // { - // id: "TtfgJ7RpkdHu", - // label: "Professional Training & Coaching", - // }, - // { id: "k5SJTP7RmrNh", label: "Program Development" }, - // { id: "X63sl3HMjPyj", label: "Public Policy" }, - // { - // id: "5GrlMfOFNzS2", - // label: "Public Relations & Communications", - // }, - // { id: "ZOBYjPzQhqoR", label: "Public Safety" }, - // { id: "To7iwxoFrHt2", label: "Publishing" }, - // { id: "rrsI1xfb0KAA", label: "Railroad Manufacture" }, - // { id: "7fOAZo2pinlk", label: "Ranching" }, - // { id: "LVLKDGbCYEBG", label: "Real Estate" }, - // { - // id: "3qSlgYAnDkrA", - // label: "Recreational Facilities & Services", - // }, - // { id: "jpTqr5Nkura9", label: "Religious Institutions" }, - // { id: "jI33Ui8fMR5O", label: "Renewables & Environment" }, - // { id: "F1JLKQA8txk0", label: "Research" }, - // { id: "mCegzlG9vO6i", label: "Restaurants" }, - // { id: "zO2BvtMerVjf", label: "Retail" }, - // { id: "ofW7YoOUSrCC", label: "Security & Investigations" }, - // { id: "4Haufz0JrTDE", label: "Semiconductors" }, - // { id: "N736YR9XCjmr", label: "Shipbuilding" }, - // { id: "rT2McpSoy9xW", label: "Sporting Goods" }, - // { id: "eUUVflIOrpq8", label: "Sports" }, - // { id: "rlOHaqkctWFN", label: "Staffing & Recruiting" }, - // { id: "EJa1VQzU6JYe", label: "Supermarkets" }, - // { id: "JcU4vLD0iwFZ", label: "Telecommunications" }, - // { id: "Bwf7wu42B9K6", label: "Textiles" }, - // { id: "NoNKVyUKPoDy", label: "Think Tanks" }, - // { id: "YpkOGvOfOYzT", label: "Tobacco" }, - // { id: "B3HgG19r8Gnm", label: "Translation & Localization" }, - // { - // id: "LGKGVHIqZdzl", - // label: "Transportation / Trucking / Railroad", - // }, - // { id: "QYKm7bOiYdpM", label: "Utilities" }, - // { - // id: "lyFfiqHrW6sM", - // label: "Venture Capital & Private Equity", - // }, - // { id: "l54TIxHhz7KG", label: "Veterinary" }, - // { id: "UN9mqjfN48EA", label: "Warehousing" }, - // { id: "3Ev9drZtCCqr", label: "Wholesale" }, - // { id: "K90mh5ZHv2Tn", label: "Wine & Spirits" }, - // { id: "Oxp0WyLxlufQ", label: "Wireless" }, - // { id: "UjXQa2oSLSz4", label: "Writing & Editing" }, - // ], - // properties: {}, - // }, - // { - // id: "KvMvx4hBtOcV", - // ref: "01E0D1GYEQ17BCE98BZPASH3K6", - // type: "multiple_choice", - // title: "How many employees does your organization have?", - // choices: [ - // { id: "Z6TiX8WFahlL", label: "It's just me :)" }, - // { id: "lJahxmsyIRN4", label: "2 to 10" }, - // { id: "PzrS0m4d6kUb", label: "11 to 50" }, - // { id: "FC2uIYYNxVT9", label: "51 to 200" }, - // { id: "z15fSBWwILmr", label: "500 or more" }, - // ], - // properties: {}, - // }, - // ], - // endings: [ - // { - // id: "DefaultTyScreen", - // ref: "default_tys", - // type: "thankyou_screen", - // title: - // "Thanks for completing this typeform\nNow *create your own* — it's free, easy, & beautiful", - // attachment: { - // href: "https://images.typeform.com/images/2dpnUBBkz2VN", - // type: "image", - // }, - // properties: { - // button_mode: "default_redirect", - // button_text: "Create a *typeform*", - // share_icons: false, - // show_button: true, - // }, - // }, - // ], - // }, - // submitted_at: "2023-03-05T17:30:09Z", - // }, - // }; - - // const validationResult = await validate(data, events.formResponse.schema); - // console.log(validationResult); - // expect(validationResult).toEqual({ - // success: true, - // }); - // }); - // }); + const validationResult = await validate( + data, + events.checkoutCompleted.schema + ); + expect(validationResult).toEqual({ + success: true, + }); + }); + }); }); diff --git a/apps/integrations/src/integrations/stripe/webhooks/examples.ts b/apps/integrations/src/integrations/stripe/webhooks/examples.ts index 7410e144312..db7e61cc621 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/examples.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/examples.ts @@ -1,86 +1,84 @@ export const checkoutCompletedSuccess = { - object: { - id: "cs_test_a1EgJwW6lYFfhmnIYz49gIjMrt4T9ppRZsh9pohheMDg5p5vp7tsKxr9tV", - object: "checkout.session", - after_expiration: null, - allow_promotion_codes: null, - amount_subtotal: 3000, - amount_total: 3000, - automatic_tax: { - enabled: false, - status: null, - }, - billing_address_collection: null, - cancel_url: "https://httpbin.org/post", - client_reference_id: null, - consent: null, - consent_collection: null, - created: 1678198980, - currency: "usd", - custom_fields: [], - custom_text: { - shipping_address: null, - submit: null, - }, - customer: null, - customer_creation: "if_required", - customer_details: { - address: { - city: null, - country: null, - line1: null, - line2: null, - postal_code: null, - state: null, - }, - email: "stripe@example.com", - name: null, - phone: null, - tax_exempt: "none", - tax_ids: [], - }, - customer_email: null, - expires_at: 1678285379, - invoice: null, - invoice_creation: { - enabled: false, - invoice_data: { - account_tax_ids: null, - custom_fields: null, - description: null, - footer: null, - metadata: {}, - rendering_options: null, - }, - }, - livemode: false, - locale: null, - metadata: {}, - mode: "payment", - payment_intent: "pi_3Mj1PtGHlQRWA8Cg0YFQ7ukK", - payment_link: null, - payment_method_collection: "always", - payment_method_options: {}, - payment_method_types: ["card"], - payment_status: "paid", - phone_number_collection: { - enabled: false, + id: "cs_test_a1EgJwW6lYFfhmnIYz49gIjMrt4T9ppRZsh9pohheMDg5p5vp7tsKxr9tV", + object: "checkout.session", + after_expiration: null, + allow_promotion_codes: null, + amount_subtotal: 3000, + amount_total: 3000, + automatic_tax: { + enabled: false, + status: null, + }, + billing_address_collection: null, + cancel_url: "https://httpbin.org/post", + client_reference_id: null, + consent: null, + consent_collection: null, + created: 1678198980, + currency: "usd", + custom_fields: [], + custom_text: { + shipping_address: null, + submit: null, + }, + customer: null, + customer_creation: "if_required", + customer_details: { + address: { + city: null, + country: null, + line1: null, + line2: null, + postal_code: null, + state: null, }, - recovered_from: null, - setup_intent: null, - shipping_address_collection: null, - shipping_cost: null, - shipping_details: null, - shipping_options: [], - status: "complete", - submit_type: null, - subscription: null, - success_url: "https://httpbin.org/post", - total_details: { - amount_discount: 0, - amount_shipping: 0, - amount_tax: 0, + email: "stripe@example.com", + name: null, + phone: null, + tax_exempt: "none", + tax_ids: [], + }, + customer_email: null, + expires_at: 1678285379, + invoice: null, + invoice_creation: { + enabled: false, + invoice_data: { + account_tax_ids: null, + custom_fields: null, + description: null, + footer: null, + metadata: {}, + rendering_options: null, }, - url: null, }, + livemode: false, + locale: null, + metadata: {}, + mode: "payment", + payment_intent: "pi_3Mj1PtGHlQRWA8Cg0YFQ7ukK", + payment_link: null, + payment_method_collection: "always", + payment_method_options: {}, + payment_method_types: ["card"], + payment_status: "paid", + phone_number_collection: { + enabled: false, + }, + recovered_from: null, + setup_intent: null, + shipping_address_collection: null, + shipping_cost: null, + shipping_details: null, + shipping_options: [], + status: "complete", + submit_type: null, + subscription: null, + success_url: "https://httpbin.org/post", + total_details: { + amount_discount: 0, + amount_shipping: 0, + amount_tax: 0, + }, + url: null, }; diff --git a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts index f3c7cfcd87b..fa9dc38f0ab 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts @@ -1,127 +1,8 @@ -import { - makeBooleanSchema, - makeNullable, - makeNumberSchema, - makeObjectSchema, - makeStringSchema, -} from "core/schemas/makeSchema"; +import { makeRefInSchema } from "core/schemas/makeSchema"; import { JSONSchema } from "core/schemas/types"; +import { spec } from "../schemas/spec"; -export const checkoutSessionCompletedSchema: JSONSchema = makeObjectSchema( - "Checkout Session Completed", - { - requiredProperties: { - id: makeStringSchema("ID", "Unique identifier for the object."), - cancel_url: makeNullable( - makeStringSchema( - "Cancel URL", - "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website." - ) - ), - client_reference_id: makeNullable( - makeStringSchema( - "Client Reference ID", - "A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems." - ) - ), - currency: makeStringSchema("Currency", "ISO currency code"), - customer: makeNullable( - makeStringSchema( - "Customer", - "The ID of the customer for this Session. For Checkout Sessions in payment or subscription mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created." - ) - ), - customer_email: makeNullable( - makeStringSchema( - "Customer Email", - "If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute." - ) - ), - mode: makeStringSchema( - "Mode", - "Specifies which fields in the response should be expanded.", - { - enum: ["payment", "setup", "subscription"], - } - ), - payment_intent: makeNullable( - makeStringSchema( - "Payment Intent", - "The ID of the PaymentIntent for Checkout Sessions in payment mode." - ) - ), - payment_status: makeStringSchema( - "Payment Status", - "The status of the payment. One of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer’s order.", - { - enum: ["paid", "unpaid", "no_payment_required"], - } - ), - status: makeStringSchema( - "Status", - "The status of the Checkout Session, one of open, complete, or expired.", - { - enum: ["open", "complete", "expired"], - } - ), - success_url: makeNullable( - makeStringSchema( - "Success URL", - "The URL the customer will be directed to after the payment or subscription creation is successful." - ) - ), - object: makeStringSchema( - "Object", - "String representing the object’s type. Objects of the same type share the same value.", - { - const: "checkout.session", - } - ), - after_expiration: makeNullable( - makeObjectSchema("After Expiration", { - requiredProperties: { - recovery: makeObjectSchema("Recovery", { - optionalProperties: { - allow_promotion_codes: makeBooleanSchema( - "Allow Promotion Codes", - "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to false." - ), - enabled: makeBooleanSchema( - "Enabled", - "If true, a recovery url will be generated to recover this Checkout Session if it expires before a transaction is completed. It will be attached to the Checkout Session object upon expiration." - ), - expires_at: makeNullable( - makeNumberSchema( - "Expires At", - "The timestamp at which the recovery URL will expire." - ) - ), - url: makeNullable( - makeStringSchema( - "URL", - "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active." - ) - ), - }, - }), - }, - }) - ), - allow_promotion_codes: makeNullable( - makeBooleanSchema( - "Allow Promotion Codes", - "Enables user redeemable promotion codes." - ) - ), - amount_, - }, - optionalProperties: { - url: makeNullable( - makeStringSchema( - "URL", - "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active." - ) - ), - }, - } +export const checkoutSessionCompletedSchema: JSONSchema = makeRefInSchema( + "#/components/schemas/checkout.session", + spec ); From 857b45ba1b50ca6a0ee0820dec2be0f4af383794 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 12:00:18 +0000 Subject: [PATCH 088/113] Added Stripe to the catalog --- apps/integrations/src/integrations/catalog.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/integrations/src/integrations/catalog.ts b/apps/integrations/src/integrations/catalog.ts index 662f25e53a1..f4747598f51 100644 --- a/apps/integrations/src/integrations/catalog.ts +++ b/apps/integrations/src/integrations/catalog.ts @@ -2,6 +2,7 @@ import { Catalog } from "core/catalog"; import { airtable } from "./airtable"; import { notion } from "./notion"; import { sendgrid } from "./sendgrid"; +import { stripe } from "./stripe"; import { typeform } from "./typeform"; export const catalog: Catalog = { @@ -9,6 +10,7 @@ export const catalog: Catalog = { airtable, notion, sendgrid, + stripe, typeform, }, }; From 8e6b2ed79d489fc06d8a10767ed5ca337346d831 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 12:00:38 +0000 Subject: [PATCH 089/113] Metadata setup for the checkout event --- .../integrations/stripe/webhooks/webhooks.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index a9cfa4f0f75..b8bc5dc2f20 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -21,20 +21,24 @@ export const checkoutCompleted: WebhookEvent = { examples: [checkoutCompletedSuccess], key: "checkout.session.completed", displayProperties: (data) => ({ - title: `New response for form ${data.form_id}`, - properties: [ - { - key: "Form ID", - value: data.form_id, - }, - ], + title: `New Stripe checkout`, }), - matches: () => true, + matches: (data) => data.request.body.object === "checkout.session", process: async (data: WebhookReceiveRequest) => [ { event: "checkout.session.completed", displayProperties: { - title: "New response", + title: `New Stripe checkout`, + properties: [ + { + key: "amount", + value: data.request.body.amount_total, + }, + { + key: "currency", + value: data.request.body.currency, + }, + ], }, payload: data.request.body, }, From fd9578ec6cc9df9281ec4ae618ca7083fc096d35 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 12:22:49 +0000 Subject: [PATCH 090/113] WIP creating a schema from a ref --- .../src/core/schemas/deReffer.test.ts | 28 +++++++++++ .../integrations/src/core/schemas/deReffer.ts | 49 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 apps/integrations/src/core/schemas/deReffer.test.ts create mode 100644 apps/integrations/src/core/schemas/deReffer.ts diff --git a/apps/integrations/src/core/schemas/deReffer.test.ts b/apps/integrations/src/core/schemas/deReffer.test.ts new file mode 100644 index 00000000000..3917a87a1f5 --- /dev/null +++ b/apps/integrations/src/core/schemas/deReffer.test.ts @@ -0,0 +1,28 @@ +import { describe, expect, test } from "vitest"; +import { schemaFromRef } from "./deReffer"; +import { makeRefInSchema } from "./makeSchema"; + +describe("deref", async () => { + test("deep ref", async () => { + const schema = makeRefInSchema("#/components/basic", { + components: { + basic: { + type: "object", + properties: { + something: { + $ref: "#/components/something", + }, + }, + required: ["something"], + }, + something: { + type: "number", + }, + }, + }); + + const dereffed = schemaFromRef(schema); + + expect(dereffed).toMatchInlineSnapshot("undefined"); + }); +}); diff --git a/apps/integrations/src/core/schemas/deReffer.ts b/apps/integrations/src/core/schemas/deReffer.ts new file mode 100644 index 00000000000..35ed1d9846a --- /dev/null +++ b/apps/integrations/src/core/schemas/deReffer.ts @@ -0,0 +1,49 @@ +import pointer from "json-pointer"; + +export function deReffer(spec: any, object?: any) { + //walk through the object. If there is a key called "$ref" then replace it with the referenced object + //if the object has anyOf, oneOf or allOf then we need to deReffer each of those + //if the object has properties then we need to deReffer each of those + //if the object has items then we need to deReffer that + //if the object has additionalProperties then we need to deReffer that + //if the object has a type of "object" then we need to deReffer that + + if (object === undefined) { + object = spec; + } + + Object.entries(object).forEach(([key, value]) => { + if (key === "$ref") { + const path = (value as string).replace("#", ""); + const ptr = pointer.get(spec, path); + if (ptr === undefined) { + throw new Error(`Invalid reference: ${value}`); + } + object = { + ...object, + ...ptr, + }; + delete object?.$ref; + } + + recursive(object, "properties"); + recursive(object, "additionalproperties"); + recursive(object, "allOf"); + recursive(object, "oneOf"); + recursive(object, "anyOf"); + + if (object?.items) { + object.items.forEach((item: any) => { + deReffer(spec, item); + }); + } + + function recursive(object: any, key: string) { + if (object[key] && typeof object[key] === "object") { + Object.entries(object[key]).forEach(([key, value]) => { + deReffer(spec, value); + }); + } + } + }); +} From 7395d42965a116dff9445055b4ef77a9d63215d3 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 12:41:57 +0000 Subject: [PATCH 091/113] Generate a flat schema from a ref into a spec --- .../src/core/schemas/deReffer.test.ts | 28 ---------- .../core/schemas/flatSchemaFromRef.test.ts | 53 +++++++++++++++++++ .../{deReffer.ts => flatSchemaFromRef.ts} | 48 ++++++++--------- 3 files changed, 77 insertions(+), 52 deletions(-) delete mode 100644 apps/integrations/src/core/schemas/deReffer.test.ts create mode 100644 apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts rename apps/integrations/src/core/schemas/{deReffer.ts => flatSchemaFromRef.ts} (50%) diff --git a/apps/integrations/src/core/schemas/deReffer.test.ts b/apps/integrations/src/core/schemas/deReffer.test.ts deleted file mode 100644 index 3917a87a1f5..00000000000 --- a/apps/integrations/src/core/schemas/deReffer.test.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { schemaFromRef } from "./deReffer"; -import { makeRefInSchema } from "./makeSchema"; - -describe("deref", async () => { - test("deep ref", async () => { - const schema = makeRefInSchema("#/components/basic", { - components: { - basic: { - type: "object", - properties: { - something: { - $ref: "#/components/something", - }, - }, - required: ["something"], - }, - something: { - type: "number", - }, - }, - }); - - const dereffed = schemaFromRef(schema); - - expect(dereffed).toMatchInlineSnapshot("undefined"); - }); -}); diff --git a/apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts b/apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts new file mode 100644 index 00000000000..672a027f601 --- /dev/null +++ b/apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts @@ -0,0 +1,53 @@ +import { describe, expect, test } from "vitest"; +import { flatSchemaFromRef } from "./flatSchemaFromRef"; + +describe("flat schema", async () => { + test("simple", async () => { + const schema = { + components: { + basic: { + type: "object", + properties: { + something: { + $ref: "#/components/something", + description: "Something", + }, + }, + required: ["something"], + }, + something: { + type: "object", + properties: { + another: { + $ref: "#/components/another", + }, + }, + }, + another: { + type: "number", + }, + }, + }; + + const flatSchema = flatSchemaFromRef(schema, "#/components/basic"); + expect(flatSchema).toMatchInlineSnapshot(` + { + "properties": { + "something": { + "description": "Something", + "properties": { + "another": { + "type": "number", + }, + }, + "type": "object", + }, + }, + "required": [ + "something", + ], + "type": "object", + } + `); + }); +}); diff --git a/apps/integrations/src/core/schemas/deReffer.ts b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts similarity index 50% rename from apps/integrations/src/core/schemas/deReffer.ts rename to apps/integrations/src/core/schemas/flatSchemaFromRef.ts index 35ed1d9846a..88cd6c4ee8b 100644 --- a/apps/integrations/src/core/schemas/deReffer.ts +++ b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts @@ -1,6 +1,19 @@ import pointer from "json-pointer"; +import { JSONSchema } from "./types"; -export function deReffer(spec: any, object?: any) { +export function flatSchemaFromRef(spec: any, ref: string): JSONSchema { + //starting point + const path = ref.replace("#", ""); + const object = pointer.get(spec, path); + const newSpec = JSON.parse(JSON.stringify(object)); + + //walk through the object and deref anything that needs it (then recursively do this) + deReffer(spec, newSpec); + + return newSpec; +} + +function deReffer(spec: any, object: any) { //walk through the object. If there is a key called "$ref" then replace it with the referenced object //if the object has anyOf, oneOf or allOf then we need to deReffer each of those //if the object has properties then we need to deReffer each of those @@ -8,10 +21,6 @@ export function deReffer(spec: any, object?: any) { //if the object has additionalProperties then we need to deReffer that //if the object has a type of "object" then we need to deReffer that - if (object === undefined) { - object = spec; - } - Object.entries(object).forEach(([key, value]) => { if (key === "$ref") { const path = (value as string).replace("#", ""); @@ -19,30 +28,21 @@ export function deReffer(spec: any, object?: any) { if (ptr === undefined) { throw new Error(`Invalid reference: ${value}`); } - object = { - ...object, - ...ptr, - }; - delete object?.$ref; - } - recursive(object, "properties"); - recursive(object, "additionalproperties"); - recursive(object, "allOf"); - recursive(object, "oneOf"); - recursive(object, "anyOf"); + Object.assign(object, ptr); + delete object.$ref; - if (object?.items) { - object.items.forEach((item: any) => { - deReffer(spec, item); - }); + //because we've modified the object, we need to re-run the loop + deReffer(spec, object); } - function recursive(object: any, key: string) { - if (object[key] && typeof object[key] === "object") { - Object.entries(object[key]).forEach(([key, value]) => { - deReffer(spec, value); + if (typeof value === "object") { + if (Array.isArray(value)) { + value.forEach((item: any) => { + deReffer(spec, item); }); + } else { + deReffer(spec, value); } } }); From ce579a313d70dd84f3ffca89131f4917a85a8601 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 12:51:04 +0000 Subject: [PATCH 092/113] =?UTF-8?q?Improved=20the=20dereffer,=20but=20it?= =?UTF-8?q?=E2=80=99s=20still=20too=20recursive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/schemas/flatSchemaFromRef.ts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/integrations/src/core/schemas/flatSchemaFromRef.ts b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts index 88cd6c4ee8b..c394583e51e 100644 --- a/apps/integrations/src/core/schemas/flatSchemaFromRef.ts +++ b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts @@ -21,19 +21,22 @@ function deReffer(spec: any, object: any) { //if the object has additionalProperties then we need to deReffer that //if the object has a type of "object" then we need to deReffer that - Object.entries(object).forEach(([key, value]) => { - if (key === "$ref") { - const path = (value as string).replace("#", ""); - const ptr = pointer.get(spec, path); - if (ptr === undefined) { - throw new Error(`Invalid reference: ${value}`); - } + if (object == null) return; - Object.assign(object, ptr); - delete object.$ref; + if (object.$ref) { + const path = (object.$ref as string).replace("#", ""); + const ptr = pointer.get(spec, path); + if (ptr === undefined) { + throw new Error(`Invalid reference: ${object.$ref}`); + } - //because we've modified the object, we need to re-run the loop - deReffer(spec, object); + Object.assign(object, ptr); + delete object.$ref; + } + + Object.entries(object).forEach(([key, value]) => { + if (key === "$ref") { + return; } if (typeof value === "object") { From fcb80c291c5e9eafe60deeb2cd493ddf8f1c1ffd Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 14:37:39 +0000 Subject: [PATCH 093/113] Removed periods from type names --- apps/integrations/src/trigger/sdk/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/integrations/src/trigger/sdk/utilities.ts b/apps/integrations/src/trigger/sdk/utilities.ts index c5085d6b3ed..603cab6e2d2 100644 --- a/apps/integrations/src/trigger/sdk/utilities.ts +++ b/apps/integrations/src/trigger/sdk/utilities.ts @@ -54,7 +54,7 @@ export function toCamelCase(original: string) { export function toTitleCase(original: string) { return original .replace(/([A-Z])/g, " $1") - .replace(/[_-]/g, " ") + .replace(/[_.-]/g, " ") .replace(/^./, function (str: string) { return str.toUpperCase(); }) From 09ce655b226e870063ef13ac14aca79a93927f22 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 14:37:49 +0000 Subject: [PATCH 094/113] Deal with no params for webhooks --- apps/integrations/src/trigger/sdk/generateService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 8ac1d015b14..dde4a056dad 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -248,7 +248,7 @@ function ${functionName}( service: ["${service.service}"], event: ["${event.name}"], }, - source: params, + source: ${inputSpec ? "params" : "undefined"}, }, schema: ${zodSchemaName}, }; From 84720ce39098949b4315fc15dcf35d2ef293af90 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 14:39:20 +0000 Subject: [PATCH 095/113] Non recursive flat schema generator --- .../src/core/schemas/flatSchemaFromRef.ts | 100 ++++++++++++------ 1 file changed, 65 insertions(+), 35 deletions(-) diff --git a/apps/integrations/src/core/schemas/flatSchemaFromRef.ts b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts index c394583e51e..cc175d354a7 100644 --- a/apps/integrations/src/core/schemas/flatSchemaFromRef.ts +++ b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts @@ -4,49 +4,79 @@ import { JSONSchema } from "./types"; export function flatSchemaFromRef(spec: any, ref: string): JSONSchema { //starting point const path = ref.replace("#", ""); - const object = pointer.get(spec, path); - const newSpec = JSON.parse(JSON.stringify(object)); + try { + const object = pointer.get(spec, path); + const newSpec = JSON.parse(JSON.stringify(object)); - //walk through the object and deref anything that needs it (then recursively do this) - deReffer(spec, newSpec); + //walk through the object and deref anything that needs it (then recursively do this) + const deReffer = new Dereffer(spec); + deReffer.run(newSpec); - return newSpec; + return newSpec; + } catch (e) { + console.log(spec); + console.error("e", e); + return spec; + } } -function deReffer(spec: any, object: any) { - //walk through the object. If there is a key called "$ref" then replace it with the referenced object - //if the object has anyOf, oneOf or allOf then we need to deReffer each of those - //if the object has properties then we need to deReffer each of those - //if the object has items then we need to deReffer that - //if the object has additionalProperties then we need to deReffer that - //if the object has a type of "object" then we need to deReffer that - - if (object == null) return; - - if (object.$ref) { - const path = (object.$ref as string).replace("#", ""); - const ptr = pointer.get(spec, path); - if (ptr === undefined) { - throw new Error(`Invalid reference: ${object.$ref}`); - } +class Dereffer { + spec: any; + stack: any[]; + refsExplored: Map; - Object.assign(object, ptr); - delete object.$ref; + constructor(spec: any) { + this.spec = spec; + this.stack = []; + this.refsExplored = new Map(); } - Object.entries(object).forEach(([key, value]) => { - if (key === "$ref") { - return; - } + run(object: any) { + this.stack.push(object); + this.#walk(); + } + + #walk() { + while (this.stack.length > 0) { + const object = this.stack.pop(); + if (object == null) continue; + if (typeof object !== "object") continue; + + if (object.$ref) { + const path = (object.$ref as string).replace("#", ""); - if (typeof value === "object") { - if (Array.isArray(value)) { - value.forEach((item: any) => { - deReffer(spec, item); - }); - } else { - deReffer(spec, value); + if (!this.refsExplored.has(path)) { + const ptr = pointer.get(this.spec, path); + if (ptr === undefined) { + throw new Error(`Invalid reference: ${object.$ref}`); + } + + Object.assign(object, ptr); + delete object.$ref; + + this.refsExplored.set(path, ptr); + } else { + const ptr = this.refsExplored.get(path); + Object.assign(object, ptr); + delete object.$ref; + } } + + Object.entries(object).forEach(([key, value]) => { + if (key === "$ref") { + return; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + value.forEach((item: any) => { + this.stack.push(item); + }); + } else { + this.stack.push(value); + } + } + }); } - }); + } } From 08a1198039a9d7865a44abb84ece480633cb5ccd Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 21:52:01 +0000 Subject: [PATCH 096/113] Combine schemas and hoist references so they still work --- .../core/schemas/flatSchemaFromRef.test.ts | 53 ---------- .../src/core/schemas/flatSchemaFromRef.ts | 82 ---------------- .../src/core/schemas/schemaRefWalker.ts | 97 +++++++++++++++++++ .../src/generators/combineSchemas.ts | 47 +++++++++ .../src/trigger/sdk/generateService.ts | 4 +- 5 files changed, 146 insertions(+), 137 deletions(-) delete mode 100644 apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts delete mode 100644 apps/integrations/src/core/schemas/flatSchemaFromRef.ts create mode 100644 apps/integrations/src/core/schemas/schemaRefWalker.ts diff --git a/apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts b/apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts deleted file mode 100644 index 672a027f601..00000000000 --- a/apps/integrations/src/core/schemas/flatSchemaFromRef.test.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { flatSchemaFromRef } from "./flatSchemaFromRef"; - -describe("flat schema", async () => { - test("simple", async () => { - const schema = { - components: { - basic: { - type: "object", - properties: { - something: { - $ref: "#/components/something", - description: "Something", - }, - }, - required: ["something"], - }, - something: { - type: "object", - properties: { - another: { - $ref: "#/components/another", - }, - }, - }, - another: { - type: "number", - }, - }, - }; - - const flatSchema = flatSchemaFromRef(schema, "#/components/basic"); - expect(flatSchema).toMatchInlineSnapshot(` - { - "properties": { - "something": { - "description": "Something", - "properties": { - "another": { - "type": "number", - }, - }, - "type": "object", - }, - }, - "required": [ - "something", - ], - "type": "object", - } - `); - }); -}); diff --git a/apps/integrations/src/core/schemas/flatSchemaFromRef.ts b/apps/integrations/src/core/schemas/flatSchemaFromRef.ts deleted file mode 100644 index cc175d354a7..00000000000 --- a/apps/integrations/src/core/schemas/flatSchemaFromRef.ts +++ /dev/null @@ -1,82 +0,0 @@ -import pointer from "json-pointer"; -import { JSONSchema } from "./types"; - -export function flatSchemaFromRef(spec: any, ref: string): JSONSchema { - //starting point - const path = ref.replace("#", ""); - try { - const object = pointer.get(spec, path); - const newSpec = JSON.parse(JSON.stringify(object)); - - //walk through the object and deref anything that needs it (then recursively do this) - const deReffer = new Dereffer(spec); - deReffer.run(newSpec); - - return newSpec; - } catch (e) { - console.log(spec); - console.error("e", e); - return spec; - } -} - -class Dereffer { - spec: any; - stack: any[]; - refsExplored: Map; - - constructor(spec: any) { - this.spec = spec; - this.stack = []; - this.refsExplored = new Map(); - } - - run(object: any) { - this.stack.push(object); - this.#walk(); - } - - #walk() { - while (this.stack.length > 0) { - const object = this.stack.pop(); - if (object == null) continue; - if (typeof object !== "object") continue; - - if (object.$ref) { - const path = (object.$ref as string).replace("#", ""); - - if (!this.refsExplored.has(path)) { - const ptr = pointer.get(this.spec, path); - if (ptr === undefined) { - throw new Error(`Invalid reference: ${object.$ref}`); - } - - Object.assign(object, ptr); - delete object.$ref; - - this.refsExplored.set(path, ptr); - } else { - const ptr = this.refsExplored.get(path); - Object.assign(object, ptr); - delete object.$ref; - } - } - - Object.entries(object).forEach(([key, value]) => { - if (key === "$ref") { - return; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - value.forEach((item: any) => { - this.stack.push(item); - }); - } else { - this.stack.push(value); - } - } - }); - } - } -} diff --git a/apps/integrations/src/core/schemas/schemaRefWalker.ts b/apps/integrations/src/core/schemas/schemaRefWalker.ts new file mode 100644 index 00000000000..0d1698e9f85 --- /dev/null +++ b/apps/integrations/src/core/schemas/schemaRefWalker.ts @@ -0,0 +1,97 @@ +import pointer from "json-pointer"; + +type Action = ({ + ref, + object, + key, + definition, + seenBefore, + setRef, +}: { + ref: string; + object: any; + key: string; + definition: any; + seenBefore: boolean; + setRef?: (newRef: string) => void; +}) => void; + +export class SchemaRefWalker { + spec: any; + stack: { key: string; object: any }[]; + refsExplored: Map; + + constructor(spec: any) { + this.spec = spec; + this.stack = []; + this.refsExplored = new Map(); + } + + run(object: any, action: Action) { + this.stack.push({ key: "root", object }); + this.#walk(action); + } + + #walk(action: Action) { + while (this.stack.length > 0) { + const item = this.stack.pop(); + if (item === undefined) continue; + + const { key, object } = item; + if (object == null) continue; + if (typeof object !== "object") continue; + + if (object.$ref) { + const path = (object.$ref as string).replace("#", ""); + + if (!this.refsExplored.has(path)) { + const ptr = pointer.get(this.spec, path); + if (ptr === undefined) { + throw new Error(`Invalid reference: ${object.$ref}`); + } + + action({ + ref: object.$ref, + object, + key, + definition: ptr, + seenBefore: false, + setRef: (newRef) => { + object.$ref = newRef; + }, + }); + + this.refsExplored.set(path, ptr); + } else { + const ptr = this.refsExplored.get(path); + action({ + ref: object.$ref, + object, + key, + definition: ptr, + seenBefore: true, + setRef: (newRef) => { + object.$ref = newRef; + }, + }); + } + } + + Object.entries(object).forEach(([key, value]) => { + if (key === "$ref") { + return; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + value.forEach((item: any, index: number) => { + this.stack.push({ key: index.toString(), object: item }); + }); + } else { + this.stack.push({ key, object: value }); + } + } + }); + } + } +} diff --git a/apps/integrations/src/generators/combineSchemas.ts b/apps/integrations/src/generators/combineSchemas.ts index 40ec444647a..11a84ecf3e2 100644 --- a/apps/integrations/src/generators/combineSchemas.ts +++ b/apps/integrations/src/generators/combineSchemas.ts @@ -1,5 +1,9 @@ import { Action } from "core/action/types"; +import { makeAnyOf } from "core/schemas/makeSchema"; +import { SchemaRefWalker } from "core/schemas/schemaRefWalker"; import { JSONSchema } from "core/schemas/types"; +import nodeObjectHash from "node-object-hash"; +import pointer from "json-pointer"; export function generateInputOutputSchemas( spec: Action["spec"], @@ -83,3 +87,46 @@ function createDiscriminatedUnionSchema( oneOf: schemas, }; } + +const hasher = nodeObjectHash({ sort: true }); + +export function combineSchemasAndHoistReferences( + name: string, + schemas: JSONSchema[] +): JSONSchema { + const definitions = new Map(); + + schemas.forEach((s) => { + const walker = new SchemaRefWalker(s); + walker.run(s, ({ definition, ref, setRef }) => { + const existing = definitions.get(ref); + if (existing) { + if (existing && hasher.hash(existing) !== hasher.hash(definition)) { + console.log( + "duplicate definition with different hash, inventing a new name" + ); + for (let index = 0; index < 50; index++) { + const newName = `${ref}${index}`; + if (!definitions.has(newName)) { + definitions.set(newName, definition); + break; + } + } + } else { + definitions.set(ref, definition); + } + } else { + definitions.set(ref, definition); + } + }); + }); + + const combinedSchema = makeAnyOf(name, schemas); + + //add all of the definitions, using their paths + definitions.forEach((definition, ref) => { + pointer.set(combinedSchema, ref.replace("#", ""), definition); + }); + + return combinedSchema; +} diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index dde4a056dad..303a7a3fd6d 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -3,7 +3,7 @@ import { makeAnyOf } from "core/schemas/makeSchema"; import { JSONSchema } from "core/schemas/types"; import { Service } from "core/service/types"; import fs from "fs/promises"; -import { generateInputOutputSchemas } from "generators/combineSchemas"; +import { combineSchemasAndHoistReferences, generateInputOutputSchemas } from "generators/combineSchemas"; import { getTypesFromSchema } from "generators/generateTypes"; import { parseSchema } from "json-schema-to-zod"; import path from "path"; @@ -289,7 +289,7 @@ async function createFunctionsAndTypesFiles( .flatMap((f) => [f.input, f.output]) .filter(Boolean) as JSONSchema[]; - const combinedSchema: JSONSchema = makeAnyOf( + const combinedSchema: JSONSchema = combineSchemasAndHoistReferences( `${toFriendlyTypeName(service.service)}Types`, typeSchemas ); From ee7a7a5d3fb7b8d1cb87b1b7fc47a2332eb91ab6 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 21:53:26 +0000 Subject: [PATCH 097/113] Set the ref if we change it --- apps/integrations/src/core/schemas/schemaRefWalker.ts | 2 +- apps/integrations/src/generators/combineSchemas.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/integrations/src/core/schemas/schemaRefWalker.ts b/apps/integrations/src/core/schemas/schemaRefWalker.ts index 0d1698e9f85..e0eb11624ea 100644 --- a/apps/integrations/src/core/schemas/schemaRefWalker.ts +++ b/apps/integrations/src/core/schemas/schemaRefWalker.ts @@ -13,7 +13,7 @@ type Action = ({ key: string; definition: any; seenBefore: boolean; - setRef?: (newRef: string) => void; + setRef: (newRef: string) => void; }) => void; export class SchemaRefWalker { diff --git a/apps/integrations/src/generators/combineSchemas.ts b/apps/integrations/src/generators/combineSchemas.ts index 11a84ecf3e2..13abec8f190 100644 --- a/apps/integrations/src/generators/combineSchemas.ts +++ b/apps/integrations/src/generators/combineSchemas.ts @@ -109,6 +109,7 @@ export function combineSchemasAndHoistReferences( const newName = `${ref}${index}`; if (!definitions.has(newName)) { definitions.set(newName, definition); + setRef(newName); break; } } From b44a350bba9ddab651c0040beeee2d65f313bed4 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 22:26:12 +0000 Subject: [PATCH 098/113] First decent schema generated for Stripe --- .../src/core/schemas/makeSchema.test.ts | 72 + .../src/core/schemas/makeSchema.ts | 43 + .../src/core/schemas/schemaRefWalker.ts | 2 + .../integrations/stripe/webhooks/schemas.ts | 4 +- .../src/trigger/sdk/generateService.ts | 5 +- generated-integrations/stripe/README.md | 3 + .../docs/checkout-session-completed-event.mdx | 223 + generated-integrations/stripe/package.json | 34 + .../stripe/schema-optimized.json | 63960 ++++++++++++++++ generated-integrations/stripe/src/index.ts | 28 + generated-integrations/stripe/src/types.ts | 11668 +++ generated-integrations/stripe/tsconfig.json | 21 + generated-integrations/stripe/tsup.config.ts | 22 + 13 files changed, 76082 insertions(+), 3 deletions(-) create mode 100644 apps/integrations/src/core/schemas/makeSchema.test.ts create mode 100644 generated-integrations/stripe/README.md create mode 100644 generated-integrations/stripe/docs/checkout-session-completed-event.mdx create mode 100644 generated-integrations/stripe/package.json create mode 100644 generated-integrations/stripe/schema-optimized.json create mode 100644 generated-integrations/stripe/src/index.ts create mode 100644 generated-integrations/stripe/src/types.ts create mode 100644 generated-integrations/stripe/tsconfig.json create mode 100644 generated-integrations/stripe/tsup.config.ts diff --git a/apps/integrations/src/core/schemas/makeSchema.test.ts b/apps/integrations/src/core/schemas/makeSchema.test.ts new file mode 100644 index 00000000000..32109c3412b --- /dev/null +++ b/apps/integrations/src/core/schemas/makeSchema.test.ts @@ -0,0 +1,72 @@ +import { checkoutSessionCompletedSchema } from "integrations/stripe/webhooks/schemas"; +import { describe, expect, test } from "vitest"; +import { schemaFromRef } from "./makeSchema"; +import { promises as fs } from "fs"; + +describe("make schema", async () => { + test("schemaFromRef", async () => { + const schema = { + components: { + basic: { + type: "object", + properties: { + something: { + $ref: "#/components/something", + description: "Something", + }, + }, + required: ["something"], + }, + something: { + type: "object", + properties: { + another: { + $ref: "#/components/another", + }, + }, + }, + another: { + type: "number", + }, + }, + }; + + const flatSchema = schemaFromRef("#/components/basic", schema); + expect(flatSchema).toMatchInlineSnapshot(` + { + "components": { + "another": { + "type": "number", + }, + "something": { + "properties": { + "another": { + "$ref": "#/components/another", + }, + }, + "type": "object", + }, + }, + "properties": { + "something": { + "$ref": "#/components/something", + "description": "Something", + }, + }, + "required": [ + "something", + ], + "type": "object", + } + `); + }); + + test("schemaFromRef", async () => { + const schema = checkoutSessionCompletedSchema; + await fs.writeFile( + "/Users/Matt/Downloads/schemaFromRef.json", + JSON.stringify(schema, null, 2) + ); + expect(true).toBe(true); + }); +}); diff --git a/apps/integrations/src/core/schemas/makeSchema.ts b/apps/integrations/src/core/schemas/makeSchema.ts index 7a2a2c8799c..1ac2475c7e8 100644 --- a/apps/integrations/src/core/schemas/makeSchema.ts +++ b/apps/integrations/src/core/schemas/makeSchema.ts @@ -1,3 +1,6 @@ +import nodeObjectHash from "node-object-hash"; +import pointer from "json-pointer"; +import { SchemaRefWalker } from "./schemaRefWalker"; import { JSONSchema, JSONSchemaInstanceType } from "./types"; export function makeStringSchema( @@ -240,3 +243,43 @@ export function makeRefInSchema(ref: string, schema: JSONSchema): JSONSchema { ...schema, }; } + +const hasher = nodeObjectHash({ sort: true }); + +export function schemaFromRef(ref: string, schema: JSONSchema): JSONSchema { + //this is what we want to use as the base for the schema + const newSchema = pointer.get(schema, ref.replace("#", "")); + + const definitions = new Map(); + + const walker = new SchemaRefWalker(schema); + walker.run(newSchema, ({ definition, ref, setRef }) => { + const existing = definitions.get(ref); + if (existing) { + if (existing && hasher.hash(existing) !== hasher.hash(definition)) { + console.log( + "duplicate definition with different hash, inventing a new name" + ); + for (let index = 0; index < 50; index++) { + const newName = `${ref}${index}`; + if (!definitions.has(newName)) { + definitions.set(newName, definition); + setRef(newName); + break; + } + } + } else { + definitions.set(ref, definition); + } + } else { + definitions.set(ref, definition); + } + }); + + //add all of the definitions, using their paths + definitions.forEach((definition, ref) => { + pointer.set(newSchema, ref.replace("#", ""), definition); + }); + + return newSchema; +} diff --git a/apps/integrations/src/core/schemas/schemaRefWalker.ts b/apps/integrations/src/core/schemas/schemaRefWalker.ts index e0eb11624ea..cc55756507f 100644 --- a/apps/integrations/src/core/schemas/schemaRefWalker.ts +++ b/apps/integrations/src/core/schemas/schemaRefWalker.ts @@ -62,6 +62,8 @@ export class SchemaRefWalker { }); this.refsExplored.set(path, ptr); + + this.stack.push({ key, object: ptr }); } else { const ptr = this.refsExplored.get(path); action({ diff --git a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts index fa9dc38f0ab..0b984b13c96 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts @@ -1,8 +1,8 @@ -import { makeRefInSchema } from "core/schemas/makeSchema"; +import { schemaFromRef } from "core/schemas/makeSchema"; import { JSONSchema } from "core/schemas/types"; import { spec } from "../schemas/spec"; -export const checkoutSessionCompletedSchema: JSONSchema = makeRefInSchema( +export const checkoutSessionCompletedSchema: JSONSchema = schemaFromRef( "#/components/schemas/checkout.session", spec ); diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 303a7a3fd6d..7f9f3a41130 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -3,7 +3,10 @@ import { makeAnyOf } from "core/schemas/makeSchema"; import { JSONSchema } from "core/schemas/types"; import { Service } from "core/service/types"; import fs from "fs/promises"; -import { combineSchemasAndHoistReferences, generateInputOutputSchemas } from "generators/combineSchemas"; +import { + combineSchemasAndHoistReferences, + generateInputOutputSchemas, +} from "generators/combineSchemas"; import { getTypesFromSchema } from "generators/generateTypes"; import { parseSchema } from "json-schema-to-zod"; import path from "path"; diff --git a/generated-integrations/stripe/README.md b/generated-integrations/stripe/README.md new file mode 100644 index 00000000000..f05cf9d4ad0 --- /dev/null +++ b/generated-integrations/stripe/README.md @@ -0,0 +1,3 @@ +# Trigger.dev Stripe integration + +View more documentation[here](https://docs.trigger.dev) diff --git a/generated-integrations/stripe/docs/checkout-session-completed-event.mdx b/generated-integrations/stripe/docs/checkout-session-completed-event.mdx new file mode 100644 index 00000000000..d25dc5cfc8d --- /dev/null +++ b/generated-integrations/stripe/docs/checkout-session-completed-event.mdx @@ -0,0 +1,223 @@ +--- +title: Checkout session completed +sidebarTitle: Checkout session completed +description: A form response was submitted +--- + +## Params + + + A unique string. Please see the [Keys and Resumability](/guides/resumability) + doc for more info. + + +## Response + + + A Checkout Session represents your customer's session as they pay for +one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) +or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a +new Session each time your customer attempts to pay. + +Once payment is successful, the Checkout Session will contain a reference +to the [Customer](https://stripe.com/docs/api/customers), and either the successful +[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active +[Subscription](https://stripe.com/docs/api/subscriptions). + +You can create a Checkout Session on your server and redirect to its URL +to begin Checkout. + +Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). + + + Time at which the object was created. Measured in seconds since the Unix epoch. + + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + + + + The timestamp at which the Checkout Session will expire. + + Unique identifier for the object. + + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + + The mode of the Checkout Session. + + String representing the object's type. Objects of the same type share the same value. + + A list of the types of payment methods (e.g. card) this Checkout +Session is allowed to accept. + + + The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. +You can use this value to decide when to fulfill your customer's order. + + The shipping rate options applied to this Session. + + + The URL the customer will be directed to after the payment or +subscription creation is successful. + + When set, provides configuration for actions to take if this Checkout Session expires. + +*Please note that this object is one of the following possible types* + + + + Enables user redeemable promotion codes. + + Total of all items before discounts or taxes are applied. + + Total of all items after discounts and taxes are applied. + + Describes whether Checkout should collect the customer's billing address. + + If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + + A unique string to reference the Checkout Session. This can be a +customer ID, a cart ID, or similar, and can be used to reconcile the +Session with your internal systems. + + Results of `consent_collection` for this session. + +*Please note that this object is one of the following possible types* + + + + When set, provides configuration for the Checkout Session to gather active consent from customers. + +*Please note that this object is one of the following possible types* + + + + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + + The ID of the customer for this Session. +For Checkout Sessions in `payment` or `subscription` mode, Checkout +will create a new customer object based on information provided +during the payment flow unless an existing customer was provided when +the Session was created. + +*Please note that this object is one of the following possible types* + + + + + + Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + + The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. + +*Please note that this object is one of the following possible types* + + + + If provided, this value will be used when the Customer object is created. +If not provided, customers will be asked to enter their email address. +Use this parameter to prefill customer data if you already have an email +on file. To access information about the customer once the payment flow is +complete, use the `customer` attribute. + + ID of the invoice created by the Checkout Session, if it exists. + +*Please note that this object is one of the following possible types* + + + + + Details on the state of invoice creation for the Checkout Session. + +*Please note that this object is one of the following possible types* + + + + The line items purchased by the customer. + + Details about each object. + + + True if this list has another page of items after this one that can be fetched. + + String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + + The URL where this list can be accessed. + + The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + + The ID of the PaymentIntent for Checkout Sessions in `payment` mode. + +*Please note that this object is one of the following possible types* + + + + + The ID of the Payment Link that created this Session. + +*Please note that this object is one of the following possible types* + + + + + Configure whether a Checkout Session should collect a payment method. + + Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + +*Please note that this object is one of the following possible types* + + + + + The ID of the original expired Checkout Session that triggered the recovery flow. + + The ID of the SetupIntent for Checkout Sessions in `setup` mode. + +*Please note that this object is one of the following possible types* + + + + + When set, provides configuration for Checkout to collect a shipping address from a customer. + +*Please note that this object is one of the following possible types* + + + + The details of the customer cost of shipping, including the customer chosen ShippingRate. + +*Please note that this object is one of the following possible types* + + + + Shipping information for this Checkout Session. + +*Please note that this object is one of the following possible types* + + + + The status of the Checkout Session, one of `open`, `complete`, or `expired`. + + Describes the type of transaction being performed by Checkout in order to customize +relevant text on the page, such as the submit button. `submit_type` can only be +specified on Checkout Sessions in `payment` mode, but not Checkout Sessions +in `subscription` or `setup` mode. + + The ID of the subscription for Checkout Sessions in `subscription` mode. + +*Please note that this object is one of the following possible types* + + + + + + Tax and discount details for the computed total amount. + +*Please note that this object is one of the following possible types* + + + + The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` +This value is only present when the session is active. + \ No newline at end of file diff --git a/generated-integrations/stripe/package.json b/generated-integrations/stripe/package.json new file mode 100644 index 00000000000..a337d1c46aa --- /dev/null +++ b/generated-integrations/stripe/package.json @@ -0,0 +1,34 @@ +{ + "name": "@trigger.dev/stripe", + "version": "0.1.21", + "description": "The official Stripe integration for Trigger.dev", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "publishConfig": { + "access": "public" + }, + "files": [ + "dist/index.js", + "dist/index.d.ts", + "dist/index.js.map" + ], + "devDependencies": { + "@trigger.dev/sdk": "workspace:*", + "@types/debug": "^4.1.7", + "@types/node": "16", + "rimraf": "^3.0.2", + "tsup": "^6.5.0" + }, + "peerDependencies": { + "@trigger.dev/sdk": "workspace:*" + }, + "scripts": { + "clean": "rimraf dist", + "build": "npm run clean && npm run build:tsup", + "build:tsup": "tsup" + }, + "dependencies": { + "debug": "^4.3.4", + "zod": "^3.20.2" + } +} diff --git a/generated-integrations/stripe/schema-optimized.json b/generated-integrations/stripe/schema-optimized.json new file mode 100644 index 00000000000..003f6669e9a --- /dev/null +++ b/generated-integrations/stripe/schema-optimized.json @@ -0,0 +1,63960 @@ +{ + "title": "StripeTypes", + "anyOf": [ + { + "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).", + "properties": { + "after_expiration": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for actions to take if this Checkout Session expires." + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": [ + "boolean", + "null" + ] + }, + "amount_subtotal": { + "description": "Total of all items before discounts or taxes are applied.", + "type": [ + "integer", + "null" + ] + }, + "amount_total": { + "description": "Total of all items after discounts and taxes are applied.", + "type": [ + "integer", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_pages_checkout_session_automatic_tax" + }, + "billing_address_collection": { + "description": "Describes whether Checkout should collect the customer's billing address.", + "enum": [ + "auto", + "required", + null + ], + "type": [ + "string", + "null" + ] + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "consent": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent" + }, + { + "type": "null" + } + ], + "description": "Results of `consent_collection` for this session." + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the Checkout Session to gather active consent from customers." + }, + "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).", + "type": [ + "string", + "null" + ] + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", + "enum": [ + "always", + "if_required", + null + ], + "type": [ + "string", + "null" + ] + }, + "customer_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" + }, + { + "type": "null" + } + ], + "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode." + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "expires_at": { + "description": "The timestamp at which the Checkout Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice created by the Checkout Session, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Details on the state of invoice creation for the Checkout Session." + }, + "line_items": { + "description": "The line items purchased by the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "mode": { + "description": "The mode of the Checkout Session.", + "enum": [ + "payment", + "setup", + "subscription" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "checkout.session" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_link": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_link" + }, + { + "type": "null" + } + ], + "description": "The ID of the Payment Link that created this Session.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_link" + } + ] + } + }, + "payment_method_collection": { + "description": "Configure whether a Checkout Session should collect a payment method.", + "enum": [ + "always", + "if_required", + null + ], + "type": [ + "string", + "null" + ] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/checkout_session_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession." + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_status": { + "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", + "enum": [ + "no_payment_required", + "paid", + "unpaid" + ], + "type": "string" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_phone_number_collection" + }, + "recovered_from": { + "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this Checkout Session." + }, + "shipping_options": { + "description": "The shipping rate options applied to this Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" + }, + "type": "array" + }, + "status": { + "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", + "enum": [ + "complete", + "expired", + "open", + null + ], + "type": [ + "string", + "null" + ] + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": [ + "auto", + "book", + "donate", + "pay", + null + ], + "type": [ + "string", + "null" + ] + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "success_url": { + "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id_collection" + }, + "total_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details" + }, + { + "type": "null" + } + ], + "description": "Tax and discount details for the computed total amount." + }, + "url": { + "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "automatic_tax", + "created", + "custom_fields", + "custom_text", + "expires_at", + "id", + "livemode", + "mode", + "object", + "payment_method_types", + "payment_status", + "shipping_options", + "success_url" + ], + "title": "CheckoutSessionCompletedOutput", + "type": "object", + "x-expandableFields": [ + "after_expiration", + "automatic_tax", + "consent", + "consent_collection", + "custom_fields", + "custom_text", + "customer", + "customer_details", + "invoice", + "invoice_creation", + "line_items", + "payment_intent", + "payment_link", + "payment_method_options", + "phone_number_collection", + "setup_intent", + "shipping_address_collection", + "shipping_cost", + "shipping_details", + "shipping_options", + "subscription", + "tax_id_collection", + "total_details" + ], + "x-resourceId": "checkout.session", + "components": { + "schemas": { + "payment_pages_checkout_session_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": [ + "integer", + "null" + ] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "PaymentPagesCheckoutSessionTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "payment_pages_checkout_session_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "Amount of tax applied for this rate.", + "type": "integer" + }, + "rate": { + "$ref": "#/components/schemas/tax_rate" + } + }, + "required": [ + "amount", + "rate" + ], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": [ + "rate" + ] + }, + "tax_rate": { + "description": "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_rate" + ], + "type": "string" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "created", + "display_name", + "id", + "inclusive", + "livemode", + "object", + "percentage" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_rate" + }, + "line_items_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount discounted.", + "type": "integer" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + }, + "required": [ + "amount", + "discount" + ], + "title": "LineItemsDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "discount": { + "description": "A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "end": { + "description": "If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "coupon", + "id", + "object", + "start" + ], + "title": "Discount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "discount" + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.", + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.", + "maxLength": 5000, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer that this promotion code can be used by.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "expires_at": { + "description": "Date at which the promotion code can no longer be redeemed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this promotion code can be redeemed.", + "type": [ + "integer", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "promotion_code" + ], + "type": "string" + }, + "restrictions": { + "$ref": "#/components/schemas/promotion_codes_resource_restrictions" + }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "coupon", + "created", + "id", + "livemode", + "object", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "restrictions" + ], + "x-resourceId": "promotion_code" + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/promotion_code_currency_option" + }, + "description": "Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "first_time_transaction": { + "description": "A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices", + "type": "boolean" + }, + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": [ + "integer", + "null" + ] + }, + "minimum_amount_currency": { + "description": "Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "first_time_transaction" + ], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "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": [] + }, + "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" + }, + "customer": { + "description": "This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.\n\nRelated guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "type": "integer" + }, + "cash_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/cash_balance" + }, + { + "type": "null" + } + ], + "description": "The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source \"cash_balance\". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the customer.\n\nIf you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "delinquent": { + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.\n\nIf an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.", + "type": [ + "boolean", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount active on the customer, if there is one." + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_credit_balance": { + "additionalProperties": { + "type": "integer" + }, + "description": "The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.", + "type": "object" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_customer_setting" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "next_invoice_sequence": { + "description": "The suffix of the customer's next invoice number, e.g., 0001.", + "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, + "type": [ + "string", + "null" + ] + }, + "preferred_locales": { + "description": "The customer's preferred locales (languages), ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer." + }, + "sources": { + "description": "The customer's payment sources, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "tax": { + "$ref": "#/components/schemas/customer_tax" + }, + "tax_exempt": { + "description": "Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **\"Reverse charge\"**.", + "enum": [ + "exempt", + "none", + "reverse", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this customer belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "id", + "livemode", + "object" + ], + "title": "Customer", + "type": "object", + "x-expandableFields": [ + "address", + "cash_balance", + "default_source", + "discount", + "invoice_settings", + "shipping", + "sources", + "subscriptions", + "tax", + "tax_ids", + "test_clock" + ], + "x-resourceId": "customer" + }, + "test_helpers.test_clock": { + "description": "A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,\nyou can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deletes_after": { + "description": "Time at which this clock is scheduled to auto delete.", + "format": "unix-time", + "type": "integer" + }, + "frozen_time": { + "description": "Time at which all objects belonging to this clock are frozen.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "The custom name supplied at creation.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "object", + "status" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "test_helpers.test_clock" + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.\n\nRelated guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_id" + ], + "type": "string" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "Value of the tax ID.", + "maxLength": 5000, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_id_verification" + }, + { + "type": "null" + } + ], + "description": "Tax ID verification information." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "type", + "value" + ], + "title": "tax_id", + "type": "object", + "x-expandableFields": [ + "customer", + "verification" + ], + "x-resourceId": "tax_id" + }, + "tax_id_verification": { + "description": "", + "properties": { + "status": { + "description": "Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.", + "enum": [ + "pending", + "unavailable", + "unverified", + "verified" + ], + "type": "string" + }, + "verified_address": { + "description": "Verified address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_name": { + "description": "Verified name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "status" + ], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [] + }, + "customer_tax": { + "description": "", + "properties": { + "automatic_tax": { + "description": "Surfaces if automatic tax computation is possible given the current customer location information.", + "enum": [ + "failed", + "not_collecting", + "supported", + "unrecognized_location" + ], + "type": "string" + }, + "ip_address": { + "description": "A recent IP address of the customer used for tax reporting and tax location inference.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer_tax_location" + }, + { + "type": "null" + } + ], + "description": "The customer's location as identified by Stripe Tax." + } + }, + "required": [ + "automatic_tax" + ], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": [ + "location" + ] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The customer's country as identified by Stripe Tax.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "The data source used to infer the customer's location.", + "enum": [ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination" + ], + "type": "string" + }, + "state": { + "description": "The customer's state, county, province, or region as identified by Stripe Tax.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "country", + "source" + ], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [] + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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", + "type": "integer" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "cancel_at": { + "description": "A date in the future at which the subscription will automatically get canceled", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancel_at_period_end": { + "description": "If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current 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", + "type": [ + "integer", + "null" + ] + }, + "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).", + "type": "string" + }, + "current_period_end": { + "description": "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "Start of the current period that the subscription has been invoiced for.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.", + "type": [ + "integer", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "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.", + "maxLength": 500, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis." + }, + "ended_at": { + "description": "If the subscription has ended, the date the subscription ended.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of subscription items, each with an attached price.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "latest_invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The most recent invoice this subscription has generated.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "next_pending_invoice_item_invoice": { + "description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "pause_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pause_collection" + }, + { + "type": "null" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_settings" + }, + { + "type": "null" + } + ], + "description": "Payment settings passed on to invoices created by the subscription." + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" + }, + { + "type": "null" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "pending_setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + }, + { + "type": "null" + } + ], + "description": "You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "pending_update": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pending_update" + }, + { + "type": "null" + } + ], + "description": "If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid." + }, + "schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The schedule attached to the subscription", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "start_date": { + "description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, 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\nIf subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.", + "enum": [ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "If the subscription has a trial, the end of that trial.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings" + }, + { + "type": "null" + } + ], + "description": "Settings related to subscription trials." + }, + "trial_start": { + "description": "If the subscription has a trial, the beginning of that trial.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "automatic_tax", + "billing_cycle_anchor", + "cancel_at_period_end", + "collection_method", + "created", + "currency", + "current_period_end", + "current_period_start", + "customer", + "id", + "items", + "livemode", + "metadata", + "object", + "start_date", + "status" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_thresholds", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription" + }, + "subscriptions_trials_resource_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { + "$ref": "#/components/schemas/subscriptions_trials_resource_end_behavior" + } + }, + "required": [ + "end_behavior" + ], + "title": "SubscriptionsTrialsResourceTrialSettings", + "type": "object", + "x-expandableFields": [ + "end_behavior" + ] + }, + "subscriptions_trials_resource_end_behavior": { + "description": "Defines how a subscription behaves when a free trial ends.", + "properties": { + "missing_payment_method": { + "description": "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.", + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "SubscriptionsTrialsResourceEndBehavior", + "type": "object", + "x-expandableFields": [] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": [ + "number", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "account": { + "description": "This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that\naccount has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)\nfor a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**\nbelow. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_business_profile" + }, + { + "type": "null" + } + ], + "description": "Business information about the account." + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "capabilities": { + "$ref": "#/components/schemas/account_capabilities" + }, + "charges_enabled": { + "description": "Whether the account can create live charges.", + "type": "boolean" + }, + "company": { + "$ref": "#/components/schemas/legal_entity_company" + }, + "controller": { + "$ref": "#/components/schemas/account_unification_account_controller" + }, + "country": { + "description": "The account's country.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the account was connected. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_currency": { + "description": "Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).", + "maxLength": 5000, + "type": "string" + }, + "details_submitted": { + "description": "Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.", + "type": "boolean" + }, + "email": { + "description": "An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "external_accounts": { + "description": "External accounts (bank accounts and debit cards) currently attached to this account", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "future_requirements": { + "$ref": "#/components/schemas/account_future_requirements" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "$ref": "#/components/schemas/person" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account" + ], + "type": "string" + }, + "payouts_enabled": { + "description": "Whether Stripe can send payouts to this account.", + "type": "boolean" + }, + "requirements": { + "$ref": "#/components/schemas/account_requirements" + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_settings" + }, + { + "type": "null" + } + ], + "description": "Options for customizing how the account functions within Stripe." + }, + "tos_acceptance": { + "$ref": "#/components/schemas/account_tos_acceptance" + }, + "type": { + "description": "The Stripe account type. Can be `standard`, `express`, or `custom`.", + "enum": [ + "custom", + "express", + "standard" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Account", + "type": "object", + "x-expandableFields": [ + "business_profile", + "capabilities", + "company", + "controller", + "external_accounts", + "future_requirements", + "individual", + "requirements", + "settings", + "tos_acceptance" + ], + "x-resourceId": "account" + }, + "account_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted their service agreement", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted their service agreement", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { + "$ref": "#/components/schemas/account_bacs_debit_payments_settings" + }, + "branding": { + "$ref": "#/components/schemas/account_branding_settings" + }, + "card_issuing": { + "$ref": "#/components/schemas/account_card_issuing_settings" + }, + "card_payments": { + "$ref": "#/components/schemas/account_card_payments_settings" + }, + "dashboard": { + "$ref": "#/components/schemas/account_dashboard_settings" + }, + "payments": { + "$ref": "#/components/schemas/account_payments_settings" + }, + "payouts": { + "$ref": "#/components/schemas/account_payout_settings" + }, + "sepa_debit_payments": { + "$ref": "#/components/schemas/account_sepa_debit_payments_settings" + }, + "treasury": { + "$ref": "#/components/schemas/account_treasury_settings" + } + }, + "required": [ + "branding", + "card_payments", + "dashboard", + "payments" + ], + "title": "AccountSettings", + "type": "object", + "x-expandableFields": [ + "bacs_debit_payments", + "branding", + "card_issuing", + "card_payments", + "dashboard", + "payments", + "payouts", + "sepa_debit_payments", + "treasury" + ] + }, + "account_treasury_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/account_terms_of_service" + } + }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_sepa_debit_payments_settings": { + "description": "", + "properties": { + "creditor_id": { + "description": "SEPA creditor identifier that identifies the company making the payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountSepaDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_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 our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.", + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/transfer_schedule" + }, + "statement_descriptor": { + "description": "The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "debit_negative_balances", + "schedule" + ], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": [ + "schedule" + ] + }, + "transfer_schedule": { + "description": "", + "properties": { + "delay_days": { + "description": "The number of days charges for the account will be held before being paid out.", + "type": "integer" + }, + "interval": { + "description": "How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.", + "maxLength": 5000, + "type": "string" + }, + "monthly_anchor": { + "description": "The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.", + "type": "integer" + }, + "weekly_anchor": { + "description": "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "delay_days", + "interval" + ], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_kana": { + "description": "The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { + "$ref": "#/components/schemas/account_decline_charge_on" + }, + "statement_descriptor_prefix": { + "description": "The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": [ + "decline_on" + ] + }, + "account_decline_charge_on": { + "description": "", + "properties": { + "avs_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.", + "type": "boolean" + }, + "cvc_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.", + "type": "boolean" + } + }, + "required": [ + "avs_failure", + "cvc_failure" + ], + "title": "AccountDeclineChargeOn", + "type": "object", + "x-expandableFields": [] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/card_issuing_account_terms_of_service" + } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "card_issuing_account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "primary_color": { + "description": "A CSS hex color value representing the primary branding color for this account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "secondary_color": { + "description": "A CSS hex color value representing the secondary branding color for this account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": [ + "icon", + "logo" + ] + }, + "file": { + "description": "This is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File Upload Guide](https://stripe.com/docs/file-upload).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The time at which the file expires and is no longer available in epoch seconds.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "filename": { + "description": "A filename for the file, suitable for saving to a filesystem.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "links": { + "description": "A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileLinkList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file" + ], + "type": "string" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "size": { + "description": "The size in bytes of the file object.", + "type": "integer" + }, + "title": { + "description": "A user friendly title for the document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL from which the file can be downloaded using your live secret API key.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "id", + "object", + "purpose", + "size" + ], + "title": "File", + "type": "object", + "x-expandableFields": [ + "links" + ], + "x-resourceId": "file" + }, + "file_link": { + "description": "To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that can be used 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": "Whether this link is already expired.", + "type": "boolean" + }, + "expires_at": { + "description": "Time at which the link expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object this link points to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file_link" + ], + "type": "string" + }, + "url": { + "description": "The publicly accessible URL to download the file.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "expired", + "file", + "id", + "livemode", + "metadata", + "object" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": [ + "file" + ], + "x-resourceId": "file_link" + }, + "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 will appear on the mandate, and as the statement descriptor.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "disabled_reason": { + "description": "If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": [ + "array", + "null" + ] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "invalid_address_city_state_postal_code", + "invalid_dob_age_under_18", + "invalid_representative_country", + "invalid_street_address", + "invalid_tos_acceptance", + "invalid_value_other", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "An informative message that indicates the error type and provides additional details about the error.", + "maxLength": 5000, + "type": "string" + }, + "requirement": { + "description": "The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "code", + "reason", + "requirement" + ], + "title": "AccountRequirementsError", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to satisfy all fields in `original_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "alternative_fields_due", + "original_fields_due" + ], + "title": "AccountRequirementsAlternative", + "type": "object", + "x-expandableFields": [] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.\nSee the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.\n\nRelated guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).", + "properties": { + "account": { + "description": "The account the person is associated with.", + "maxLength": 5000, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "dob": { + "$ref": "#/components/schemas/legal_entity_dob" + }, + "email": { + "description": "The person's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_future_requirements" + }, + { + "type": "null" + } + ] + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number_provided": { + "description": "Whether the person's `id_number` was provided.", + "type": "boolean" + }, + "id_number_secondary_provided": { + "description": "Whether the person's `id_number_secondary` was provided.", + "type": "boolean" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nationality": { + "description": "The country where the person is a national.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "$ref": "#/components/schemas/address" + }, + "relationship": { + "$ref": "#/components/schemas/person_relationship" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_requirements" + }, + { + "type": "null" + } + ] + }, + "ssn_last_4_provided": { + "description": "Whether the last four digits of the person's Social Security number have been provided (U.S. only).", + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/legal_entity_person_verification" + } + }, + "required": [ + "account", + "created", + "id", + "object" + ], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "verification" + ], + "x-resourceId": "person" + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + { + "type": "null" + } + ], + "description": "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "document": { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": [ + "additional_document", + "document" + ] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say \"Identity document is too unclear to read\".", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "person_relationship": { + "description": "", + "properties": { + "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.", + "type": [ + "boolean", + "null" + ] + }, + "executive": { + "description": "Whether the person has significant responsibility to control, manage, or direct the organization.", + "type": [ + "boolean", + "null" + ] + }, + "owner": { + "description": "Whether the person is an owner of the account’s legal entity.", + "type": [ + "boolean", + "null" + ] + }, + "percent_ownership": { + "description": "The percent owned by the person of the account's legal entity.", + "type": [ + "number", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "title": { + "description": "The person's title (e.g., CEO, Support Engineer).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [] + }, + "address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + "null" + ] + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "Address", + "type": "object", + "x-expandableFields": [] + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "legal_entity_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_japan_address": { + "description": "", + "properties": { + "city": { + "description": "City/Ward.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + "null" + ] + }, + "line1": { + "description": "Block/Building number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "line2": { + "description": "Building details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "Prefecture.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "town": { + "description": "Town/cho-me.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with 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", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": [ + "array", + "null" + ] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "card": { + "description": "You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line1_check": { + "description": "If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "description": "If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + }, + "brand": { + "description": "Card brand. Can be `American Express`, `Diners Club`, `Discover`, `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, + "type": [ + "string", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.", + "type": [ + "string", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "default_for_currency": { + "description": "Whether this card is the default external account for its currency.", + "type": [ + "boolean", + "null" + ] + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + }, + "status": { + "description": "For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "object" + ], + "title": "Card", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "card" + }, + "bank_account": { + "description": "These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer\ndestinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-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](https://stripe.com/docs/payments/bank-debits-transfers).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The ID of the account that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number (e.g., `WELLS FARGO`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_for_currency": { + "description": "Whether this bank account is the default external account for its currency.", + "type": [ + "boolean", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "bank_account" + ], + "type": "string" + }, + "routing_number": { + "description": "The routing transit number for the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country", + "currency", + "id", + "last4", + "object", + "status" + ], + "title": "BankAccount", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "bank_account" + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "is_controller": { + "description": "`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.", + "type": "boolean" + }, + "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": [] + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kana variation of the company's primary address (Japan only)." + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kanji variation of the company's primary address (Japan only)." + }, + "directors_provided": { + "description": "Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).", + "type": "boolean" + }, + "executives_provided": { + "description": "Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.", + "type": "boolean" + }, + "name": { + "description": "The company's legal name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "owners_provided": { + "description": "Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).", + "type": "boolean" + }, + "ownership_declaration": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_ubo_declaration" + }, + { + "type": "null" + } + ], + "description": "This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct." + }, + "phone": { + "description": "The company's phone number (used for verification).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.", + "enum": [ + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + }, + "tax_id_registrar": { + "description": "The jurisdiction in which the `tax_id` is registered (Germany-based companies only).", + "maxLength": 5000, + "type": "string" + }, + "vat_id_provided": { + "description": "Whether the company's business VAT number was provided.", + "type": "boolean" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_company_verification" + }, + { + "type": "null" + } + ], + "description": "Information on the verification state of the company." + } + }, + "title": "LegalEntityCompany", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "ownership_declaration", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/legal_entity_company_verification_document" + } + }, + "required": [ + "document" + ], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "legal_entity_ubo_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the beneficial owner attestation was made.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the beneficial owner attestation was made.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user-agent string from the browser where the beneficial owner attestation was made.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "au_becs_debit_payments": { + "description": "The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bacs_debit_payments": { + "description": "The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bancontact_payments": { + "description": "The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bank_transfer_payments": { + "description": "The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "blik_payments": { + "description": "The status of the blik payments capability of the account, or whether the account can directly process blik charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "boleto_payments": { + "description": "The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_issuing": { + "description": "The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_payments": { + "description": "The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "cartes_bancaires_payments": { + "description": "The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "paynow_payments": { + "description": "The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "promptpay_payments": { + "description": "The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + } + }, + "title": "AccountCapabilities", + "type": "object", + "x-expandableFields": [] + }, + "account_business_profile": { + "description": "", + "properties": { + "mcc": { + "description": "[The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The customer-facing business name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "support_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "A publicly available mailing address for sending support issues to." + }, + "support_email": { + "description": "A publicly available email address for sending support issues to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "support_phone": { + "description": "A publicly available phone number to call with support issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "support_url": { + "description": "A publicly available website for handling support issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The business's publicly available website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": [ + "support_address" + ] + }, + "subscription_schedule": { + "description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "canceled_at": { + "description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "completed_at": { + "description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_phase": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_schedule_current_phase" + }, + { + "type": "null" + } + ], + "description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`." + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_settings": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_schedule" + ], + "type": "string" + }, + "phases": { + "description": "Configuration for the subscription schedule's phases.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_phase_configuration" + }, + "type": "array" + }, + "released_at": { + "description": "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "released_subscription": { + "description": "ID of the subscription once managed by the subscription schedule (if it is released).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "enum": [ + "active", + "canceled", + "completed", + "not_started", + "released" + ], + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "ID of the subscription managed by the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "customer", + "default_settings", + "end_behavior", + "id", + "livemode", + "object", + "phases", + "status" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule" + }, + "subscription_schedule_phase_configuration": { + "description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.", + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/schedules_phase_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start", + null + ], + "type": [ + "string", + "null" + ] + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + }, + { + "type": "null" + } + ], + "description": "ID of the coupon to use during this phase of the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The invoice settings applicable during this phase." + }, + "items": { + "description": "Subscription items to configure the subscription to during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_configuration_item" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.", + "type": [ + "object", + "null" + ] + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "proration_behavior": { + "description": "If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "When the trial ends within the phase.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "add_invoice_items", + "currency", + "end_date", + "items", + "proration_behavior", + "start_date" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "coupon", + "default_payment_method", + "default_tax_rates", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.", + "type": [ + "object", + "null" + ] + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "Quantity of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "tax_rates": { + "description": "The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ] + }, + "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": [] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the price can be used for new purchases.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/currency_option" + }, + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "price" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/recurring" + }, + { + "type": "null" + } + ], + "description": "The recurring components of a price such as `interval` and `usage_type`." + }, + "tax_behavior": { + "description": "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.", + "enum": [ + "graduated", + "volume", + null + ], + "type": [ + "string", + "null" + ] + }, + "transform_quantity": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_quantity" + }, + { + "type": "null" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`." + }, + "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 %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "product", + "type" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price" + }, + "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": [] + }, + "price_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "type": [ + "integer", + "null" + ] + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PriceTier", + "type": "object", + "x-expandableFields": [] + }, + "recurring": { + "description": "", + "properties": { + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum", + null + ], + "type": [ + "string", + "null" + ] + }, + "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" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ], + "title": "Recurring", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "product": { + "description": "Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)", + "properties": { + "active": { + "description": "Whether the product is currently available for purchase.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + } + ] + } + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "product" + ], + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "$ref": "#/components/schemas/package_dimensions" + }, + { + "type": "null" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": [ + "boolean", + "null" + ] + }, + "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.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "created", + "id", + "images", + "livemode", + "metadata", + "name", + "object", + "updated" + ], + "title": "Product", + "type": "object", + "x-expandableFields": [ + "default_price", + "package_dimensions", + "tax_code" + ], + "x-resourceId": "product" + }, + "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" + }, + "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": [] + }, + "custom_unit_amount": { + "description": "", + "properties": { + "maximum": { + "description": "The maximum unit amount the customer can specify for this item.", + "type": [ + "integer", + "null" + ] + }, + "minimum": { + "description": "The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.", + "type": [ + "integer", + "null" + ] + }, + "preset": { + "description": "The starting unit amount which can be updated by the customer.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "tax_behavior": { + "description": "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "unit_amount": { + "description": "The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": [ + "custom_unit_amount", + "tiers" + ] + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "type": [ + "integer", + "null" + ] + } + }, + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_subscription_schedule_setting": { + "description": "", + "properties": { + "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`.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": [] + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_card_present" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_grabpay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_link" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_method" + ], + "type": "string" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_promptpay" + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_sofort" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_wechat_pay" + } + }, + "required": [ + "billing_details", + "created", + "id", + "livemode", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "radar_options", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "x-resourceId": "payment_method" + }, + "payment_method_wechat_pay": { + "description": "", + "properties": {}, + "title": "payment_method_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "financial_connections_account": { + "description": "The ID of the Financial Connections Account used to create the payment method.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/us_bank_account_networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about US bank account networks that can be used." + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": [ + "networks" + ] + }, + "us_bank_account_networks": { + "description": "", + "properties": { + "preferred": { + "description": "The preferred network.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "supported": { + "description": "All supported networks.", + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "supported" + ], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sofort": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/sepa_debit_generated_from" + }, + { + "type": "null" + } + ], + "description": "Information about the object that generated this PaymentMethod." + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": [ + "generated_from" + ] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": [ + "charge", + "setup_attempt" + ] + }, + "setup_attempt": { + "description": "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_attempt" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details" + }, + "setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during this attempt to confirm the SetupIntent, if any." + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "status": { + "description": "Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "description": "The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "setup_intent", + "status", + "usage" + ], + "title": "PaymentFlowsSetupIntentSetupAttempt", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent" + ], + "x-resourceId": "setup_attempt" + }, + "setup_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 could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent as soon as you're ready to collect your customer's payment credentials.\nDo not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.\nThe SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/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](/guides/strong-customer-authentication) may need to be run through\n[Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection\nin order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).\nIf the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,\nit will automatically attach the resulting payment method to that Customer.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you ensure that your customers experience the minimum set of required friction,\neven as regulations change over time.\n\nRelated guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "cancellation_reason": { + "description": "Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.", + "enum": [ + "abandoned", + "duplicate", + "requested_by_customer", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered in the previous SetupIntent confirmation." + }, + "latest_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The most recent SetupAttempt for this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_next_action" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to continue payment setup." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the setup is intended.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used with this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this SetupIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "status": { + "description": "[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future.\n\nUse `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method_types", + "status", + "usage" + ], + "title": "SetupIntent", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "last_setup_error", + "latest_attempt", + "mandate", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "single_use_mandate" + ], + "x-resourceId": "setup_intent" + }, + "mandate": { + "description": "A Mandate is a record of the permission a customer has given you to debit their payment method.", + "properties": { + "customer_acceptance": { + "$ref": "#/components/schemas/customer_acceptance" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "multi_use": { + "$ref": "#/components/schemas/mandate_multi_use" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "mandate" + ], + "type": "string" + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/mandate_payment_method_details" + }, + "single_use": { + "$ref": "#/components/schemas/mandate_single_use" + }, + "status": { + "description": "The status of the mandate, which indicates whether it can be used to initiate a payment.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "type": { + "description": "The type of the mandate.", + "enum": [ + "multi_use", + "single_use" + ], + "type": "string" + } + }, + "required": [ + "customer_acceptance", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "title": "Mandate", + "type": "object", + "x-expandableFields": [ + "customer_acceptance", + "multi_use", + "payment_method", + "payment_method_details", + "single_use" + ], + "x-resourceId": "mandate" + }, + "mandate_single_use": { + "description": "", + "properties": { + "amount": { + "description": "On a single use mandate, the amount of the payment.", + "type": "integer" + }, + "currency": { + "description": "On a single use mandate, the currency of the payment.", + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "mandate_single_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/mandate_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/mandate_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/mandate_bacs_debit" + }, + "blik": { + "$ref": "#/components/schemas/mandate_blik" + }, + "card": { + "$ref": "#/components/schemas/card_mandate_payment_method_details" + }, + "link": { + "$ref": "#/components/schemas/mandate_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/mandate_sepa_debit" + }, + "type": { + "description": "The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/mandate_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "mandate_payment_method_details", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "mandate_us_bank_account": { + "description": "", + "properties": {}, + "title": "mandate_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "mandate_sepa_debit": { + "description": "", + "properties": { + "reference": { + "description": "The unique reference of the mandate.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "reference", + "url" + ], + "title": "mandate_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_link": { + "description": "", + "properties": {}, + "title": "mandate_link", + "type": "object", + "x-expandableFields": [] + }, + "card_mandate_payment_method_details": { + "description": "", + "properties": {}, + "title": "card_mandate_payment_method_details", + "type": "object", + "x-expandableFields": [] + }, + "mandate_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "mandate_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "mandate_options_off_session_details_blik": { + "description": "", + "properties": { + "amount": { + "description": "Amount of each recurring payment.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Currency of each recurring payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "interval": { + "description": "Frequency interval of each recurring payment.", + "enum": [ + "day", + "month", + "week", + "year", + null + ], + "type": [ + "string", + "null" + ] + }, + "interval_count": { + "description": "Frequency indicator of each recurring payment.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "mandate_options_off_session_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "network_status": { + "description": "The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.", + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "type": "string" + }, + "reference": { + "description": "The unique reference identifying the mandate on the Bacs network.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "network_status", + "reference", + "url" + ], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_au_becs_debit": { + "description": "", + "properties": { + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "mandate_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_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, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "required": [ + "payment_schedule", + "transaction_type" + ], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_multi_use": { + "description": "", + "properties": {}, + "title": "mandate_multi_use", + "type": "object", + "x-expandableFields": [] + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time at which the customer accepted the Mandate.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "offline": { + "$ref": "#/components/schemas/offline_acceptance" + }, + "online": { + "$ref": "#/components/schemas/online_acceptance" + }, + "type": { + "description": "The type of customer acceptance information included with the Mandate. One of `online` or `offline`.", + "enum": [ + "offline", + "online" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": [ + "offline", + "online" + ] + }, + "online_acceptance": { + "description": "", + "properties": { + "ip_address": { + "description": "The IP address from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "offline_acceptance": { + "description": "", + "properties": {}, + "title": "offline_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card" + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "setup_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "SetupIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "linked_account_options_us_bank_account": { + "description": "", + "properties": { + "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" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": { + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "integer", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_blik": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_blik" + } + }, + "title": "setup_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_mandate_options_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "setup_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account", + "enum": [ + "cad", + "usd", + null + ], + "type": [ + "string", + "null" + ] + }, + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_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, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "redirect_to_url": { + "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" + } + }, + "required": [ + "type" + ], + "title": "SetupIntentNextAction", + "type": "object", + "x-expandableFields": [ + "redirect_to_url", + "verify_with_microdeposits" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "api_errors": { + "description": "", + "properties": { + "charge": { + "description": "For card errors, the ID of the failed charge.", + "maxLength": 5000, + "type": "string" + }, + "code": { + "description": "For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "decline_code": { + "description": "For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.", + "maxLength": 40000, + "type": "string" + }, + "param": { + "description": "If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.", + "maxLength": 5000, + "type": "string" + }, + "payment_intent": { + "$ref": "#/components/schemas/payment_intent" + }, + "payment_method": { + "$ref": "#/components/schemas/payment_method" + }, + "payment_method_type": { + "description": "If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.", + "maxLength": 5000, + "type": "string" + }, + "request_log_url": { + "description": "A URL to the request log entry in your dashboard.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "$ref": "#/components/schemas/setup_intent" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "The source object for errors returned on a request involving a 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" + ] + }, + "source": { + "description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_type_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/source_type_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/source_type_acss_debit" + }, + "alipay": { + "$ref": "#/components/schemas/source_type_alipay" + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "au_becs_debit": { + "$ref": "#/components/schemas/source_type_au_becs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/source_type_bancontact" + }, + "card": { + "$ref": "#/components/schemas/source_type_card" + }, + "card_present": { + "$ref": "#/components/schemas/source_type_card_present" + }, + "client_secret": { + "description": "The client secret of the source. Used for client-side retrieval using a publishable key.", + "maxLength": 5000, + "type": "string" + }, + "code_verification": { + "$ref": "#/components/schemas/source_code_verification_flow" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.", + "type": [ + "string", + "null" + ] + }, + "customer": { + "description": "The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.", + "maxLength": 5000, + "type": "string" + }, + "eps": { + "$ref": "#/components/schemas/source_type_eps" + }, + "flow": { + "description": "The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.", + "maxLength": 5000, + "type": "string" + }, + "giropay": { + "$ref": "#/components/schemas/source_type_giropay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/source_type_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/source_type_klarna" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "multibanco": { + "$ref": "#/components/schemas/source_type_multibanco" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source" + ], + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/source_owner" + }, + { + "type": "null" + } + ], + "description": "Information about the owner of the payment instrument that may be used or required by particular source types." + }, + "p24": { + "$ref": "#/components/schemas/source_type_p24" + }, + "receiver": { + "$ref": "#/components/schemas/source_receiver_flow" + }, + "redirect": { + "$ref": "#/components/schemas/source_redirect_flow" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_type_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/source_type_sofort" + }, + "source_order": { + "$ref": "#/components/schemas/source_order" + }, + "statement_descriptor": { + "description": "Extra information about a source. This will appear on your customer's statement every time you charge the source.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.", + "maxLength": 5000, + "type": "string" + }, + "three_d_secure": { + "$ref": "#/components/schemas/source_type_three_d_secure" + }, + "type": { + "description": "The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "alipay", + "au_becs_debit", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "usage": { + "description": "Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "wechat": { + "$ref": "#/components/schemas/source_type_wechat" + } + }, + "required": [ + "client_secret", + "created", + "flow", + "id", + "livemode", + "object", + "status", + "type" + ], + "title": "Source", + "type": "object", + "x-expandableFields": [ + "code_verification", + "owner", + "receiver", + "redirect", + "source_order" + ], + "x-resourceId": "source" + }, + "source_type_wechat": { + "properties": { + "prepay_id": { + "type": "string" + }, + "qr_code_url": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_three_d_secure": { + "properties": { + "address_line1_check": { + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "type": [ + "string", + "null" + ] + }, + "authenticated": { + "type": [ + "boolean", + "null" + ] + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "card": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "customer": { + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "type": [ + "string", + "null" + ] + }, + "dynamic_last4": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "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).", + "type": "string" + }, + "email": { + "description": "The email address of the customer placing the order.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of items constituting the order.", + "items": { + "$ref": "#/components/schemas/source_order_item" + }, + "type": [ + "array", + "null" + ] + }, + "shipping": { + "$ref": "#/components/schemas/shipping" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": [ + "items", + "shipping" + ] + }, + "shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "Shipping", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "source_order_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount (price) for this order item.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "This currency of this order item. Required when `amount` is present.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description for this order item.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "parent": { + "description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [] + }, + "source_type_sofort": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "preferred_language": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_sepa_debit": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "mandate_reference": { + "type": [ + "string", + "null" + ] + }, + "mandate_url": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "return_url": { + "description": "The URL you provide to redirect the customer to after they authenticated their payment.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.", + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "return_url", + "status", + "url" + ], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_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, + "type": [ + "string", + "null" + ] + }, + "amount_charged": { + "description": "The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.", + "type": "integer" + }, + "amount_received": { + "description": "The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.", + "type": "integer" + }, + "amount_returned": { + "description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.", + "type": "integer" + }, + "refund_attributes_method": { + "description": "Type of refund attribute method, one of `email`, `manual`, or `none`.", + "maxLength": 5000, + "type": "string" + }, + "refund_attributes_status": { + "description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_type_p24": { + "properties": { + "reference": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Owner's address." + }, + "email": { + "description": "Owner's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Owner's full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "Owner's phone number (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "SourceOwner", + "type": "object", + "x-expandableFields": [ + "address", + "verified_address" + ] + }, + "source_type_multibanco": { + "properties": { + "entity": { + "type": [ + "string", + "null" + ] + }, + "reference": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_city": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_country": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_line1": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_line2": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_postal_code": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_state": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_name": { + "type": [ + "string", + "null" + ] + }, + "refund_iban": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_klarna": { + "properties": { + "background_image_url": { + "type": "string" + }, + "client_token": { + "type": [ + "string", + "null" + ] + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "page_title": { + "type": "string" + }, + "pay_later_asset_urls_descriptive": { + "type": "string" + }, + "pay_later_asset_urls_standard": { + "type": "string" + }, + "pay_later_name": { + "type": "string" + }, + "pay_later_redirect_url": { + "type": "string" + }, + "pay_now_asset_urls_descriptive": { + "type": "string" + }, + "pay_now_asset_urls_standard": { + "type": "string" + }, + "pay_now_name": { + "type": "string" + }, + "pay_now_redirect_url": { + "type": "string" + }, + "pay_over_time_asset_urls_descriptive": { + "type": "string" + }, + "pay_over_time_asset_urls_standard": { + "type": "string" + }, + "pay_over_time_name": { + "type": "string" + }, + "pay_over_time_redirect_url": { + "type": "string" + }, + "payment_method_categories": { + "type": "string" + }, + "purchase_country": { + "type": "string" + }, + "purchase_type": { + "type": "string" + }, + "redirect_url": { + "type": "string" + }, + "shipping_delay": { + "type": "integer" + }, + "shipping_first_name": { + "type": "string" + }, + "shipping_last_name": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_ideal": { + "properties": { + "bank": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_giropay": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_eps": { + "properties": { + "reference": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_code_verification_flow": { + "description": "", + "properties": { + "attempts_remaining": { + "description": "The number of attempts remaining to authenticate the source object with a verification code.", + "type": "integer" + }, + "status": { + "description": "The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "attempts_remaining", + "status" + ], + "title": "SourceCodeVerificationFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_type_card_present": { + "properties": { + "application_cryptogram": { + "type": "string" + }, + "application_preferred_name": { + "type": "string" + }, + "authorization_code": { + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "type": "string" + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "cvm_type": { + "type": "string" + }, + "data_type": { + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "type": "string" + }, + "emv_auth_data": { + "type": "string" + }, + "evidence_customer_signature": { + "type": [ + "string", + "null" + ] + }, + "evidence_transaction_certificate": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "pos_device_id": { + "type": [ + "string", + "null" + ] + }, + "pos_entry_mode": { + "type": "string" + }, + "read_method": { + "type": [ + "string", + "null" + ] + }, + "reader": { + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "type": "string" + }, + "transaction_status_information": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_card": { + "properties": { + "address_line1_check": { + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "type": [ + "string", + "null" + ] + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "type": [ + "string", + "null" + ] + }, + "dynamic_last4": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_bancontact": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "preferred_language": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_alipay": { + "properties": { + "data_string": { + "type": [ + "string", + "null" + ] + }, + "native_url": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_acss_debit": { + "properties": { + "bank_address_city": { + "type": [ + "string", + "null" + ] + }, + "bank_address_line_1": { + "type": [ + "string", + "null" + ] + }, + "bank_address_line_2": { + "type": [ + "string", + "null" + ] + }, + "bank_address_postal_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_ach_debit": { + "properties": { + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_ach_credit_transfer": { + "properties": { + "account_number": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_name": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_type": { + "type": [ + "string", + "null" + ] + }, + "refund_routing_number": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + }, + "swift_code": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "payment_intent": { + "description": "A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_capturable": { + "description": "Amount that can be captured from this PaymentIntent.", + "type": "integer" + }, + "amount_details": { + "$ref": "#/components/schemas/payment_flows_amount_details" + }, + "amount_received": { + "description": "Amount that was collected by this PaymentIntent.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": [ + "integer", + "null" + ] + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" + }, + { + "type": "null" + } + ], + "description": "Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)" + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice", + null + ], + "type": [ + "string", + "null" + ] + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "confirmation_method": { + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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 present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice that created this PaymentIntent, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "last_payment_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason." + }, + "latest_charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The latest charge created by this payment intent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).", + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action" + }, + { + "type": "null" + } + ], + "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." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used in this PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this PaymentIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "processing": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_processing" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you about the processing state of the payment." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this PaymentIntent, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/transfer_data" + }, + { + "type": "null" + } + ], + "description": "The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details." + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "capture_method", + "confirmation_method", + "created", + "currency", + "id", + "livemode", + "object", + "payment_method_types", + "status" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "invoice", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "processing", + "review", + "shipping", + "transfer_data" + ], + "x-resourceId": "payment_intent" + }, + "transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the payment will be attributed to for tax\nreporting, and where funds from the payment will be transferred to upon\npayment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "transfer_data", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "review": { + "description": "Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).", + "properties": { + "billing_zip": { + "description": "The ZIP or postal code of the card used, if applicable.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The charge associated with this review.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "closed_reason": { + "description": "The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "enum": [ + "approved", + "disputed", + "redacted", + "refunded", + "refunded_as_fraud", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "ip_address_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_location" + }, + { + "type": "null" + } + ], + "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." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "review" + ], + "type": "string" + }, + "open": { + "description": "If `true`, the review needs action.", + "type": "boolean" + }, + "opened_reason": { + "description": "The reason the review was opened. One of `rule` or `manual`.", + "enum": [ + "manual", + "rule" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_session" + }, + { + "type": "null" + } + ], + "description": "Information related to the browsing session of the user who initiated the payment." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "open", + "opened_reason", + "reason" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": [ + "charge", + "ip_address_location", + "payment_intent", + "session" + ], + "x-resourceId": "review" + }, + "radar_review_resource_session": { + "description": "", + "properties": { + "browser": { + "description": "The browser used in this browser session (e.g., `Chrome`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "device": { + "description": "Information about the device used for the browser session (e.g., `Samsung SM-G930T`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "platform": { + "description": "The platform for the browser session (e.g., `Macintosh`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "version": { + "description": "The version for the browser session (e.g., `61.0.3163.100`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "latitude": { + "description": "The geographic latitude where the payment originated.", + "type": [ + "number", + "null" + ] + }, + "longitude": { + "description": "The geographic longitude where the payment originated.", + "type": [ + "number", + "null" + ] + }, + "region": { + "description": "The state/county/province/region where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [] + }, + "charge": { + "description": "To charge a credit or a debit card, you create a `Charge` object. You can\nretrieve and refund individual charges as well as list all charges. Charges\nare identified by a unique, random ID.\n\nRelated guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_captured": { + "description": "Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "type": "null" + } + ], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "type": [ + "integer", + "null" + ] + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "calculated_statement_descriptor": { + "description": "The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 40000, + "type": [ + "string", + "null" + ] + }, + "disputed": { + "description": "Whether the charge has been disputed.", + "type": "boolean" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for charge failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fraud_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_fraud_details" + }, + { + "type": "null" + } + ], + "description": "Information on fraud assessments for the charge." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "charge" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_outcome" + }, + { + "type": "null" + } + ], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details." + }, + "paid": { + "description": "`true` if the charge succeeded, or was successfully authorized for later capture.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_method": { + "description": "ID of the payment method used in this charge.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Details about the payment method at the time of the transaction." + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge was sent to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RefundList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this charge if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for the charge." + }, + "source_transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "type": "null" + } + ], + "description": "The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the payment is either `succeeded`, `pending`, or `failed`.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_transfer_data" + }, + { + "type": "null" + } + ], + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details." + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "billing_details", + "captured", + "created", + "currency", + "disputed", + "id", + "livemode", + "metadata", + "object", + "paid", + "refunded", + "status" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "invoice", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "radar_options", + "refunds", + "review", + "shipping", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge" + }, + "charge_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.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "transfer": { + "description": "A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).", + "properties": { + "amount": { + "description": "Amount in %s to be transferred.", + "type": "integer" + }, + "amount_reversed": { + "description": "Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time that this record of the transfer was first created.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "ID of the Stripe account the transfer was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "destination_payment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer" + ], + "type": "string" + }, + "reversals": { + "description": "A list of reversals that have been applied to the transfer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "reversed": { + "description": "Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.", + "type": "boolean" + }, + "source_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "source_type": { + "description": "The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "amount_reversed", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer" + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination_payment_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "Linked payment refund for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer_reversal" + ], + "type": "string" + }, + "source_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "ID of the refund responsible for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object", + "transfer" + ], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal" + }, + "refund": { + "description": "`Refund` objects allow you to refund a charge that has previously been created\nbut not yet refunded. Funds will be refunded to the credit or debit card that\nwas originally charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)", + "maxLength": 5000, + "type": "string" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_reason": { + "description": "If the refund failed, the reason for refund failure if known. 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": "Email to which refund instructions, if required, are sent to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "next_action": { + "$ref": "#/components/schemas/refund_next_action" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "refund" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason for the refund, 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", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this refund.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "source_transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + }, + "status": { + "description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object" + ], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "failure_balance_transaction", + "next_action", + "payment_intent", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund" + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/refund_next_action_display_details" + }, + { + "type": "null" + } + ], + "description": "Contains the refund details." + }, + "type": { + "description": "Type of the next action to perform.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RefundNextAction", + "type": "object", + "x-expandableFields": [ + "display_details" + ] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { + "$ref": "#/components/schemas/email_sent" + }, + "expires_at": { + "description": "The expiry timestamp.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "email_sent", + "expires_at" + ], + "title": "RefundNextActionDisplayDetails", + "type": "object", + "x-expandableFields": [ + "email_sent" + ] + }, + "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": [] + }, + "balance_transaction": { + "description": "Balance transactions represent funds moving through your Stripe account.\nThey're created for every type of transaction that comes into or flows out of your Stripe account balance.\n\nRelated guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).", + "properties": { + "amount": { + "description": "Gross amount of the transaction, in %s.", + "type": "integer" + }, + "available_on": { + "description": "The date the transaction's net funds will become available in the Stripe balance.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "exchange_rate": { + "description": "The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.", + "type": [ + "number", + "null" + ] + }, + "fee": { + "description": "Fees (in %s) paid for this transaction.", + "type": "integer" + }, + "fee_details": { + "description": "Detailed breakdown of fees (in %s) paid for this transaction.", + "items": { + "$ref": "#/components/schemas/fee" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "net": { + "description": "Net amount of the transaction, in %s.", + "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](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The Stripe object to which this transaction is related.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + }, + "x-stripeBypassValidation": true + }, + "status": { + "description": "If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.", + "enum": [ + "adjustment", + "advance", + "advance_funding", + "anticipation_repayment", + "application_fee", + "application_fee_refund", + "charge", + "connect_collection_transfer", + "contribution", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "payment", + "payment_failure_refund", + "payment_refund", + "payout", + "payout_cancel", + "payout_failure", + "refund", + "refund_failure", + "reserve_transaction", + "reserved_funds", + "stripe_fee", + "stripe_fx_fee", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "created", + "currency", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": [ + "fee_details", + "source" + ], + "x-resourceId": "balance_transaction" + }, + "topup": { + "description": "To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).", + "properties": { + "amount": { + "description": "Amount transferred.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "failure_code": { + "description": "Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for top-up failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "topup" + ], + "type": "string" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "status" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "source" + ], + "x-resourceId": "topup" + }, + "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": [] + }, + "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).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reserve_transaction" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "id", + "object" + ], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [] + }, + "platform_tax_fee": { + "description": "", + "properties": { + "account": { + "description": "The Connected account that incurred this charge.", + "maxLength": 5000, + "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": [ + "platform_tax_fee" + ], + "type": "string" + }, + "source_transaction": { + "description": "The payment object that caused this tax to be inflicted.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of tax (VAT).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account", + "id", + "object", + "source_transaction", + "type" + ], + "title": "PlatformTax", + "type": "object", + "x-expandableFields": [] + }, + "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,\nas well as list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving Payouts](https://stripe.com/docs/payouts).", + "properties": { + "amount": { + "description": "Amount (in %s) to be transferred to your bank account or debit card.", + "type": "integer" + }, + "arrival_date": { + "description": "Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.", + "format": "unix-time", + "type": "integer" + }, + "automatic": { + "description": "Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts).", + "type": "boolean" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this payout on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + }, + { + "type": "null" + } + ], + "description": "ID of the bank account or card the payout was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ] + }, + "x-stripeBypassValidation": true + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for payout failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payout" + ], + "type": "string" + }, + "original_payout": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout reverses another, this is the ID of the original payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "reversed_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout was reversed, this is the ID of the payout that reverses this payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "source_type": { + "description": "The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a payout to be displayed on the user's bank statement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Can be `bank_account` or `card`.", + "enum": [ + "bank_account", + "card" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "arrival_date", + "automatic", + "created", + "currency", + "id", + "livemode", + "method", + "object", + "source_type", + "status", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by" + ], + "x-resourceId": "payout" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCard", + "type": "object", + "x-expandableFields": [] + }, + "deleted_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, + "type": [ + "string", + "null" + ] + }, + "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": [] + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).", + "properties": { + "amount": { + "description": "The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "authorization": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "type": "null" + } + ], + "description": "The `Authorization` object that led to this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.authorization" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card used to make this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this transaction belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "dispute": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "type": "null" + } + ], + "description": "If you've disputed the transaction, the ID of the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.dispute" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency with which the merchant is taking payment.", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.transaction" + ], + "type": "string" + }, + "purchase_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_purchase_details" + }, + { + "type": "null" + } + ], + "description": "Additional purchase information that is optionally provided by the merchant." + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "type" + ], + "title": "IssuingTransaction", + "type": "object", + "x-expandableFields": [ + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "dispute", + "merchant_data", + "purchase_details", + "treasury" + ], + "x-resourceId": "issuing.transaction" + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "flight": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_flight_data" + }, + { + "type": "null" + } + ], + "description": "Information about the flight that was purchased with this transaction." + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fuel_data" + }, + { + "type": "null" + } + ], + "description": "Information about fuel that was purchased with this transaction." + }, + "lodging": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_lodging_data" + }, + { + "type": "null" + } + ], + "description": "Information about lodging that was purchased with this transaction." + }, + "receipt": { + "description": "The line items in the purchase.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_receipt_data" + }, + "type": [ + "array", + "null" + ] + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": [ + "flight", + "fuel", + "lodging", + "receipt" + ] + }, + "issuing_transaction_receipt_data": { + "description": "", + "properties": { + "description": { + "description": "The description of the item. The maximum length of this field is 26 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "quantity": { + "description": "The quantity of the item.", + "type": [ + "number", + "null" + ] + }, + "total": { + "description": "The total for this line item in cents.", + "type": [ + "integer", + "null" + ] + }, + "unit_cost": { + "description": "The unit cost of the item in cents.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_lodging_data": { + "description": "", + "properties": { + "check_in_at": { + "description": "The time of checking into the lodging.", + "type": [ + "integer", + "null" + ] + }, + "nights": { + "description": "The number of nights stayed at the lodging.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fuel_data": { + "description": "", + "properties": { + "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 `volume_decimal`. One of `us_gallon` or `liter`.", + "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" + }, + "volume_decimal": { + "description": "The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type", + "unit", + "unit_cost_decimal" + ], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_flight_data": { + "description": "", + "properties": { + "departure_at": { + "description": "The time that the flight departed.", + "type": [ + "integer", + "null" + ] + }, + "passenger_name": { + "description": "The name of the passenger.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "refundable": { + "description": "Whether the ticket is refundable.", + "type": [ + "boolean", + "null" + ] + }, + "segments": { + "description": "The legs of the trip.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_flight_data_leg" + }, + "type": [ + "array", + "null" + ] + }, + "travel_agency": { + "description": "The travel agency that issued the ticket.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": [ + "segments" + ] + }, + "issuing_transaction_flight_data_leg": { + "description": "", + "properties": { + "arrival_airport_code": { + "description": "The three-letter IATA airport code of the flight's destination.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "carrier": { + "description": "The airline carrier code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "departure_airport_code": { + "description": "The three-letter IATA airport code that the flight departed from.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flight_number": { + "description": "The flight number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "service_class": { + "description": "The flight's service class.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "stopover_allowed": { + "description": "Whether a stopover is allowed on this flight.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.", + "maxLength": 5000, + "type": "string" + }, + "category_code": { + "description": "The merchant category code for the seller’s business", + "maxLength": 5000, + "type": "string" + }, + "city": { + "description": "City where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Country where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the seller", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "State where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "category", + "category_code", + "network_id" + ], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [] + }, + "issuing.dispute": { + "description": "As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.\n\nRelated guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of balance transactions associated with the dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": [ + "array", + "null" + ] + }, + "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.", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/issuing_dispute_evidence" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.dispute" + ], + "type": "string" + }, + "status": { + "description": "Current status of the dispute.", + "enum": [ + "expired", + "lost", + "submitted", + "unsubmitted", + "won" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.transaction" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_dispute_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + } + }, + "required": [ + "amount", + "created", + "currency", + "evidence", + "id", + "livemode", + "metadata", + "object", + "status", + "transaction" + ], + "title": "IssuingDispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "evidence", + "transaction", + "treasury" + ], + "x-resourceId": "issuing.dispute" + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { + "$ref": "#/components/schemas/issuing_dispute_canceled_evidence" + }, + "duplicate": { + "$ref": "#/components/schemas/issuing_dispute_duplicate_evidence" + }, + "fraudulent": { + "$ref": "#/components/schemas/issuing_dispute_fraudulent_evidence" + }, + "merchandise_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_merchandise_not_as_described_evidence" + }, + "not_received": { + "$ref": "#/components/schemas/issuing_dispute_not_received_evidence" + }, + "other": { + "$ref": "#/components/schemas/issuing_dispute_other_evidence" + }, + "reason": { + "description": "The reason for filing the dispute. Its value will match the field containing the evidence.", + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_service_not_as_described_evidence" + } + }, + "required": [ + "reason" + ], + "title": "IssuingDisputeEvidence", + "type": "object", + "x-expandableFields": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "return_description": { + "description": "Description of the cardholder's attempt to return the product.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful", + null + ], + "type": [ + "string", + "null" + ] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "card_statement": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cash_receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "check_image": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancellation_policy_provided": { + "description": "Whether the cardholder was provided with a cancellation policy.", + "type": [ + "boolean", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful", + null + ], + "type": [ + "string", + "null" + ] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)", + "properties": { + "billing": { + "$ref": "#/components/schemas/issuing_cardholder_address" + }, + "company": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_company" + }, + { + "type": "null" + } + ], + "description": "Additional information about a `company` cardholder." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual" + }, + { + "type": "null" + } + ], + "description": "Additional information about an `individual` cardholder." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.cardholder" + ], + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "requirements": { + "$ref": "#/components/schemas/issuing_cardholder_requirements" + }, + "spending_controls": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_authorization_controls" + }, + { + "type": "null" + } + ], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details." + }, + "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`.", + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "created", + "id", + "livemode", + "metadata", + "name", + "object", + "requirements", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder" + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across this cardholder's cards.", + "items": { + "$ref": "#/components/schemas/issuing_cardholder_spending_limit" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`.", + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_cardholder_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_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", + "under_review", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "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.dob.day", + "individual.dob.month", + "individual.dob.year", + "individual.first_name", + "individual.last_name", + "individual.verification.document" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_card_issuing" + }, + { + "type": "null" + } + ], + "description": "Information related to the card_issuing program for this cardholder." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual_dob" + }, + { + "type": "null" + } + ], + "description": "The date of birth of this cardholder." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_verification" + }, + { + "type": "null" + } + ], + "description": "Government-issued ID document for this cardholder." + } + }, + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "dob", + "verification" + ] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_id_document" + }, + { + "type": "null" + } + ], + "description": "An identifying document, either a passport or local ID card." + } + }, + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "issuing_cardholder_individual_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_user_terms_acceptance" + }, + { + "type": "null" + } + ], + "description": "Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards)." + } + }, + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": [ + "user_terms_acceptance" + ] + }, + "issuing_cardholder_user_terms_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_company": { + "description": "", + "properties": { + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + } + }, + "required": [ + "tax_id_provided" + ], + "title": "IssuingCardholderCompany", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + } + }, + "required": [ + "address" + ], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) 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", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "cardholder": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.", + "type": "string" + }, + "cvc": { + "description": "The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "The expiration month of the card.", + "type": "integer" + }, + "exp_year": { + "description": "The expiration year of the card.", + "type": "integer" + }, + "financial_account": { + "description": "The financial account this card is attached to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the card number.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.card" + ], + "type": "string" + }, + "replaced_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The latest card that replaces this card, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_for": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The card this card replaces, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_reason": { + "description": "The reason why the previous card needed to be replaced.", + "enum": [ + "damaged", + "expired", + "lost", + "stolen", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping" + }, + { + "type": "null" + } + ], + "description": "Where and how the card will be shipped." + }, + "spending_controls": { + "$ref": "#/components/schemas/issuing_card_authorization_controls" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "The type of the card.", + "enum": [ + "physical", + "virtual" + ], + "type": "string" + }, + "wallets": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_wallets" + }, + { + "type": "null" + } + ], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay)." + } + }, + "required": [ + "brand", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "livemode", + "metadata", + "object", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card" + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/issuing_card_apple_pay" + }, + "google_pay": { + "$ref": "#/components/schemas/issuing_card_google_pay" + }, + "primary_account_identifier": { + "description": "Unique identifier for a card used with digital wallets", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "apple_pay", + "google_pay" + ], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": [ + "apple_pay", + "google_pay" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).", + "items": { + "$ref": "#/components/schemas/issuing_card_spending_limit" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`. Always the same as the currency of the card.", + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_card_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery company that shipped a card.", + "enum": [ + "dhl", + "fedex", + "royal_mail", + "usps", + null + ], + "type": [ + "string", + "null" + ] + }, + "customs": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping_customs" + }, + { + "type": "null" + } + ], + "description": "Additional information that may be required for clearing customs." + }, + "eta": { + "description": "A unix timestamp representing a best estimate of when the card will be delivered.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tracking_number": { + "description": "A tracking number for a card shipment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tracking_url": { + "description": "A link to the shipping carrier's site where you can view detailed information about a card shipment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Packaging options.", + "enum": [ + "bulk", + "individual" + ], + "type": "string" + } + }, + "required": [ + "address", + "name", + "service", + "type" + ], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": [ + "address", + "customs" + ] + }, + "issuing_card_shipping_customs": { + "description": "", + "properties": { + "eori_number": { + "description": "A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [] + }, + "issuing.authorization": { + "description": "When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).", + "properties": { + "amount": { + "description": "The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether the authorization has been approved.", + "type": "boolean" + }, + "authorization_method": { + "description": "How the card details were provided.", + "enum": [ + "chip", + "contactless", + "keyed_in", + "online", + "swipe" + ], + "type": "string" + }, + "balance_transactions": { + "description": "List of balance transactions associated with this authorization.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "card": { + "$ref": "#/components/schemas/issuing.card" + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this authorization belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "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).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was 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).", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_network_data" + }, + { + "type": "null" + } + ], + "description": "Details about the authorization, such as identifiers, set by the card network." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.authorization" + ], + "type": "string" + }, + "pending_request": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_pending_request" + }, + { + "type": "null" + } + ], + "description": "The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook." + }, + "request_history": { + "description": "History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.", + "items": { + "$ref": "#/components/schemas/issuing_authorization_request" + }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": [ + "closed", + "pending", + "reversed" + ], + "type": "string" + }, + "transactions": { + "description": "List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.", + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts)." + }, + "verification_data": { + "$ref": "#/components/schemas/issuing_authorization_verification_data" + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "approved", + "authorization_method", + "balance_transactions", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "request_history", + "status", + "transactions", + "verification_data" + ], + "title": "IssuingAuthorization", + "type": "object", + "x-expandableFields": [ + "amount_details", + "balance_transactions", + "card", + "cardholder", + "merchant_data", + "network_data", + "pending_request", + "request_history", + "transactions", + "treasury", + "verification_data" + ], + "x-resourceId": "issuing.authorization" + }, + "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" + }, + "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" + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "cvc_check", + "expiry_check" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "received_credits", + "received_debits" + ], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_request": { + "description": "", + "properties": { + "amount": { + "description": "The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether this request was approved.", + "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).", + "maxLength": 5000, + "type": "string" + }, + "merchant_amount": { + "description": "The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "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_inactive", + "cardholder_inactive", + "cardholder_verification_required", + "insufficient_funds", + "not_allowed", + "spending_controls", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason_message": { + "description": "If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "approved", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "reason" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "issuing_authorization_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_pending_request": { + "description": "", + "properties": { + "amount": { + "description": "The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "is_amount_controllable": { + "description": "If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The local currency the merchant is requesting to authorize.", + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "fee_refund": { + "description": "`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "fee_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "fee", + "id", + "object" + ], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "fee" + ], + "x-resourceId": "fee_refund" + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "amount": { + "description": "Amount earned, in %s.", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application_fee" + ], + "type": "string" + }, + "originating_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "refunded": { + "description": "Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the fee.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "charge", + "created", + "currency", + "id", + "livemode", + "object", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee" + }, + "application": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Application", + "type": "object", + "x-expandableFields": [] + }, + "dispute": { + "description": "A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you're given the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate. You can find more\ninformation about the dispute process in our [Disputes and\nFraud](/docs/disputes) documentation.\n\nRelated guide: [Disputes and Fraud](https://stripe.com/docs/disputes).", + "properties": { + "amount": { + "description": "Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/dispute_evidence" + }, + "evidence_details": { + "$ref": "#/components/schemas/dispute_evidence_details" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_charge_refundable": { + "description": "If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "dispute" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.", + "enum": [ + "charge_refunded", + "lost", + "needs_response", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string" + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent" + ], + "x-resourceId": "dispute" + }, + "dispute_evidence_details": { + "description": "", + "properties": { + "due_by": { + "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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": [ + "has_evidence", + "past_due", + "submission_count" + ], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": [] + }, + "dispute_evidence": { + "description": "", + "properties": { + "access_activity_log": { + "description": "Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "billing_address": { + "description": "The billing address provided by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cancellation_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cancellation_policy_disclosure": { + "description": "An explanation of how and when the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "cancellation_rebuttal": { + "description": "A justification for why the customer's subscription was not canceled.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "customer_communication": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_name": { + "description": "The name of the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_signature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_explanation": { + "description": "An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "duplicate_charge_id": { + "description": "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy_disclosure": { + "description": "Documentation demonstrating that the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "refund_refusal_explanation": { + "description": "A justification for why the customer is not entitled to a refund.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "service_date": { + "description": "The date on which the customer received or began receiving the purchased service, in a clear human-readable format.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "service_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_address": { + "description": "The address to which a physical product was shipped. You should try to include as complete address information as possible.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_tracking_number": { + "description": "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "uncategorized_file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + } + }, + "title": "DisputeEvidence", + "type": "object", + "x-expandableFields": [ + "cancellation_policy", + "customer_communication", + "customer_signature", + "duplicate_charge_documentation", + "receipt", + "refund_policy", + "service_documentation", + "shipping_documentation", + "uncategorized_file" + ] + }, + "connect_collection_transfer": { + "description": "", + "properties": { + "amount": { + "description": "Amount transferred, in %s.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "connect_collection_transfer" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "destination", + "id", + "livemode", + "object" + ], + "title": "ConnectCollectionTransfer", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "type" + ], + "title": "Fee", + "type": "object", + "x-expandableFields": [] + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "RadarRadarOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/payment_method_details_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/payment_method_details_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_details_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_details_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_details_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_details_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_details_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_details_grabpay" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_details_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_details_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_details_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_details_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_details_link" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_details_multibanco" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_details_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_details_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_details_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_details_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_details_promptpay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_details_sofort" + }, + "stripe_account": { + "$ref": "#/components/schemas/payment_method_details_stripe_account" + }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_details_us_bank_account" + }, + "wechat": { + "$ref": "#/components/schemas/payment_method_details_wechat" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_details_wechat_pay" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "multibanco", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "stripe_account", + "us_bank_account", + "wechat", + "wechat_pay" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_wechat": { + "description": "", + "properties": {}, + "title": "payment_method_details_wechat", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_stripe_account": { + "description": "", + "properties": {}, + "title": "payment_method_details_stripe_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `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", + "volkswagen_bank", + null + ], + "type": [ + "string", + "null" + ] + }, + "reference": { + "description": "Unique reference for this Przelewy24 payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_multibanco": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_link": { + "description": "", + "properties": {}, + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_konbini_store" + }, + { + "type": "null" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed." + } + }, + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": [ + "store" + ] + }, + "payment_method_details_konbini_store": { + "description": "", + "properties": { + "chain": { + "description": "The name of the convenience store chain where the payment was completed.", + "enum": [ + "familymart", + "lawson", + "ministop", + "seicomart", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "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, + "type": [ + "string", + "null" + ] + }, + "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`, `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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_interac_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "savings", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_giropay": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction id generated by FPX for every request from the merchant", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "bank" + ], + "title": "payment_method_details_fpx", + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_details_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "type": [ + "integer", + "null" + ] + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "incremental_authorization_supported": { + "description": "Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).", + "type": "boolean" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "overcapture_supported": { + "description": "Defines whether the authorized amount can be over-captured or not", + "type": "boolean" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year", + "incremental_authorization_supported", + "overcapture_supported" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_card_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "credit", + "prepaid", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_checks" + }, + { + "type": "null" + } + ], + "description": "Check results by Card networks on Card address and CVC at time of payment." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment or created by it.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this transaction used 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "installments", + "three_d_secure", + "wallet" + ] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_details_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_details_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "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_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_details": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": [ + "challenge", + "frictionless", + null + ], + "type": [ + "string", + "null" + ] + }, + "result": { + "description": "Indicates the outcome of 3D Secure authentication.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + null + ], + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": [ + "1.0.2", + "2.1.0", + "2.2.0", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for the payment." + } + }, + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_method_details_card_installments_plan": { + "description": "", + "properties": { + "count": { + "description": "For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.", + "type": [ + "integer", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`.", + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_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, + "type": [ + "string", + "null" + ] + }, + "transaction_id": { + "description": "Transaction ID of this particular Alipay transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_afterpay_clearpay": { + "description": "", + "properties": { + "reference": { + "description": "Order identifier shown to the merchant in Afterpay’s online portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "institution_number": { + "description": "Institution number of the bank account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_debit": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing transit number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_credit_transfer": { + "description": "", + "properties": { + "account_number": { + "description": "Account number to transfer funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing transit number for the bank account to transfer funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "swift_code": { + "description": "SWIFT code of the bank associated with the routing number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [] + }, + "charge_outcome": { + "description": "", + "properties": { + "network_status": { + "description": "Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as \"pending\" on a cardholder's statement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "reason": { + "description": "An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "risk_level": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.", + "maxLength": 5000, + "type": "string" + }, + "risk_score": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.", + "type": "integer" + }, + "rule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/rule" + } + ], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/rule" + } + ] + } + }, + "seller_message": { + "description": "A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": [ + "rule" + ] + }, + "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": [] + }, + "invoice": { + "description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).", + "properties": { + "account_country": { + "description": "The country of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_name": { + "description": "The public name of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "amount_due": { + "description": "Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "type": "integer" + }, + "amount_paid": { + "description": "The amount, in %s, that was paid.", + "type": "integer" + }, + "amount_remaining": { + "description": "The difference between amount_due and amount_paid, in %s.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.", + "type": [ + "integer", + "null" + ] + }, + "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.", + "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 will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "$ref": "#/components/schemas/automatic_tax" + }, + "billing_reason": { + "description": "Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming", + null + ], + "type": [ + "string", + "null" + ] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the latest charge generated for this invoice, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer who will be billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "customer_shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "customer_tax_ids": { + "description": "The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.", + "items": { + "$ref": "#/components/schemas/invoices_resource_invoice_tax_id" + }, + "type": [ + "array", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts." + }, + "discounts": { + "description": "The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "from_invoice": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_from_invoice" + }, + { + "type": "null" + } + ], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.", + "maxLength": 5000, + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_finalization_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized." + }, + "latest_revision": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the most recent non-draft revision of this invoice", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoice" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_settings": { + "$ref": "#/components/schemas/invoices_payment_settings" + }, + "period_end": { + "description": "End of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "Start of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "post_payment_credit_notes_amount": { + "description": "Total amount of all post-payment credit notes issued for this invoice.", + "type": "integer" + }, + "pre_payment_credit_notes_amount": { + "description": "Total amount of all pre-payment credit notes issued for this invoice.", + "type": "integer" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + }, + { + "type": "null" + } + ], + "description": "The quote this invoice was generated from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied on the invoice." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void", + null + ], + "type": [ + "string", + "null" + ] + }, + "status_transitions": { + "$ref": "#/components/schemas/invoices_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that this invoice was prepared for, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "type": "integer" + }, + "subtotal": { + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated", + "type": [ + "integer", + "null" + ] + }, + "tax": { + "description": "The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.", + "type": [ + "integer", + "null" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this invoice belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "threshold_reason": { + "$ref": "#/components/schemas/invoice_threshold_reason" + }, + "total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "total_discount_amounts": { + "description": "The aggregate amounts calculated per discount across all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": [ + "array", + "null" + ] + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.", + "type": [ + "integer", + "null" + ] + }, + "total_tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice." + }, + "webhooks_delivered_at": { + "description": "Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "amount_due", + "amount_paid", + "amount_remaining", + "amount_shipping", + "attempt_count", + "attempted", + "automatic_tax", + "collection_method", + "created", + "currency", + "default_tax_rates", + "lines", + "livemode", + "object", + "paid", + "paid_out_of_band", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "starting_balance", + "status_transitions", + "subtotal", + "total", + "total_tax_amounts" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "charge", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "from_invoice", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "payment_intent", + "payment_settings", + "quote", + "rendering_options", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_tax_amounts", + "transfer_data" + ], + "x-resourceId": "invoice" + }, + "invoice_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "InvoiceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "invoice_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate" + ], + "title": "InvoiceTaxAmount", + "type": "object", + "x-expandableFields": [ + "tax_rate" + ] + }, + "discounts_resource_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the discount.", + "type": "integer" + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + } + }, + "required": [ + "amount", + "discount" + ], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "coupon", + "deleted", + "id", + "object", + "start" + ], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "deleted_discount" + }, + "coupon": { + "description": "A coupon contains information about a percent-off or amount-off discount you\nmight want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),\n[checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": [ + "integer", + "null" + ] + }, + "applies_to": { + "$ref": "#/components/schemas/coupon_applies_to" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.", + "type": [ + "string", + "null" + ] + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/coupon_currency_option" + }, + "description": "Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.", + "type": [ + "integer", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "name": { + "description": "Name of the coupon displayed to customers on for instance invoices or receipts.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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 %s100 invoice %s50 instead.", + "type": [ + "number", + "null" + ] + }, + "redeem_by": { + "description": "Date after which the coupon can no longer be redeemed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "times_redeemed": { + "description": "Number of times this coupon has been applied to a customer.", + "type": "integer" + }, + "valid": { + "description": "Taking account of the above properties, whether this coupon can still be applied to a customer.", + "type": "boolean" + } + }, + "required": [ + "created", + "duration", + "id", + "livemode", + "object", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": [ + "applies_to", + "currency_options" + ], + "x-resourceId": "coupon" + }, + "coupon_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": [] + }, + "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": [] + }, + "invoice_threshold_reason": { + "description": "", + "properties": { + "amount_gte": { + "description": "The total invoice amount threshold boundary if it triggered the threshold invoice.", + "type": [ + "integer", + "null" + ] + }, + "item_reasons": { + "description": "Indicates which line items triggered a threshold invoice.", + "items": { + "$ref": "#/components/schemas/invoice_item_threshold_reason" + }, + "type": "array" + } + }, + "required": [ + "item_reasons" + ], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": [ + "item_reasons" + ] + }, + "invoice_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": [] + }, + "invoices_status_transitions": { + "description": "", + "properties": { + "finalized_at": { + "description": "The time that the invoice draft was finalized.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "marked_uncollectible_at": { + "description": "The time that the invoice was marked uncollectible.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "paid_at": { + "description": "The time that the invoice was paid.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "voided_at": { + "description": "The time that the invoice was voided.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoicesStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "invoices_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "InvoicesShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "shipping_rate": { + "description": "Shipping rates describe the price of shipping presented to your customers and can be\napplied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)\nand [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.", + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "delivery_estimate": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate" + }, + { + "type": "null" + } + ], + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions." + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fixed_amount": { + "$ref": "#/components/schemas/shipping_rate_fixed_amount" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "shipping_rate" + ], + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": [ + "delivery_estimate", + "fixed_amount", + "tax_code" + ], + "x-resourceId": "shipping_rate" + }, + "shipping_rate_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).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/shipping_rate_currency_option" + }, + "description": "Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "ShippingRateFixedAmount", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "shipping_rate_currency_option": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount", + "tax_behavior" + ], + "title": "ShippingRateCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite." + }, + "minimum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The lower bound of the estimated range. If empty, represents no lower bound." + } + }, + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": [ + "maximum", + "minimum" + ] + }, + "shipping_rate_delivery_estimate_bound": { + "description": "", + "properties": { + "unit": { + "description": "A unit of time.", + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "ShippingRateDeliveryEstimateBound", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_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, + "type": [ + "string", + "null" + ] + } + }, + "title": "InvoiceSettingRenderingOptions", + "type": "object", + "x-expandableFields": [] + }, + "quote": { + "description": "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule.", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.", + "type": [ + "integer", + "null" + ] + }, + "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 subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/quotes_resource_automatic_tax" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "computed": { + "$ref": "#/components/schemas/quotes_resource_computed" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_tax_rates": { + "description": "The tax rates applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "type": "array" + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discounts": { + "description": "The discounts applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "expires_at": { + "description": "The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "from_quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_from_quote" + }, + { + "type": "null" + } + ], + "description": "Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details." + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + }, + { + "type": "null" + } + ], + "description": "The invoice that was created from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ] + } + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_quote_setting" + }, + { + "type": "null" + } + ], + "description": "All invoices will be billed using the specified settings." + }, + "line_items": { + "description": "A list of items the customer is being quoted for.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "quote" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "status": { + "description": "The status of the quote.", + "enum": [ + "accepted", + "canceled", + "draft", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/quotes_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_data": { + "$ref": "#/components/schemas/quotes_resource_subscription_data_subscription_data" + }, + "subscription_schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this quote belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices." + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "automatic_tax", + "collection_method", + "computed", + "created", + "discounts", + "expires_at", + "id", + "livemode", + "metadata", + "object", + "status", + "status_transitions", + "subscription_data", + "total_details" + ], + "title": "Quote", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "computed", + "customer", + "default_tax_rates", + "discounts", + "from_quote", + "invoice", + "invoice_settings", + "line_items", + "on_behalf_of", + "status_transitions", + "subscription", + "subscription_data", + "subscription_schedule", + "test_clock", + "total_details", + "transfer_data" + ], + "x-resourceId": "quote" + }, + "quotes_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.", + "type": [ + "number", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "QuotesResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "quotes_resource_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": [ + "integer", + "null" + ] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "QuotesResourceTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "quotes_resource_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "QuotesResourceTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "quotes_resource_subscription_data_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "effective_date": { + "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "QuotesResourceSubscriptionDataSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_status_transitions": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the quote was accepted. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "canceled_at": { + "description": "The time that the quote was canceled. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "finalized_at": { + "description": "The time that the quote was finalized. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "QuotesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "item": { + "description": "A line item.", + "properties": { + "amount_discount": { + "description": "Total discount amount applied. If no discounts were applied, defaults to 0.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.", + "maxLength": 5000, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "item" + ], + "type": "string" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price used to generate the line item." + }, + "quantity": { + "description": "The quantity of products being purchased.", + "type": [ + "integer", + "null" + ] + }, + "taxes": { + "description": "The taxes applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_discount", + "amount_subtotal", + "amount_tax", + "amount_total", + "currency", + "description", + "id", + "object" + ], + "title": "LineItem", + "type": "object", + "x-expandableFields": [ + "discounts", + "price", + "taxes" + ], + "x-resourceId": "item" + }, + "invoice_setting_quote_setting": { + "description": "", + "properties": { + "days_until_due": { + "description": "Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoiceSettingQuoteSetting", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "quotes_resource_from_quote": { + "description": "", + "properties": { + "is_revision": { + "description": "Whether this quote is a revision of a different quote.", + "type": "boolean" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + } + }, + "required": [ + "is_revision", + "quote" + ], + "title": "QuotesResourceFromQuote", + "type": "object", + "x-expandableFields": [ + "quote" + ] + }, + "quotes_resource_computed": { + "description": "", + "properties": { + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_recurring" + }, + { + "type": "null" + } + ], + "description": "The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices." + }, + "upfront": { + "$ref": "#/components/schemas/quotes_resource_upfront" + } + }, + "required": [ + "upfront" + ], + "title": "QuotesResourceComputed", + "type": "object", + "x-expandableFields": [ + "recurring", + "upfront" + ] + }, + "quotes_resource_upfront": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "line_items": { + "description": "The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "total_details" + ], + "title": "QuotesResourceUpfront", + "type": "object", + "x-expandableFields": [ + "line_items", + "total_details" + ] + }, + "quotes_resource_recurring": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "interval", + "interval_count", + "total_details" + ], + "title": "QuotesResourceRecurring", + "type": "object", + "x-expandableFields": [ + "total_details" + ] + }, + "quotes_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculate taxes", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this quote.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "QuotesResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "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." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent." + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "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." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "invoice_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": [ + "balances", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer" + }, + "type": { + "description": "The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.", + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/invoice_installments_card" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "invoice_payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "invoice_payment_method_options_acss_debit_mandate_options": { + "description": "", + "properties": { + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "line_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount for this line item, excluding all tax and discounts.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": [ + "array", + "null" + ] + }, + "discountable": { + "description": "If true, discounts will apply to this line item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_item": { + "description": "The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "line_item" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price of the line item." + }, + "proration": { + "description": "Whether this is a proration.", + "type": "boolean" + }, + "proration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_proration_details" + }, + { + "type": "null" + } + ], + "description": "Additional details for proration line items" + }, + "quantity": { + "description": "The quantity of the subscription, if the line item is a subscription or a proration.", + "type": [ + "integer", + "null" + ] + }, + "subscription": { + "description": "The subscription that the invoice item pertains to, if any.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "subscription_item": { + "description": "The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.", + "enum": [ + "invoiceitem", + "subscription" + ], + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount for this line item, excluding all tax and discounts.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "currency", + "discountable", + "id", + "livemode", + "metadata", + "object", + "period", + "proration", + "type" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "period", + "price", + "proration_details", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "line_item" + }, + "invoices_line_items_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_credited_items" + }, + { + "type": "null" + } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies." + } + }, + "title": "InvoicesLineItemsProrationDetails", + "type": "object", + "x-expandableFields": [ + "credited_items" + ] + }, + "invoices_line_items_credited_items": { + "description": "", + "properties": { + "invoice": { + "description": "Invoice containing the credited invoice line items", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_items": { + "description": "Credited invoice line items", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "invoice", + "invoice_line_items" + ], + "title": "InvoicesLineItemsCreditedItems", + "type": "object", + "x-expandableFields": [] + }, + "invoice_line_item_period": { + "description": "", + "properties": { + "end": { + "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.", + "format": "unix-time", + "type": "integer" + }, + "start": { + "description": "The start of the period. This value is inclusive.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "InvoiceLineItemPeriod", + "type": "object", + "x-expandableFields": [] + }, + "invoices_from_invoice": { + "description": "", + "properties": { + "action": { + "description": "The relation between this invoice and the cloned invoice", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + } + }, + "required": [ + "action", + "invoice" + ], + "title": "InvoicesFromInvoice", + "type": "object", + "x-expandableFields": [ + "invoice" + ] + }, + "invoices_resource_invoice_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type" + ], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_custom_field": { + "description": "", + "properties": { + "name": { + "description": "The name of the custom field.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value of the custom field.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "InvoiceSettingCustomField", + "type": "object", + "x-expandableFields": [] + }, + "automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this invoice.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "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": [] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Billing address." + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "Billing phone number (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "billing_details", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_intent_card_processing" + }, + "type": { + "description": "Type of the payment method for which payment is in `processing` state, one of `card`.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentProcessing", + "type": "object", + "x-expandableFields": [ + "card" + ] + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/components/schemas/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": [ + "customer_notification" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "completes_at": { + "description": "If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "affirm": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_affirm" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alipay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_alipay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bacs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bancontact" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "boleto": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_boleto" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_card" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_customer_balance" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "eps": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "fpx": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_fpx" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "giropay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_giropay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_grabpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "ideal": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_ideal" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_interac_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "klarna": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_klarna" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_konbini" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_oxxo" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "p24": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_p24" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paynow": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_paynow" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pix": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_pix" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_promptpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sofort": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_sofort" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_wechat_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ] + }, + "payment_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual", + "manual_preferred" + ], + "type": "string" + }, + "installments": { + "$ref": "#/components/schemas/payment_flows_installment_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "payment_flows_installment_options": { + "description": "", + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsInstallmentOptions", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_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, + "type": [ + "string", + "null" + ] + }, + "client": { + "description": "The client type that the end customer will pay from", + "enum": [ + "android", + "ios", + "web", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_promptpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire.", + "type": [ + "integer", + "null" + ] + }, + "expires_at": { + "description": "The timestamp at which the Pix expires.", + "type": [ + "integer", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_pix", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_p24": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_oxxo": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_link": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_konbini": { + "description": "", + "properties": { + "confirmation_number": { + "description": "An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "product_description": { + "description": "A product descriptor of up to 22 characters, which will appear to customers at the convenience store.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_konbini", + "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, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_options_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_ideal": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_grabpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_giropay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_fpx": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_fpx", + "type": "object", + "x-expandableFields": [] + }, + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "payment_method_options_customer_balance_eu_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)", + "type": [ + "boolean", + "null" + ] + }, + "request_incremental_authorization_support": { + "description": "Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments", + "mandate_options" + ] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "integer", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + "type": [ + "array", + "null" + ] + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for this PaymentIntent." + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": [ + "available_plans", + "plan" + ] + }, + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_blik": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bacs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alipay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_alipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_afterpay_clearpay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "reference": { + "description": "Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about\nthe payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_affirm": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_boleto" + }, + "card_await_notification": { + "$ref": "#/components/schemas/payment_intent_next_action_card_await_notification" + }, + "display_bank_transfer_instructions": { + "$ref": "#/components/schemas/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini" + }, + "oxxo_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_pix_display_qr_code" + }, + "promptpay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextAction", + "type": "object", + "x-expandableFields": [ + "alipay_handle_redirect", + "boleto_display_details", + "card_await_notification", + "display_bank_transfer_instructions", + "konbini_display_details", + "oxxo_display_details", + "paynow_display_qr_code", + "pix_display_qr_code", + "promptpay_display_qr_code", + "redirect_to_url", + "verify_with_microdeposits", + "wechat_pay_display_qr_code", + "wechat_pay_redirect_to_android_app", + "wechat_pay_redirect_to_ios_app" + ] + }, + "payment_intent_next_action_wechat_pay_redirect_to_ios_app": { + "description": "", + "properties": { + "native_url": { + "description": "An universal link that redirect to WeChat Pay app", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "native_url" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToIOSApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_android_app": { + "description": "", + "properties": { + "app_id": { + "description": "app_id is the APP ID registered on WeChat open platform", + "maxLength": 5000, + "type": "string" + }, + "nonce_str": { + "description": "nonce_str is a random string", + "maxLength": 5000, + "type": "string" + }, + "package": { + "description": "package is static value", + "maxLength": 5000, + "type": "string" + }, + "partner_id": { + "description": "an unique merchant ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "prepay_id": { + "description": "an unique trading ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "sign": { + "description": "A signature", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "Specifies the current time in epoch format", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToAndroidApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The data being used to generate QR code", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_data_url": { + "description": "The base64 image data for a pre-generated QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionWechatPayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_promptpay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The PNG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The SVG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPromptpayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_pix_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "expires_at": { + "description": "The date (unix timestamp) when the PIX expires.", + "type": "integer" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted pix instructions page, which allows customers to view the pix QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render png QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render svg QR code", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentIntentNextActionPixDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_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, + "type": [ + "string", + "null" + ] + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_oxxo_details": { + "description": "", + "properties": { + "expires_after": { + "description": "The timestamp after which the OXXO voucher expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "hosted_voucher_url": { + "description": "The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "OXXO reference number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp at which the pending Konbini payment expires.", + "format": "unix-time", + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "stores": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_stores" + } + }, + "required": [ + "expires_at", + "stores" + ], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": [ + "stores" + ] + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_familymart" + }, + { + "type": "null" + } + ], + "description": "FamilyMart instruction details." + }, + "lawson": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_lawson" + }, + { + "type": "null" + } + ], + "description": "Lawson instruction details." + }, + "ministop": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_ministop" + }, + { + "type": "null" + } + ], + "description": "Ministop instruction details." + }, + "seicomart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_seicomart" + }, + { + "type": "null" + } + ], + "description": "Seicomart instruction details." + } + }, + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": [ + "familymart", + "lawson", + "ministop", + "seicomart" + ] + }, + "payment_intent_next_action_konbini_seicomart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_seicomart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_ministop": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_ministop", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_lawson": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_lawson", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_familymart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_familymart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_bank_transfer_instructions": { + "description": "", + "properties": { + "amount_remaining": { + "description": "The remaining amount that needs to be transferred to complete the payment.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": [ + "string", + "null" + ] + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund the customer balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "hosted_instructions_url": { + "description": "A link to a hosted page that guides your customer through completing the transfer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of bank transfer", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": [ + "financial_addresses" + ] + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "iban": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_iban_record" + }, + "sort_code": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_sort_code_record" + }, + "spei": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_spei_record" + }, + "supported_networks": { + "description": "The payment networks supported by this FinancialAddress", + "items": { + "enum": [ + "bacs", + "fps", + "sepa", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": [ + "iban", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "zengin": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_zengin_record" + } + }, + "required": [ + "type" + ], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": [ + "iban", + "sort_code", + "spei", + "zengin" + ] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "The bank account type. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_code": { + "description": "The bank code of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "The bank name of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "The branch code of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_name": { + "description": "The branch name of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "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": [ + "bank_code", + "bank_name", + "clabe" + ], + "title": "FundingInstructionsBankTransferSpeiRecord", + "type": "object", + "x-expandableFields": [] + }, + "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_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" + }, + "sort_code": { + "description": "The six-digit sort code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number", + "sort_code" + ], + "title": "FundingInstructionsBankTransferSortCodeRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_iban_record": { + "description": "Iban Records contain E.U. bank account details per the SEPA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "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_name", + "bic", + "country", + "iban" + ], + "title": "FundingInstructionsBankTransferIbanRecord", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_card_await_notification": { + "description": "", + "properties": { + "charge_attempt_at": { + "description": "The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_boleto": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp after which the boleto expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "hosted_voucher_url": { + "description": "The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "The boleto number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "pdf": { + "description": "The URL to the downloadable boleto voucher PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "native_url": { + "description": "The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_payment_intent": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculates compatible payment methods", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsAutomaticPaymentMethodsPaymentIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "tip": { + "$ref": "#/components/schemas/payment_flows_amount_details_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": [ + "tip" + ] + }, + "payment_flows_amount_details_resource_tip": { + "description": "", + "properties": { + "amount": { + "description": "Portion of the amount that corresponds to a tip.", + "type": "integer" + } + }, + "title": "PaymentFlowsAmountDetailsResourceTip", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" + }, + "ideal": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_klarna" + }, + "link": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" + }, + "type": { + "description": "The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "SetupAttemptPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "ideal", + "klarna", + "link", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "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, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "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_link": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_link", + "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_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + } + }, + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "generated_card" + ] + }, + "setup_attempt_payment_method_details_card": { + "description": "", + "properties": { + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this authorization used 3D Secure authentication." + } + }, + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "three_d_secure" + ] + }, + "setup_attempt_payment_method_details_boleto": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_blik", + "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, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "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_au_becs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_acss_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_promptpay": { + "description": "", + "properties": {}, + "title": "payment_method_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pix": { + "description": "", + "properties": {}, + "title": "payment_method_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paynow": { + "description": "", + "properties": {}, + "title": "payment_method_paynow", + "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", + "volkswagen_bank", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_oxxo": { + "description": "", + "properties": {}, + "title": "payment_method_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_konbini": { + "description": "", + "properties": {}, + "title": "payment_method_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" + }, + { + "type": "null" + } + ], + "description": "The customer's date of birth, if provided." + } + }, + "title": "payment_method_klarna", + "type": "object", + "x-expandableFields": [ + "dob" + ] + }, + "payment_flows_private_payment_methods_klarna_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank, if the bank was provided.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_grabpay": { + "description": "", + "properties": {}, + "title": "payment_method_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_giropay": { + "description": "", + "properties": {}, + "title": "payment_method_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + } + }, + "required": [ + "bank" + ], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_present": { + "description": "", + "properties": {}, + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_checks" + }, + { + "type": "null" + } + ], + "description": "Checks on Card address and CVC if provided." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_generated_card" + }, + { + "type": "null" + } + ], + "description": "Details of the original PaymentMethod that created this object." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about card networks that can be used to process the payment." + }, + "three_d_secure_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_usage" + }, + { + "type": "null" + } + ], + "description": "Contains details on how this Card may be used for 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "last4" + ], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_google_pay", + "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_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_usage": { + "description": "", + "properties": { + "supported": { + "description": "Whether 3D Secure is supported on this card.", + "type": "boolean" + } + }, + "required": [ + "supported" + ], + "title": "three_d_secure_usage", + "type": "object", + "x-expandableFields": [] + }, + "networks": { + "description": "", + "properties": { + "available": { + "description": "All available networks for the card.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "The preferred network for the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "available" + ], + "title": "networks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_generated_card": { + "description": "", + "properties": { + "charge": { + "description": "The charge that created this object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/card_generated_from_payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Transaction-specific details of the payment method used in the payment." + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": [ + "payment_method_details", + "setup_attempt" + ] + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "type": { + "description": "The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "card_generated_from_payment_method_details", + "type": "object", + "x-expandableFields": [ + "card_present" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "Uniquely identifies the customer tax id (CNPJ or CPF)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_blik": { + "description": "", + "properties": {}, + "title": "payment_method_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_bacs_debit", + "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, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_alipay": { + "description": "", + "properties": {}, + "title": "PaymentFlowsPrivatePaymentMethodsAlipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_afterpay_clearpay": { + "description": "", + "properties": {}, + "title": "payment_method_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "institution_number": { + "description": "Institution number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "deleted_coupon": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "coupon" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCoupon", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_coupon" + }, + "subscription_billing_thresholds": { + "description": "", + "properties": { + "amount_gte": { + "description": "Monetary threshold that triggers the subscription to create an invoice", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "schedules_phase_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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": { + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "The quantity of the invoice item.", + "type": [ + "integer", + "null" + ] + }, + "tax_rates": { + "description": "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": [ + "price", + "tax_rates" + ] + }, + "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 subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule's default invoice settings." + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + } + }, + "required": [ + "billing_cycle_anchor" + ], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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": [] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "expires_at": { + "description": "The point after which the changes reflected by this update will be discarded and no longer applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription_items": { + "description": "List of subscription items, each with an attached plan, that will be set if the update is applied.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "expires_at" + ], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": [ + "subscription_items" + ] + }, + "subscription_item": { + "description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_item" + ], + "type": "string" + }, + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "description": "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "subscription": { + "description": "The `subscription` this `subscription_item` belongs to.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "created", + "id", + "metadata", + "object", + "price", + "subscription" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ], + "x-resourceId": "subscription_item" + }, + "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": [] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to invoices created by the subscription." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + }, + "save_default_payment_method": { + "description": "Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.", + "enum": [ + "off", + "on_subscription", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription." + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription." + } + }, + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_mandate_options_card" + }, + "network": { + "description": "Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": [ + "integer", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_pause_collection": { + "description": "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.", + "properties": { + "behavior": { + "description": "The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.", + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "behavior" + ], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [] + }, + "subscription_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this subscription.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Default options for invoice PDF rendering for this customer." + } + }, + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": [ + "custom_fields", + "default_payment_method", + "rendering_options" + ] + }, + "cash_balance": { + "description": "A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": [ + "object", + "null" + ] + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "cash_balance" + ], + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/customer_balance_customer_balance_settings" + } + }, + "required": [ + "customer", + "livemode", + "object", + "settings" + ], + "title": "cash_balance", + "type": "object", + "x-expandableFields": [ + "settings" + ], + "x-resourceId": "cash_balance" + }, + "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": [] + }, + "payment_pages_checkout_session_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionTaxIDCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The shipping rate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentPagesCheckoutSessionShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_pages_checkout_session_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after discounts and taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this order.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "PaymentPagesCheckoutSessionShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "payment_pages_checkout_session_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentPagesCheckoutSessionShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether phone number collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionPhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "checkout_session_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" + }, + "affirm": { + "$ref": "#/components/schemas/checkout_affirm_payment_method_options" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/checkout_afterpay_clearpay_payment_method_options" + }, + "alipay": { + "$ref": "#/components/schemas/checkout_alipay_payment_method_options" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/checkout_au_becs_debit_payment_method_options" + }, + "bacs_debit": { + "$ref": "#/components/schemas/checkout_bacs_debit_payment_method_options" + }, + "bancontact": { + "$ref": "#/components/schemas/checkout_bancontact_payment_method_options" + }, + "boleto": { + "$ref": "#/components/schemas/checkout_boleto_payment_method_options" + }, + "card": { + "$ref": "#/components/schemas/checkout_card_payment_method_options" + }, + "customer_balance": { + "$ref": "#/components/schemas/checkout_customer_balance_payment_method_options" + }, + "eps": { + "$ref": "#/components/schemas/checkout_eps_payment_method_options" + }, + "fpx": { + "$ref": "#/components/schemas/checkout_fpx_payment_method_options" + }, + "giropay": { + "$ref": "#/components/schemas/checkout_giropay_payment_method_options" + }, + "grabpay": { + "$ref": "#/components/schemas/checkout_grab_pay_payment_method_options" + }, + "ideal": { + "$ref": "#/components/schemas/checkout_ideal_payment_method_options" + }, + "klarna": { + "$ref": "#/components/schemas/checkout_klarna_payment_method_options" + }, + "konbini": { + "$ref": "#/components/schemas/checkout_konbini_payment_method_options" + }, + "oxxo": { + "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" + }, + "p24": { + "$ref": "#/components/schemas/checkout_p24_payment_method_options" + }, + "paynow": { + "$ref": "#/components/schemas/checkout_paynow_payment_method_options" + }, + "pix": { + "$ref": "#/components/schemas/checkout_pix_payment_method_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/checkout_sepa_debit_payment_method_options" + }, + "sofort": { + "$ref": "#/components/schemas/checkout_sofort_payment_method_options" + }, + "us_bank_account": { + "$ref": "#/components/schemas/checkout_us_bank_account_payment_method_options" + } + }, + "title": "CheckoutSessionPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "checkout_us_bank_account_payment_method_options": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutUsBankAccountPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "checkout_sofort_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutSofortPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_sepa_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutSepaDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_pix_payment_method_options": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds after which Pix payment will expire.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "CheckoutPixPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paynow_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutPaynowPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_p24_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutP24PaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_oxxo_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutOxxoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_konbini_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.", + "type": [ + "integer", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutKonbiniPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_klarna_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutKlarnaPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_ideal_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutIdealPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_grab_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGrabPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_giropay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGiropayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_fpx_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutFpxPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_eps_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutEpsPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_customer_balance_payment_method_options": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/checkout_customer_balance_bank_transfer_payment_method_options" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutCustomerBalancePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "checkout_customer_balance_bank_transfer_payment_method_options": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutCustomerBalanceBankTransferPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "checkout_card_payment_method_options": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/checkout_card_installments_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "checkout_card_installments_options": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates if installments are enabled", + "type": "boolean" + } + }, + "title": "CheckoutCardInstallmentsOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_boleto_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutBoletoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bancontact_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutBancontactPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bacs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutBacsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_au_becs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAuBecsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_alipay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAlipayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_afterpay_clearpay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAfterpayClearpayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_affirm_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAffirmPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_acss_debit_payment_method_options": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account. Returned when the Session is in `setup` mode.", + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/checkout_acss_debit_mandate_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutAcssDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "checkout_acss_debit_mandate_options": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "CheckoutAcssDebitMandateOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_link": { + "description": "A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.\n\nWhen a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)", + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "$ref": "#/components/schemas/payment_links_resource_after_completion" + }, + "allow_promotion_codes": { + "description": "Whether user redeemable promotion codes are enabled.", + "type": "boolean" + }, + "application_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.", + "type": [ + "integer", + "null" + ] + }, + "application_fee_percent": { + "description": "This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_links_resource_automatic_tax" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration to gather active consent from customers." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_links_resource_custom_text" + }, + "customer_creation": { + "description": "Configuration for Customer creation during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Configuration for creating invoice for payment mode payment links." + }, + "line_items": { + "description": "The line items representing what is being sold.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_link" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_intent_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_payment_intent_data" + }, + { + "type": "null" + } + ], + "description": "Indicates the parameters to be passed to PaymentIntent creation during checkout." + }, + "payment_method_collection": { + "description": "Configuration for collecting a payment method during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "Configuration for collecting the customer's shipping address." + }, + "shipping_options": { + "description": "The shipping rate options applied to the session.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_shipping_option" + }, + "type": "array" + }, + "submit_type": { + "description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_subscription_data" + }, + { + "type": "null" + } + ], + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`." + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_links_resource_tax_id_collection" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to." + }, + "url": { + "description": "The public URL that can be shared with customers.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "active", + "after_completion", + "allow_promotion_codes", + "automatic_tax", + "billing_address_collection", + "currency", + "custom_fields", + "custom_text", + "customer_creation", + "id", + "livemode", + "metadata", + "object", + "payment_method_collection", + "phone_number_collection", + "shipping_options", + "submit_type", + "tax_id_collection", + "url" + ], + "title": "PaymentLink", + "type": "object", + "x-expandableFields": [ + "after_completion", + "automatic_tax", + "consent_collection", + "custom_fields", + "custom_text", + "invoice_creation", + "line_items", + "on_behalf_of", + "payment_intent_data", + "phone_number_collection", + "shipping_address_collection", + "shipping_options", + "subscription_data", + "tax_id_collection", + "transfer_data" + ], + "x-resourceId": "payment_link" + }, + "payment_links_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The connected account receiving the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "PaymentLinksResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "payment_links_resource_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceTaxIdCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentLinksResourceSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the Shipping Rate to use for this shipping option.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentLinksResourceShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_links_resource_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentLinksResourceShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a phone number will be collected during checkout.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourcePhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_payment_intent_data": { + "description": "", + "properties": { + "capture_method": { + "description": "Indicates when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with the payment method collected during checkout.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourcePaymentIntentData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Enable creating an invoice on successful payment.", + "type": "boolean" + }, + "invoice_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_settings" + }, + { + "type": "null" + } + ], + "description": "Configuration for the invoice. Default invoice values will be used if unspecified." + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_links_resource_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "custom_fields": { + "description": "A list of up to 4 custom fields to be displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentLinksResourceInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_links_resource_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentLinksResourceCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_links_resource_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentLinksResourceCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_label" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentLinksResourceCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label" + ] + }, + "payment_links_resource_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown_option" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "PaymentLinksResourceCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_links_resource_custom_fields_dropdown_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentLinksResourceCustomFieldsDropdownOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications.", + "enum": [ + "auto", + "none", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.", + "enum": [ + "none", + "required", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourceConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, tax will be calculated automatically using the customer's location.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" + }, + "redirect": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" + }, + "type": { + "description": "The specified behavior after the purchase is complete.", + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceAfterCompletion", + "type": "object", + "x-expandableFields": [ + "hosted_confirmation", + "redirect" + ] + }, + "payment_links_resource_completion_behavior_redirect": { + "description": "", + "properties": { + "url": { + "description": "The URL the customer will be redirected to after the purchase is complete.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "PaymentLinksResourceCompletionBehaviorRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_confirmation_page": { + "description": "", + "properties": { + "custom_message": { + "description": "The custom message that is displayed to the customer after the purchase is complete.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourceCompletionBehaviorConfirmationPage", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether invoice creation is enabled for the Checkout Session.", + "type": "boolean" + }, + "invoice_data": { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_settings" + } + }, + "required": [ + "enabled", + "invoice_data" + ], + "title": "PaymentPagesCheckoutSessionInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_pages_checkout_session_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentPagesCheckoutSessionInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_pages_checkout_session_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022." + }, + "email": { + "description": "The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "The customer's phone number after a completed Checkout Session.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_exempt": { + "description": "The customer’s tax exempt status after a completed Checkout Session.", + "enum": [ + "exempt", + "none", + "reverse", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_ids": { + "description": "The customer’s tax IDs after a completed Checkout Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomerDetails", + "type": "object", + "x-expandableFields": [ + "address", + "tax_ids" + ] + }, + "payment_pages_checkout_session_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionTaxID", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentPagesCheckoutSessionCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_pages_checkout_session_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentPagesCheckoutSessionCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_label" + }, + "numeric": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=numeric` fields." + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=text` fields." + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label", + "numeric", + "text" + ] + }, + "payment_pages_checkout_session_custom_fields_text": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_numeric": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer, containing only digits.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_option" + }, + "type": "array" + }, + "value": { + "description": "The option selected by the customer. This will be the `value` for the option.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "options" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_pages_checkout_session_custom_fields_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants.", + "enum": [ + "auto", + "none", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If set to `required`, it requires customers to accept the terms of service before being able to pay.", + "enum": [ + "none", + "required", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent": { + "description": "", + "properties": { + "promotions": { + "description": "If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.", + "enum": [ + "opt_in", + "opt_out", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.", + "enum": [ + "accepted", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "PaymentPagesCheckoutSessionConsent", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether automatic tax is enabled for the session", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this session.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_after_expiration": { + "description": "", + "properties": { + "recovery": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" + }, + { + "type": "null" + } + ], + "description": "When set, configuration used to recover the Checkout Session on expiry." + } + }, + "title": "PaymentPagesCheckoutSessionAfterExpiration", + "type": "object", + "x-expandableFields": [ + "recovery" + ] + }, + "payment_pages_checkout_session_after_expiration_recovery": { + "description": "", + "properties": { + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`", + "type": "boolean" + }, + "enabled": { + "description": "If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.", + "type": "boolean" + }, + "expires_at": { + "description": "The timestamp at which the recovery URL will expire.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "url": { + "description": "URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "allow_promotion_codes", + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAfterExpirationRecovery", + "type": "object", + "x-expandableFields": [] + } + } + } + } + ], + "components": { + "schemas": { + "payment_pages_checkout_session_after_expiration_recovery": { + "description": "", + "properties": { + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`", + "type": "boolean" + }, + "enabled": { + "description": "If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.", + "type": "boolean" + }, + "expires_at": { + "description": "The timestamp at which the recovery URL will expire.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "url": { + "description": "URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "allow_promotion_codes", + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAfterExpirationRecovery", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_text": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_numeric": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer, containing only digits.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_option" + }, + "type": "array" + }, + "value": { + "description": "The option selected by the customer. This will be the `value` for the option.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "options" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_pages_checkout_session_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentPagesCheckoutSessionCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionTaxID", + "type": "object", + "x-expandableFields": [] + }, + "address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + "null" + ] + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "Address", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_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, + "type": [ + "string", + "null" + ] + } + }, + "title": "InvoiceSettingRenderingOptions", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_custom_field": { + "description": "", + "properties": { + "name": { + "description": "The name of the custom field.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value of the custom field.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "InvoiceSettingCustomField", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.\n\nRelated guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_id" + ], + "type": "string" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "Value of the tax ID.", + "maxLength": 5000, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_id_verification" + }, + { + "type": "null" + } + ], + "description": "Tax ID verification information." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "type", + "value" + ], + "title": "tax_id", + "type": "object", + "x-expandableFields": [ + "customer", + "verification" + ], + "x-resourceId": "tax_id" + }, + "tax_id_verification": { + "description": "", + "properties": { + "status": { + "description": "Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.", + "enum": [ + "pending", + "unavailable", + "unverified", + "verified" + ], + "type": "string" + }, + "verified_address": { + "description": "Verified address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_name": { + "description": "Verified name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "status" + ], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [] + }, + "customer": { + "description": "This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.\n\nRelated guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "type": "integer" + }, + "cash_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/cash_balance" + }, + { + "type": "null" + } + ], + "description": "The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source \"cash_balance\". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the customer.\n\nIf you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "delinquent": { + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.\n\nIf an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.", + "type": [ + "boolean", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount active on the customer, if there is one." + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_credit_balance": { + "additionalProperties": { + "type": "integer" + }, + "description": "The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.", + "type": "object" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_customer_setting" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "next_invoice_sequence": { + "description": "The suffix of the customer's next invoice number, e.g., 0001.", + "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, + "type": [ + "string", + "null" + ] + }, + "preferred_locales": { + "description": "The customer's preferred locales (languages), ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer." + }, + "sources": { + "description": "The customer's payment sources, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "tax": { + "$ref": "#/components/schemas/customer_tax" + }, + "tax_exempt": { + "description": "Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **\"Reverse charge\"**.", + "enum": [ + "exempt", + "none", + "reverse", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this customer belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "id", + "livemode", + "object" + ], + "title": "Customer", + "type": "object", + "x-expandableFields": [ + "address", + "cash_balance", + "default_source", + "discount", + "invoice_settings", + "shipping", + "sources", + "subscriptions", + "tax", + "tax_ids", + "test_clock" + ], + "x-resourceId": "customer" + }, + "test_helpers.test_clock": { + "description": "A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,\nyou can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deletes_after": { + "description": "Time at which this clock is scheduled to auto delete.", + "format": "unix-time", + "type": "integer" + }, + "frozen_time": { + "description": "Time at which all objects belonging to this clock are frozen.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "The custom name supplied at creation.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "object", + "status" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "test_helpers.test_clock" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer_tax_location" + }, + { + "type": "null" + } + ], + "description": "The customer's location as identified by Stripe Tax." + } + }, + "required": [ + "automatic_tax" + ], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": [ + "location" + ] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The customer's country as identified by Stripe Tax.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "The data source used to infer the customer's location.", + "enum": [ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination" + ], + "type": "string" + }, + "state": { + "description": "The customer's state, county, province, or region as identified by Stripe Tax.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "country", + "source" + ], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [] + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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", + "type": "integer" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "cancel_at": { + "description": "A date in the future at which the subscription will automatically get canceled", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancel_at_period_end": { + "description": "If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current 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", + "type": [ + "integer", + "null" + ] + }, + "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).", + "type": "string" + }, + "current_period_end": { + "description": "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "Start of the current period that the subscription has been invoiced for.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.", + "type": [ + "integer", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "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.", + "maxLength": 500, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis." + }, + "ended_at": { + "description": "If the subscription has ended, the date the subscription ended.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of subscription items, each with an attached price.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "latest_invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The most recent invoice this subscription has generated.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "next_pending_invoice_item_invoice": { + "description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "pause_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pause_collection" + }, + { + "type": "null" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_settings" + }, + { + "type": "null" + } + ], + "description": "Payment settings passed on to invoices created by the subscription." + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" + }, + { + "type": "null" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "pending_setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + }, + { + "type": "null" + } + ], + "description": "You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "pending_update": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pending_update" + }, + { + "type": "null" + } + ], + "description": "If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid." + }, + "schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The schedule attached to the subscription", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "start_date": { + "description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, 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\nIf subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.", + "enum": [ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "If the subscription has a trial, the end of that trial.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings" + }, + { + "type": "null" + } + ], + "description": "Settings related to subscription trials." + }, + "trial_start": { + "description": "If the subscription has a trial, the beginning of that trial.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "automatic_tax", + "billing_cycle_anchor", + "cancel_at_period_end", + "collection_method", + "created", + "currency", + "current_period_end", + "current_period_start", + "customer", + "id", + "items", + "livemode", + "metadata", + "object", + "start_date", + "status" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_thresholds", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription" + }, + "subscriptions_trials_resource_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { + "$ref": "#/components/schemas/subscriptions_trials_resource_end_behavior" + } + }, + "required": [ + "end_behavior" + ], + "title": "SubscriptionsTrialsResourceTrialSettings", + "type": "object", + "x-expandableFields": [ + "end_behavior" + ] + }, + "subscriptions_trials_resource_end_behavior": { + "description": "Defines how a subscription behaves when a free trial ends.", + "properties": { + "missing_payment_method": { + "description": "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.", + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "SubscriptionsTrialsResourceEndBehavior", + "type": "object", + "x-expandableFields": [] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": [ + "number", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "account": { + "description": "This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that\naccount has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)\nfor a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**\nbelow. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_business_profile" + }, + { + "type": "null" + } + ], + "description": "Business information about the account." + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "capabilities": { + "$ref": "#/components/schemas/account_capabilities" + }, + "charges_enabled": { + "description": "Whether the account can create live charges.", + "type": "boolean" + }, + "company": { + "$ref": "#/components/schemas/legal_entity_company" + }, + "controller": { + "$ref": "#/components/schemas/account_unification_account_controller" + }, + "country": { + "description": "The account's country.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the account was connected. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_currency": { + "description": "Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).", + "maxLength": 5000, + "type": "string" + }, + "details_submitted": { + "description": "Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.", + "type": "boolean" + }, + "email": { + "description": "An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "external_accounts": { + "description": "External accounts (bank accounts and debit cards) currently attached to this account", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "future_requirements": { + "$ref": "#/components/schemas/account_future_requirements" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "$ref": "#/components/schemas/person" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account" + ], + "type": "string" + }, + "payouts_enabled": { + "description": "Whether Stripe can send payouts to this account.", + "type": "boolean" + }, + "requirements": { + "$ref": "#/components/schemas/account_requirements" + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_settings" + }, + { + "type": "null" + } + ], + "description": "Options for customizing how the account functions within Stripe." + }, + "tos_acceptance": { + "$ref": "#/components/schemas/account_tos_acceptance" + }, + "type": { + "description": "The Stripe account type. Can be `standard`, `express`, or `custom`.", + "enum": [ + "custom", + "express", + "standard" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Account", + "type": "object", + "x-expandableFields": [ + "business_profile", + "capabilities", + "company", + "controller", + "external_accounts", + "future_requirements", + "individual", + "requirements", + "settings", + "tos_acceptance" + ], + "x-resourceId": "account" + }, + "account_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted their service agreement", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted their service agreement", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { + "$ref": "#/components/schemas/account_bacs_debit_payments_settings" + }, + "branding": { + "$ref": "#/components/schemas/account_branding_settings" + }, + "card_issuing": { + "$ref": "#/components/schemas/account_card_issuing_settings" + }, + "card_payments": { + "$ref": "#/components/schemas/account_card_payments_settings" + }, + "dashboard": { + "$ref": "#/components/schemas/account_dashboard_settings" + }, + "payments": { + "$ref": "#/components/schemas/account_payments_settings" + }, + "payouts": { + "$ref": "#/components/schemas/account_payout_settings" + }, + "sepa_debit_payments": { + "$ref": "#/components/schemas/account_sepa_debit_payments_settings" + }, + "treasury": { + "$ref": "#/components/schemas/account_treasury_settings" + } + }, + "required": [ + "branding", + "card_payments", + "dashboard", + "payments" + ], + "title": "AccountSettings", + "type": "object", + "x-expandableFields": [ + "bacs_debit_payments", + "branding", + "card_issuing", + "card_payments", + "dashboard", + "payments", + "payouts", + "sepa_debit_payments", + "treasury" + ] + }, + "account_treasury_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/account_terms_of_service" + } + }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_sepa_debit_payments_settings": { + "description": "", + "properties": { + "creditor_id": { + "description": "SEPA creditor identifier that identifies the company making the payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountSepaDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_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 our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.", + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/transfer_schedule" + }, + "statement_descriptor": { + "description": "The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "debit_negative_balances", + "schedule" + ], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": [ + "schedule" + ] + }, + "transfer_schedule": { + "description": "", + "properties": { + "delay_days": { + "description": "The number of days charges for the account will be held before being paid out.", + "type": "integer" + }, + "interval": { + "description": "How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.", + "maxLength": 5000, + "type": "string" + }, + "monthly_anchor": { + "description": "The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.", + "type": "integer" + }, + "weekly_anchor": { + "description": "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "delay_days", + "interval" + ], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_kana": { + "description": "The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { + "$ref": "#/components/schemas/account_decline_charge_on" + }, + "statement_descriptor_prefix": { + "description": "The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": [ + "decline_on" + ] + }, + "account_decline_charge_on": { + "description": "", + "properties": { + "avs_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.", + "type": "boolean" + }, + "cvc_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.", + "type": "boolean" + } + }, + "required": [ + "avs_failure", + "cvc_failure" + ], + "title": "AccountDeclineChargeOn", + "type": "object", + "x-expandableFields": [] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/card_issuing_account_terms_of_service" + } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "card_issuing_account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "primary_color": { + "description": "A CSS hex color value representing the primary branding color for this account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "secondary_color": { + "description": "A CSS hex color value representing the secondary branding color for this account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": [ + "icon", + "logo" + ] + }, + "file": { + "description": "This is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File Upload Guide](https://stripe.com/docs/file-upload).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The time at which the file expires and is no longer available in epoch seconds.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "filename": { + "description": "A filename for the file, suitable for saving to a filesystem.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "links": { + "description": "A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileLinkList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file" + ], + "type": "string" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "size": { + "description": "The size in bytes of the file object.", + "type": "integer" + }, + "title": { + "description": "A user friendly title for the document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL from which the file can be downloaded using your live secret API key.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "id", + "object", + "purpose", + "size" + ], + "title": "File", + "type": "object", + "x-expandableFields": [ + "links" + ], + "x-resourceId": "file" + }, + "file_link": { + "description": "To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that can be used 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": "Whether this link is already expired.", + "type": "boolean" + }, + "expires_at": { + "description": "Time at which the link expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object this link points to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file_link" + ], + "type": "string" + }, + "url": { + "description": "The publicly accessible URL to download the file.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "expired", + "file", + "id", + "livemode", + "metadata", + "object" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": [ + "file" + ], + "x-resourceId": "file_link" + }, + "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 will appear on the mandate, and as the statement descriptor.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "disabled_reason": { + "description": "If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": [ + "array", + "null" + ] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "invalid_address_city_state_postal_code", + "invalid_dob_age_under_18", + "invalid_representative_country", + "invalid_street_address", + "invalid_tos_acceptance", + "invalid_value_other", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "An informative message that indicates the error type and provides additional details about the error.", + "maxLength": 5000, + "type": "string" + }, + "requirement": { + "description": "The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "code", + "reason", + "requirement" + ], + "title": "AccountRequirementsError", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to satisfy all fields in `original_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "alternative_fields_due", + "original_fields_due" + ], + "title": "AccountRequirementsAlternative", + "type": "object", + "x-expandableFields": [] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.\nSee the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.\n\nRelated guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).", + "properties": { + "account": { + "description": "The account the person is associated with.", + "maxLength": 5000, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "dob": { + "$ref": "#/components/schemas/legal_entity_dob" + }, + "email": { + "description": "The person's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_future_requirements" + }, + { + "type": "null" + } + ] + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number_provided": { + "description": "Whether the person's `id_number` was provided.", + "type": "boolean" + }, + "id_number_secondary_provided": { + "description": "Whether the person's `id_number_secondary` was provided.", + "type": "boolean" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nationality": { + "description": "The country where the person is a national.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "$ref": "#/components/schemas/address" + }, + "relationship": { + "$ref": "#/components/schemas/person_relationship" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_requirements" + }, + { + "type": "null" + } + ] + }, + "ssn_last_4_provided": { + "description": "Whether the last four digits of the person's Social Security number have been provided (U.S. only).", + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/legal_entity_person_verification" + } + }, + "required": [ + "account", + "created", + "id", + "object" + ], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "verification" + ], + "x-resourceId": "person" + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + { + "type": "null" + } + ], + "description": "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "document": { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": [ + "additional_document", + "document" + ] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say \"Identity document is too unclear to read\".", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "person_relationship": { + "description": "", + "properties": { + "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.", + "type": [ + "boolean", + "null" + ] + }, + "executive": { + "description": "Whether the person has significant responsibility to control, manage, or direct the organization.", + "type": [ + "boolean", + "null" + ] + }, + "owner": { + "description": "Whether the person is an owner of the account’s legal entity.", + "type": [ + "boolean", + "null" + ] + }, + "percent_ownership": { + "description": "The percent owned by the person of the account's legal entity.", + "type": [ + "number", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "title": { + "description": "The person's title (e.g., CEO, Support Engineer).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [] + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "legal_entity_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_japan_address": { + "description": "", + "properties": { + "city": { + "description": "City/Ward.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + "null" + ] + }, + "line1": { + "description": "Block/Building number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "line2": { + "description": "Building details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "Prefecture.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "town": { + "description": "Town/cho-me.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with 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", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": [ + "array", + "null" + ] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "card": { + "description": "You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line1_check": { + "description": "If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "description": "If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + }, + "brand": { + "description": "Card brand. Can be `American Express`, `Diners Club`, `Discover`, `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, + "type": [ + "string", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.", + "type": [ + "string", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "default_for_currency": { + "description": "Whether this card is the default external account for its currency.", + "type": [ + "boolean", + "null" + ] + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + }, + "status": { + "description": "For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "object" + ], + "title": "Card", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "card" + }, + "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" + }, + "bank_account": { + "description": "These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer\ndestinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-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](https://stripe.com/docs/payments/bank-debits-transfers).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The ID of the account that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number (e.g., `WELLS FARGO`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_for_currency": { + "description": "Whether this bank account is the default external account for its currency.", + "type": [ + "boolean", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "bank_account" + ], + "type": "string" + }, + "routing_number": { + "description": "The routing transit number for the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country", + "currency", + "id", + "last4", + "object", + "status" + ], + "title": "BankAccount", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "bank_account" + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "is_controller": { + "description": "`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.", + "type": "boolean" + }, + "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": [] + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kana variation of the company's primary address (Japan only)." + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kanji variation of the company's primary address (Japan only)." + }, + "directors_provided": { + "description": "Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).", + "type": "boolean" + }, + "executives_provided": { + "description": "Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.", + "type": "boolean" + }, + "name": { + "description": "The company's legal name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "owners_provided": { + "description": "Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).", + "type": "boolean" + }, + "ownership_declaration": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_ubo_declaration" + }, + { + "type": "null" + } + ], + "description": "This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct." + }, + "phone": { + "description": "The company's phone number (used for verification).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.", + "enum": [ + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + }, + "tax_id_registrar": { + "description": "The jurisdiction in which the `tax_id` is registered (Germany-based companies only).", + "maxLength": 5000, + "type": "string" + }, + "vat_id_provided": { + "description": "Whether the company's business VAT number was provided.", + "type": "boolean" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_company_verification" + }, + { + "type": "null" + } + ], + "description": "Information on the verification state of the company." + } + }, + "title": "LegalEntityCompany", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "ownership_declaration", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/legal_entity_company_verification_document" + } + }, + "required": [ + "document" + ], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "legal_entity_ubo_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the beneficial owner attestation was made.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the beneficial owner attestation was made.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user-agent string from the browser where the beneficial owner attestation was made.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "au_becs_debit_payments": { + "description": "The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bacs_debit_payments": { + "description": "The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bancontact_payments": { + "description": "The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bank_transfer_payments": { + "description": "The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "blik_payments": { + "description": "The status of the blik payments capability of the account, or whether the account can directly process blik charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "boleto_payments": { + "description": "The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_issuing": { + "description": "The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_payments": { + "description": "The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "cartes_bancaires_payments": { + "description": "The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "paynow_payments": { + "description": "The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "promptpay_payments": { + "description": "The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + } + }, + "title": "AccountCapabilities", + "type": "object", + "x-expandableFields": [] + }, + "account_business_profile": { + "description": "", + "properties": { + "mcc": { + "description": "[The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The customer-facing business name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "support_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "A publicly available mailing address for sending support issues to." + }, + "support_email": { + "description": "A publicly available email address for sending support issues to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "support_phone": { + "description": "A publicly available phone number to call with support issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "support_url": { + "description": "A publicly available website for handling support issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The business's publicly available website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": [ + "support_address" + ] + }, + "subscription_schedule": { + "description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "canceled_at": { + "description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "completed_at": { + "description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_phase": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_schedule_current_phase" + }, + { + "type": "null" + } + ], + "description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`." + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_settings": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_schedule" + ], + "type": "string" + }, + "phases": { + "description": "Configuration for the subscription schedule's phases.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_phase_configuration" + }, + "type": "array" + }, + "released_at": { + "description": "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "released_subscription": { + "description": "ID of the subscription once managed by the subscription schedule (if it is released).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "enum": [ + "active", + "canceled", + "completed", + "not_started", + "released" + ], + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "ID of the subscription managed by the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "customer", + "default_settings", + "end_behavior", + "id", + "livemode", + "object", + "phases", + "status" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule" + }, + "subscription_schedule_phase_configuration": { + "description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.", + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/schedules_phase_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start", + null + ], + "type": [ + "string", + "null" + ] + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + }, + { + "type": "null" + } + ], + "description": "ID of the coupon to use during this phase of the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The invoice settings applicable during this phase." + }, + "items": { + "description": "Subscription items to configure the subscription to during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_configuration_item" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.", + "type": [ + "object", + "null" + ] + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "proration_behavior": { + "description": "If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "When the trial ends within the phase.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "add_invoice_items", + "currency", + "end_date", + "items", + "proration_behavior", + "start_date" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "coupon", + "default_payment_method", + "default_tax_rates", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.", + "type": [ + "object", + "null" + ] + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "Quantity of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "tax_rates": { + "description": "The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ] + }, + "tax_rate": { + "description": "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_rate" + ], + "type": "string" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "created", + "display_name", + "id", + "inclusive", + "livemode", + "object", + "percentage" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_rate" + }, + "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": [] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the price can be used for new purchases.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/currency_option" + }, + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "price" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/recurring" + }, + { + "type": "null" + } + ], + "description": "The recurring components of a price such as `interval` and `usage_type`." + }, + "tax_behavior": { + "description": "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.", + "enum": [ + "graduated", + "volume", + null + ], + "type": [ + "string", + "null" + ] + }, + "transform_quantity": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_quantity" + }, + { + "type": "null" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`." + }, + "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 %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "product", + "type" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price" + }, + "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": [] + }, + "price_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "type": [ + "integer", + "null" + ] + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PriceTier", + "type": "object", + "x-expandableFields": [] + }, + "recurring": { + "description": "", + "properties": { + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum", + null + ], + "type": [ + "string", + "null" + ] + }, + "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" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ], + "title": "Recurring", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "product": { + "description": "Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)", + "properties": { + "active": { + "description": "Whether the product is currently available for purchase.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + } + ] + } + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "product" + ], + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "$ref": "#/components/schemas/package_dimensions" + }, + { + "type": "null" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": [ + "boolean", + "null" + ] + }, + "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.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "created", + "id", + "images", + "livemode", + "metadata", + "name", + "object", + "updated" + ], + "title": "Product", + "type": "object", + "x-expandableFields": [ + "default_price", + "package_dimensions", + "tax_code" + ], + "x-resourceId": "product" + }, + "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" + }, + "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": [] + }, + "custom_unit_amount": { + "description": "", + "properties": { + "maximum": { + "description": "The maximum unit amount the customer can specify for this item.", + "type": [ + "integer", + "null" + ] + }, + "minimum": { + "description": "The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.", + "type": [ + "integer", + "null" + ] + }, + "preset": { + "description": "The starting unit amount which can be updated by the customer.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "tax_behavior": { + "description": "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "unit_amount": { + "description": "The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": [ + "custom_unit_amount", + "tiers" + ] + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "type": [ + "integer", + "null" + ] + } + }, + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_subscription_schedule_setting": { + "description": "", + "properties": { + "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`.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": [] + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_card_present" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_grabpay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_link" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_method" + ], + "type": "string" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_promptpay" + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_sofort" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_wechat_pay" + } + }, + "required": [ + "billing_details", + "created", + "id", + "livemode", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "radar_options", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "x-resourceId": "payment_method" + }, + "payment_method_wechat_pay": { + "description": "", + "properties": {}, + "title": "payment_method_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "financial_connections_account": { + "description": "The ID of the Financial Connections Account used to create the payment method.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/us_bank_account_networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about US bank account networks that can be used." + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": [ + "networks" + ] + }, + "us_bank_account_networks": { + "description": "", + "properties": { + "preferred": { + "description": "The preferred network.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "supported": { + "description": "All supported networks.", + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "supported" + ], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sofort": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/sepa_debit_generated_from" + }, + { + "type": "null" + } + ], + "description": "Information about the object that generated this PaymentMethod." + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": [ + "generated_from" + ] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": [ + "charge", + "setup_attempt" + ] + }, + "setup_attempt": { + "description": "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_attempt" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details" + }, + "setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during this attempt to confirm the SetupIntent, if any." + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "status": { + "description": "Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "description": "The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "setup_intent", + "status", + "usage" + ], + "title": "PaymentFlowsSetupIntentSetupAttempt", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent" + ], + "x-resourceId": "setup_attempt" + }, + "setup_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 could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent as soon as you're ready to collect your customer's payment credentials.\nDo not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.\nThe SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/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](/guides/strong-customer-authentication) may need to be run through\n[Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection\nin order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).\nIf the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,\nit will automatically attach the resulting payment method to that Customer.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you ensure that your customers experience the minimum set of required friction,\neven as regulations change over time.\n\nRelated guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "cancellation_reason": { + "description": "Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.", + "enum": [ + "abandoned", + "duplicate", + "requested_by_customer", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered in the previous SetupIntent confirmation." + }, + "latest_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The most recent SetupAttempt for this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_next_action" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to continue payment setup." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the setup is intended.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used with this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this SetupIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "status": { + "description": "[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future.\n\nUse `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method_types", + "status", + "usage" + ], + "title": "SetupIntent", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "last_setup_error", + "latest_attempt", + "mandate", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "single_use_mandate" + ], + "x-resourceId": "setup_intent" + }, + "mandate": { + "description": "A Mandate is a record of the permission a customer has given you to debit their payment method.", + "properties": { + "customer_acceptance": { + "$ref": "#/components/schemas/customer_acceptance" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "multi_use": { + "$ref": "#/components/schemas/mandate_multi_use" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "mandate" + ], + "type": "string" + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/mandate_payment_method_details" + }, + "single_use": { + "$ref": "#/components/schemas/mandate_single_use" + }, + "status": { + "description": "The status of the mandate, which indicates whether it can be used to initiate a payment.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "type": { + "description": "The type of the mandate.", + "enum": [ + "multi_use", + "single_use" + ], + "type": "string" + } + }, + "required": [ + "customer_acceptance", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "title": "Mandate", + "type": "object", + "x-expandableFields": [ + "customer_acceptance", + "multi_use", + "payment_method", + "payment_method_details", + "single_use" + ], + "x-resourceId": "mandate" + }, + "mandate_single_use": { + "description": "", + "properties": { + "amount": { + "description": "On a single use mandate, the amount of the payment.", + "type": "integer" + }, + "currency": { + "description": "On a single use mandate, the currency of the payment.", + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "mandate_single_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/mandate_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/mandate_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/mandate_bacs_debit" + }, + "blik": { + "$ref": "#/components/schemas/mandate_blik" + }, + "card": { + "$ref": "#/components/schemas/card_mandate_payment_method_details" + }, + "link": { + "$ref": "#/components/schemas/mandate_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/mandate_sepa_debit" + }, + "type": { + "description": "The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/mandate_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "mandate_payment_method_details", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "mandate_us_bank_account": { + "description": "", + "properties": {}, + "title": "mandate_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "mandate_sepa_debit": { + "description": "", + "properties": { + "reference": { + "description": "The unique reference of the mandate.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "reference", + "url" + ], + "title": "mandate_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_link": { + "description": "", + "properties": {}, + "title": "mandate_link", + "type": "object", + "x-expandableFields": [] + }, + "card_mandate_payment_method_details": { + "description": "", + "properties": {}, + "title": "card_mandate_payment_method_details", + "type": "object", + "x-expandableFields": [] + }, + "mandate_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "mandate_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "mandate_options_off_session_details_blik": { + "description": "", + "properties": { + "amount": { + "description": "Amount of each recurring payment.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Currency of each recurring payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "interval": { + "description": "Frequency interval of each recurring payment.", + "enum": [ + "day", + "month", + "week", + "year", + null + ], + "type": [ + "string", + "null" + ] + }, + "interval_count": { + "description": "Frequency indicator of each recurring payment.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "mandate_options_off_session_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "network_status": { + "description": "The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.", + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "type": "string" + }, + "reference": { + "description": "The unique reference identifying the mandate on the Bacs network.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "network_status", + "reference", + "url" + ], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_au_becs_debit": { + "description": "", + "properties": { + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "mandate_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_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, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "required": [ + "payment_schedule", + "transaction_type" + ], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_multi_use": { + "description": "", + "properties": {}, + "title": "mandate_multi_use", + "type": "object", + "x-expandableFields": [] + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time at which the customer accepted the Mandate.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "offline": { + "$ref": "#/components/schemas/offline_acceptance" + }, + "online": { + "$ref": "#/components/schemas/online_acceptance" + }, + "type": { + "description": "The type of customer acceptance information included with the Mandate. One of `online` or `offline`.", + "enum": [ + "offline", + "online" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": [ + "offline", + "online" + ] + }, + "online_acceptance": { + "description": "", + "properties": { + "ip_address": { + "description": "The IP address from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "offline_acceptance": { + "description": "", + "properties": {}, + "title": "offline_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card" + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "setup_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "SetupIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "linked_account_options_us_bank_account": { + "description": "", + "properties": { + "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" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": { + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "integer", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_blik": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_blik" + } + }, + "title": "setup_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_mandate_options_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "setup_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account", + "enum": [ + "cad", + "usd", + null + ], + "type": [ + "string", + "null" + ] + }, + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_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, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "redirect_to_url": { + "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" + } + }, + "required": [ + "type" + ], + "title": "SetupIntentNextAction", + "type": "object", + "x-expandableFields": [ + "redirect_to_url", + "verify_with_microdeposits" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "api_errors": { + "description": "", + "properties": { + "charge": { + "description": "For card errors, the ID of the failed charge.", + "maxLength": 5000, + "type": "string" + }, + "code": { + "description": "For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "decline_code": { + "description": "For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.", + "maxLength": 40000, + "type": "string" + }, + "param": { + "description": "If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.", + "maxLength": 5000, + "type": "string" + }, + "payment_intent": { + "$ref": "#/components/schemas/payment_intent" + }, + "payment_method": { + "$ref": "#/components/schemas/payment_method" + }, + "payment_method_type": { + "description": "If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.", + "maxLength": 5000, + "type": "string" + }, + "request_log_url": { + "description": "A URL to the request log entry in your dashboard.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "$ref": "#/components/schemas/setup_intent" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "The source object for errors returned on a request involving a 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" + ] + }, + "source": { + "description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_type_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/source_type_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/source_type_acss_debit" + }, + "alipay": { + "$ref": "#/components/schemas/source_type_alipay" + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "au_becs_debit": { + "$ref": "#/components/schemas/source_type_au_becs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/source_type_bancontact" + }, + "card": { + "$ref": "#/components/schemas/source_type_card" + }, + "card_present": { + "$ref": "#/components/schemas/source_type_card_present" + }, + "client_secret": { + "description": "The client secret of the source. Used for client-side retrieval using a publishable key.", + "maxLength": 5000, + "type": "string" + }, + "code_verification": { + "$ref": "#/components/schemas/source_code_verification_flow" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.", + "type": [ + "string", + "null" + ] + }, + "customer": { + "description": "The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.", + "maxLength": 5000, + "type": "string" + }, + "eps": { + "$ref": "#/components/schemas/source_type_eps" + }, + "flow": { + "description": "The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.", + "maxLength": 5000, + "type": "string" + }, + "giropay": { + "$ref": "#/components/schemas/source_type_giropay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/source_type_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/source_type_klarna" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "multibanco": { + "$ref": "#/components/schemas/source_type_multibanco" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source" + ], + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/source_owner" + }, + { + "type": "null" + } + ], + "description": "Information about the owner of the payment instrument that may be used or required by particular source types." + }, + "p24": { + "$ref": "#/components/schemas/source_type_p24" + }, + "receiver": { + "$ref": "#/components/schemas/source_receiver_flow" + }, + "redirect": { + "$ref": "#/components/schemas/source_redirect_flow" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_type_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/source_type_sofort" + }, + "source_order": { + "$ref": "#/components/schemas/source_order" + }, + "statement_descriptor": { + "description": "Extra information about a source. This will appear on your customer's statement every time you charge the source.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.", + "maxLength": 5000, + "type": "string" + }, + "three_d_secure": { + "$ref": "#/components/schemas/source_type_three_d_secure" + }, + "type": { + "description": "The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "alipay", + "au_becs_debit", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "usage": { + "description": "Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "wechat": { + "$ref": "#/components/schemas/source_type_wechat" + } + }, + "required": [ + "client_secret", + "created", + "flow", + "id", + "livemode", + "object", + "status", + "type" + ], + "title": "Source", + "type": "object", + "x-expandableFields": [ + "code_verification", + "owner", + "receiver", + "redirect", + "source_order" + ], + "x-resourceId": "source" + }, + "source_type_wechat": { + "properties": { + "prepay_id": { + "type": "string" + }, + "qr_code_url": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_three_d_secure": { + "properties": { + "address_line1_check": { + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "type": [ + "string", + "null" + ] + }, + "authenticated": { + "type": [ + "boolean", + "null" + ] + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "card": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "customer": { + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "type": [ + "string", + "null" + ] + }, + "dynamic_last4": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "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).", + "type": "string" + }, + "email": { + "description": "The email address of the customer placing the order.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of items constituting the order.", + "items": { + "$ref": "#/components/schemas/source_order_item" + }, + "type": [ + "array", + "null" + ] + }, + "shipping": { + "$ref": "#/components/schemas/shipping" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": [ + "items", + "shipping" + ] + }, + "shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "Shipping", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "source_order_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount (price) for this order item.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "This currency of this order item. Required when `amount` is present.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description for this order item.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "parent": { + "description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [] + }, + "source_type_sofort": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "preferred_language": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_sepa_debit": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "mandate_reference": { + "type": [ + "string", + "null" + ] + }, + "mandate_url": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "return_url": { + "description": "The URL you provide to redirect the customer to after they authenticated their payment.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.", + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "return_url", + "status", + "url" + ], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_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, + "type": [ + "string", + "null" + ] + }, + "amount_charged": { + "description": "The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.", + "type": "integer" + }, + "amount_received": { + "description": "The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.", + "type": "integer" + }, + "amount_returned": { + "description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.", + "type": "integer" + }, + "refund_attributes_method": { + "description": "Type of refund attribute method, one of `email`, `manual`, or `none`.", + "maxLength": 5000, + "type": "string" + }, + "refund_attributes_status": { + "description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_type_p24": { + "properties": { + "reference": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Owner's address." + }, + "email": { + "description": "Owner's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Owner's full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "Owner's phone number (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "SourceOwner", + "type": "object", + "x-expandableFields": [ + "address", + "verified_address" + ] + }, + "source_type_multibanco": { + "properties": { + "entity": { + "type": [ + "string", + "null" + ] + }, + "reference": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_city": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_country": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_line1": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_line2": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_postal_code": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_state": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_name": { + "type": [ + "string", + "null" + ] + }, + "refund_iban": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_klarna": { + "properties": { + "background_image_url": { + "type": "string" + }, + "client_token": { + "type": [ + "string", + "null" + ] + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "page_title": { + "type": "string" + }, + "pay_later_asset_urls_descriptive": { + "type": "string" + }, + "pay_later_asset_urls_standard": { + "type": "string" + }, + "pay_later_name": { + "type": "string" + }, + "pay_later_redirect_url": { + "type": "string" + }, + "pay_now_asset_urls_descriptive": { + "type": "string" + }, + "pay_now_asset_urls_standard": { + "type": "string" + }, + "pay_now_name": { + "type": "string" + }, + "pay_now_redirect_url": { + "type": "string" + }, + "pay_over_time_asset_urls_descriptive": { + "type": "string" + }, + "pay_over_time_asset_urls_standard": { + "type": "string" + }, + "pay_over_time_name": { + "type": "string" + }, + "pay_over_time_redirect_url": { + "type": "string" + }, + "payment_method_categories": { + "type": "string" + }, + "purchase_country": { + "type": "string" + }, + "purchase_type": { + "type": "string" + }, + "redirect_url": { + "type": "string" + }, + "shipping_delay": { + "type": "integer" + }, + "shipping_first_name": { + "type": "string" + }, + "shipping_last_name": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_ideal": { + "properties": { + "bank": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_giropay": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_eps": { + "properties": { + "reference": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_code_verification_flow": { + "description": "", + "properties": { + "attempts_remaining": { + "description": "The number of attempts remaining to authenticate the source object with a verification code.", + "type": "integer" + }, + "status": { + "description": "The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "attempts_remaining", + "status" + ], + "title": "SourceCodeVerificationFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_type_card_present": { + "properties": { + "application_cryptogram": { + "type": "string" + }, + "application_preferred_name": { + "type": "string" + }, + "authorization_code": { + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "type": "string" + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "cvm_type": { + "type": "string" + }, + "data_type": { + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "type": "string" + }, + "emv_auth_data": { + "type": "string" + }, + "evidence_customer_signature": { + "type": [ + "string", + "null" + ] + }, + "evidence_transaction_certificate": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "pos_device_id": { + "type": [ + "string", + "null" + ] + }, + "pos_entry_mode": { + "type": "string" + }, + "read_method": { + "type": [ + "string", + "null" + ] + }, + "reader": { + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "type": "string" + }, + "transaction_status_information": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_card": { + "properties": { + "address_line1_check": { + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "type": [ + "string", + "null" + ] + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "type": [ + "string", + "null" + ] + }, + "dynamic_last4": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_bancontact": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "preferred_language": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_alipay": { + "properties": { + "data_string": { + "type": [ + "string", + "null" + ] + }, + "native_url": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_acss_debit": { + "properties": { + "bank_address_city": { + "type": [ + "string", + "null" + ] + }, + "bank_address_line_1": { + "type": [ + "string", + "null" + ] + }, + "bank_address_line_2": { + "type": [ + "string", + "null" + ] + }, + "bank_address_postal_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_ach_debit": { + "properties": { + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_ach_credit_transfer": { + "properties": { + "account_number": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_name": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_type": { + "type": [ + "string", + "null" + ] + }, + "refund_routing_number": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + }, + "swift_code": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "payment_intent": { + "description": "A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_capturable": { + "description": "Amount that can be captured from this PaymentIntent.", + "type": "integer" + }, + "amount_details": { + "$ref": "#/components/schemas/payment_flows_amount_details" + }, + "amount_received": { + "description": "Amount that was collected by this PaymentIntent.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": [ + "integer", + "null" + ] + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" + }, + { + "type": "null" + } + ], + "description": "Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)" + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice", + null + ], + "type": [ + "string", + "null" + ] + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "confirmation_method": { + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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 present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice that created this PaymentIntent, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "last_payment_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason." + }, + "latest_charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The latest charge created by this payment intent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).", + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action" + }, + { + "type": "null" + } + ], + "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." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used in this PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this PaymentIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "processing": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_processing" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you about the processing state of the payment." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this PaymentIntent, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/transfer_data" + }, + { + "type": "null" + } + ], + "description": "The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details." + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "capture_method", + "confirmation_method", + "created", + "currency", + "id", + "livemode", + "object", + "payment_method_types", + "status" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "invoice", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "processing", + "review", + "shipping", + "transfer_data" + ], + "x-resourceId": "payment_intent" + }, + "transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the payment will be attributed to for tax\nreporting, and where funds from the payment will be transferred to upon\npayment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "transfer_data", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "review": { + "description": "Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).", + "properties": { + "billing_zip": { + "description": "The ZIP or postal code of the card used, if applicable.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The charge associated with this review.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "closed_reason": { + "description": "The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "enum": [ + "approved", + "disputed", + "redacted", + "refunded", + "refunded_as_fraud", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "ip_address_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_location" + }, + { + "type": "null" + } + ], + "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." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "review" + ], + "type": "string" + }, + "open": { + "description": "If `true`, the review needs action.", + "type": "boolean" + }, + "opened_reason": { + "description": "The reason the review was opened. One of `rule` or `manual`.", + "enum": [ + "manual", + "rule" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_session" + }, + { + "type": "null" + } + ], + "description": "Information related to the browsing session of the user who initiated the payment." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "open", + "opened_reason", + "reason" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": [ + "charge", + "ip_address_location", + "payment_intent", + "session" + ], + "x-resourceId": "review" + }, + "radar_review_resource_session": { + "description": "", + "properties": { + "browser": { + "description": "The browser used in this browser session (e.g., `Chrome`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "device": { + "description": "Information about the device used for the browser session (e.g., `Samsung SM-G930T`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "platform": { + "description": "The platform for the browser session (e.g., `Macintosh`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "version": { + "description": "The version for the browser session (e.g., `61.0.3163.100`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "latitude": { + "description": "The geographic latitude where the payment originated.", + "type": [ + "number", + "null" + ] + }, + "longitude": { + "description": "The geographic longitude where the payment originated.", + "type": [ + "number", + "null" + ] + }, + "region": { + "description": "The state/county/province/region where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [] + }, + "charge": { + "description": "To charge a credit or a debit card, you create a `Charge` object. You can\nretrieve and refund individual charges as well as list all charges. Charges\nare identified by a unique, random ID.\n\nRelated guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_captured": { + "description": "Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "type": "null" + } + ], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "type": [ + "integer", + "null" + ] + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "calculated_statement_descriptor": { + "description": "The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 40000, + "type": [ + "string", + "null" + ] + }, + "disputed": { + "description": "Whether the charge has been disputed.", + "type": "boolean" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for charge failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fraud_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_fraud_details" + }, + { + "type": "null" + } + ], + "description": "Information on fraud assessments for the charge." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "charge" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_outcome" + }, + { + "type": "null" + } + ], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details." + }, + "paid": { + "description": "`true` if the charge succeeded, or was successfully authorized for later capture.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_method": { + "description": "ID of the payment method used in this charge.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Details about the payment method at the time of the transaction." + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge was sent to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RefundList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this charge if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for the charge." + }, + "source_transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "type": "null" + } + ], + "description": "The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the payment is either `succeeded`, `pending`, or `failed`.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_transfer_data" + }, + { + "type": "null" + } + ], + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details." + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "billing_details", + "captured", + "created", + "currency", + "disputed", + "id", + "livemode", + "metadata", + "object", + "paid", + "refunded", + "status" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "invoice", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "radar_options", + "refunds", + "review", + "shipping", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge" + }, + "charge_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.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "transfer": { + "description": "A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).", + "properties": { + "amount": { + "description": "Amount in %s to be transferred.", + "type": "integer" + }, + "amount_reversed": { + "description": "Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time that this record of the transfer was first created.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "ID of the Stripe account the transfer was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "destination_payment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer" + ], + "type": "string" + }, + "reversals": { + "description": "A list of reversals that have been applied to the transfer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "reversed": { + "description": "Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.", + "type": "boolean" + }, + "source_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "source_type": { + "description": "The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "amount_reversed", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer" + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination_payment_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "Linked payment refund for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer_reversal" + ], + "type": "string" + }, + "source_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "ID of the refund responsible for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object", + "transfer" + ], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal" + }, + "refund": { + "description": "`Refund` objects allow you to refund a charge that has previously been created\nbut not yet refunded. Funds will be refunded to the credit or debit card that\nwas originally charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)", + "maxLength": 5000, + "type": "string" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_reason": { + "description": "If the refund failed, the reason for refund failure if known. 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": "Email to which refund instructions, if required, are sent to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "next_action": { + "$ref": "#/components/schemas/refund_next_action" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "refund" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason for the refund, 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", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this refund.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "source_transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + }, + "status": { + "description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object" + ], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "failure_balance_transaction", + "next_action", + "payment_intent", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund" + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/refund_next_action_display_details" + }, + { + "type": "null" + } + ], + "description": "Contains the refund details." + }, + "type": { + "description": "Type of the next action to perform.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RefundNextAction", + "type": "object", + "x-expandableFields": [ + "display_details" + ] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { + "$ref": "#/components/schemas/email_sent" + }, + "expires_at": { + "description": "The expiry timestamp.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "email_sent", + "expires_at" + ], + "title": "RefundNextActionDisplayDetails", + "type": "object", + "x-expandableFields": [ + "email_sent" + ] + }, + "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": [] + }, + "balance_transaction": { + "description": "Balance transactions represent funds moving through your Stripe account.\nThey're created for every type of transaction that comes into or flows out of your Stripe account balance.\n\nRelated guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).", + "properties": { + "amount": { + "description": "Gross amount of the transaction, in %s.", + "type": "integer" + }, + "available_on": { + "description": "The date the transaction's net funds will become available in the Stripe balance.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "exchange_rate": { + "description": "The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.", + "type": [ + "number", + "null" + ] + }, + "fee": { + "description": "Fees (in %s) paid for this transaction.", + "type": "integer" + }, + "fee_details": { + "description": "Detailed breakdown of fees (in %s) paid for this transaction.", + "items": { + "$ref": "#/components/schemas/fee" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "net": { + "description": "Net amount of the transaction, in %s.", + "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](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The Stripe object to which this transaction is related.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + }, + "x-stripeBypassValidation": true + }, + "status": { + "description": "If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.", + "enum": [ + "adjustment", + "advance", + "advance_funding", + "anticipation_repayment", + "application_fee", + "application_fee_refund", + "charge", + "connect_collection_transfer", + "contribution", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "payment", + "payment_failure_refund", + "payment_refund", + "payout", + "payout_cancel", + "payout_failure", + "refund", + "refund_failure", + "reserve_transaction", + "reserved_funds", + "stripe_fee", + "stripe_fx_fee", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "created", + "currency", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": [ + "fee_details", + "source" + ], + "x-resourceId": "balance_transaction" + }, + "topup": { + "description": "To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).", + "properties": { + "amount": { + "description": "Amount transferred.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "failure_code": { + "description": "Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for top-up failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "topup" + ], + "type": "string" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "status" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "source" + ], + "x-resourceId": "topup" + }, + "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": [] + }, + "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).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reserve_transaction" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "id", + "object" + ], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [] + }, + "platform_tax_fee": { + "description": "", + "properties": { + "account": { + "description": "The Connected account that incurred this charge.", + "maxLength": 5000, + "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": [ + "platform_tax_fee" + ], + "type": "string" + }, + "source_transaction": { + "description": "The payment object that caused this tax to be inflicted.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of tax (VAT).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account", + "id", + "object", + "source_transaction", + "type" + ], + "title": "PlatformTax", + "type": "object", + "x-expandableFields": [] + }, + "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,\nas well as list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving Payouts](https://stripe.com/docs/payouts).", + "properties": { + "amount": { + "description": "Amount (in %s) to be transferred to your bank account or debit card.", + "type": "integer" + }, + "arrival_date": { + "description": "Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.", + "format": "unix-time", + "type": "integer" + }, + "automatic": { + "description": "Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts).", + "type": "boolean" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this payout on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + }, + { + "type": "null" + } + ], + "description": "ID of the bank account or card the payout was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ] + }, + "x-stripeBypassValidation": true + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for payout failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payout" + ], + "type": "string" + }, + "original_payout": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout reverses another, this is the ID of the original payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "reversed_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout was reversed, this is the ID of the payout that reverses this payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "source_type": { + "description": "The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a payout to be displayed on the user's bank statement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Can be `bank_account` or `card`.", + "enum": [ + "bank_account", + "card" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "arrival_date", + "automatic", + "created", + "currency", + "id", + "livemode", + "method", + "object", + "source_type", + "status", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by" + ], + "x-resourceId": "payout" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCard", + "type": "object", + "x-expandableFields": [] + }, + "deleted_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, + "type": [ + "string", + "null" + ] + }, + "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": [] + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).", + "properties": { + "amount": { + "description": "The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "authorization": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "type": "null" + } + ], + "description": "The `Authorization` object that led to this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.authorization" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card used to make this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this transaction belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "dispute": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "type": "null" + } + ], + "description": "If you've disputed the transaction, the ID of the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.dispute" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency with which the merchant is taking payment.", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.transaction" + ], + "type": "string" + }, + "purchase_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_purchase_details" + }, + { + "type": "null" + } + ], + "description": "Additional purchase information that is optionally provided by the merchant." + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "type" + ], + "title": "IssuingTransaction", + "type": "object", + "x-expandableFields": [ + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "dispute", + "merchant_data", + "purchase_details", + "treasury" + ], + "x-resourceId": "issuing.transaction" + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "flight": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_flight_data" + }, + { + "type": "null" + } + ], + "description": "Information about the flight that was purchased with this transaction." + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fuel_data" + }, + { + "type": "null" + } + ], + "description": "Information about fuel that was purchased with this transaction." + }, + "lodging": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_lodging_data" + }, + { + "type": "null" + } + ], + "description": "Information about lodging that was purchased with this transaction." + }, + "receipt": { + "description": "The line items in the purchase.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_receipt_data" + }, + "type": [ + "array", + "null" + ] + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": [ + "flight", + "fuel", + "lodging", + "receipt" + ] + }, + "issuing_transaction_receipt_data": { + "description": "", + "properties": { + "description": { + "description": "The description of the item. The maximum length of this field is 26 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "quantity": { + "description": "The quantity of the item.", + "type": [ + "number", + "null" + ] + }, + "total": { + "description": "The total for this line item in cents.", + "type": [ + "integer", + "null" + ] + }, + "unit_cost": { + "description": "The unit cost of the item in cents.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_lodging_data": { + "description": "", + "properties": { + "check_in_at": { + "description": "The time of checking into the lodging.", + "type": [ + "integer", + "null" + ] + }, + "nights": { + "description": "The number of nights stayed at the lodging.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fuel_data": { + "description": "", + "properties": { + "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 `volume_decimal`. One of `us_gallon` or `liter`.", + "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" + }, + "volume_decimal": { + "description": "The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type", + "unit", + "unit_cost_decimal" + ], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_flight_data": { + "description": "", + "properties": { + "departure_at": { + "description": "The time that the flight departed.", + "type": [ + "integer", + "null" + ] + }, + "passenger_name": { + "description": "The name of the passenger.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "refundable": { + "description": "Whether the ticket is refundable.", + "type": [ + "boolean", + "null" + ] + }, + "segments": { + "description": "The legs of the trip.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_flight_data_leg" + }, + "type": [ + "array", + "null" + ] + }, + "travel_agency": { + "description": "The travel agency that issued the ticket.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": [ + "segments" + ] + }, + "issuing_transaction_flight_data_leg": { + "description": "", + "properties": { + "arrival_airport_code": { + "description": "The three-letter IATA airport code of the flight's destination.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "carrier": { + "description": "The airline carrier code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "departure_airport_code": { + "description": "The three-letter IATA airport code that the flight departed from.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flight_number": { + "description": "The flight number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "service_class": { + "description": "The flight's service class.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "stopover_allowed": { + "description": "Whether a stopover is allowed on this flight.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.", + "maxLength": 5000, + "type": "string" + }, + "category_code": { + "description": "The merchant category code for the seller’s business", + "maxLength": 5000, + "type": "string" + }, + "city": { + "description": "City where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Country where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the seller", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "State where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "category", + "category_code", + "network_id" + ], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [] + }, + "issuing.dispute": { + "description": "As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.\n\nRelated guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of balance transactions associated with the dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": [ + "array", + "null" + ] + }, + "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.", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/issuing_dispute_evidence" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.dispute" + ], + "type": "string" + }, + "status": { + "description": "Current status of the dispute.", + "enum": [ + "expired", + "lost", + "submitted", + "unsubmitted", + "won" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.transaction" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_dispute_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + } + }, + "required": [ + "amount", + "created", + "currency", + "evidence", + "id", + "livemode", + "metadata", + "object", + "status", + "transaction" + ], + "title": "IssuingDispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "evidence", + "transaction", + "treasury" + ], + "x-resourceId": "issuing.dispute" + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { + "$ref": "#/components/schemas/issuing_dispute_canceled_evidence" + }, + "duplicate": { + "$ref": "#/components/schemas/issuing_dispute_duplicate_evidence" + }, + "fraudulent": { + "$ref": "#/components/schemas/issuing_dispute_fraudulent_evidence" + }, + "merchandise_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_merchandise_not_as_described_evidence" + }, + "not_received": { + "$ref": "#/components/schemas/issuing_dispute_not_received_evidence" + }, + "other": { + "$ref": "#/components/schemas/issuing_dispute_other_evidence" + }, + "reason": { + "description": "The reason for filing the dispute. Its value will match the field containing the evidence.", + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_service_not_as_described_evidence" + } + }, + "required": [ + "reason" + ], + "title": "IssuingDisputeEvidence", + "type": "object", + "x-expandableFields": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "return_description": { + "description": "Description of the cardholder's attempt to return the product.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful", + null + ], + "type": [ + "string", + "null" + ] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "card_statement": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cash_receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "check_image": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancellation_policy_provided": { + "description": "Whether the cardholder was provided with a cancellation policy.", + "type": [ + "boolean", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful", + null + ], + "type": [ + "string", + "null" + ] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)", + "properties": { + "billing": { + "$ref": "#/components/schemas/issuing_cardholder_address" + }, + "company": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_company" + }, + { + "type": "null" + } + ], + "description": "Additional information about a `company` cardholder." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual" + }, + { + "type": "null" + } + ], + "description": "Additional information about an `individual` cardholder." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.cardholder" + ], + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "requirements": { + "$ref": "#/components/schemas/issuing_cardholder_requirements" + }, + "spending_controls": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_authorization_controls" + }, + { + "type": "null" + } + ], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details." + }, + "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`.", + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "created", + "id", + "livemode", + "metadata", + "name", + "object", + "requirements", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder" + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across this cardholder's cards.", + "items": { + "$ref": "#/components/schemas/issuing_cardholder_spending_limit" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`.", + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_cardholder_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_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", + "under_review", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "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.dob.day", + "individual.dob.month", + "individual.dob.year", + "individual.first_name", + "individual.last_name", + "individual.verification.document" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_card_issuing" + }, + { + "type": "null" + } + ], + "description": "Information related to the card_issuing program for this cardholder." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual_dob" + }, + { + "type": "null" + } + ], + "description": "The date of birth of this cardholder." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_verification" + }, + { + "type": "null" + } + ], + "description": "Government-issued ID document for this cardholder." + } + }, + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "dob", + "verification" + ] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_id_document" + }, + { + "type": "null" + } + ], + "description": "An identifying document, either a passport or local ID card." + } + }, + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "issuing_cardholder_individual_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_user_terms_acceptance" + }, + { + "type": "null" + } + ], + "description": "Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards)." + } + }, + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": [ + "user_terms_acceptance" + ] + }, + "issuing_cardholder_user_terms_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_company": { + "description": "", + "properties": { + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + } + }, + "required": [ + "tax_id_provided" + ], + "title": "IssuingCardholderCompany", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + } + }, + "required": [ + "address" + ], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) 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", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "cardholder": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.", + "type": "string" + }, + "cvc": { + "description": "The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "The expiration month of the card.", + "type": "integer" + }, + "exp_year": { + "description": "The expiration year of the card.", + "type": "integer" + }, + "financial_account": { + "description": "The financial account this card is attached to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the card number.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.card" + ], + "type": "string" + }, + "replaced_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The latest card that replaces this card, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_for": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The card this card replaces, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_reason": { + "description": "The reason why the previous card needed to be replaced.", + "enum": [ + "damaged", + "expired", + "lost", + "stolen", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping" + }, + { + "type": "null" + } + ], + "description": "Where and how the card will be shipped." + }, + "spending_controls": { + "$ref": "#/components/schemas/issuing_card_authorization_controls" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "The type of the card.", + "enum": [ + "physical", + "virtual" + ], + "type": "string" + }, + "wallets": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_wallets" + }, + { + "type": "null" + } + ], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay)." + } + }, + "required": [ + "brand", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "livemode", + "metadata", + "object", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card" + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/issuing_card_apple_pay" + }, + "google_pay": { + "$ref": "#/components/schemas/issuing_card_google_pay" + }, + "primary_account_identifier": { + "description": "Unique identifier for a card used with digital wallets", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "apple_pay", + "google_pay" + ], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": [ + "apple_pay", + "google_pay" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).", + "items": { + "$ref": "#/components/schemas/issuing_card_spending_limit" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`. Always the same as the currency of the card.", + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_card_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery company that shipped a card.", + "enum": [ + "dhl", + "fedex", + "royal_mail", + "usps", + null + ], + "type": [ + "string", + "null" + ] + }, + "customs": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping_customs" + }, + { + "type": "null" + } + ], + "description": "Additional information that may be required for clearing customs." + }, + "eta": { + "description": "A unix timestamp representing a best estimate of when the card will be delivered.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tracking_number": { + "description": "A tracking number for a card shipment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tracking_url": { + "description": "A link to the shipping carrier's site where you can view detailed information about a card shipment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Packaging options.", + "enum": [ + "bulk", + "individual" + ], + "type": "string" + } + }, + "required": [ + "address", + "name", + "service", + "type" + ], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": [ + "address", + "customs" + ] + }, + "issuing_card_shipping_customs": { + "description": "", + "properties": { + "eori_number": { + "description": "A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [] + }, + "issuing.authorization": { + "description": "When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).", + "properties": { + "amount": { + "description": "The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether the authorization has been approved.", + "type": "boolean" + }, + "authorization_method": { + "description": "How the card details were provided.", + "enum": [ + "chip", + "contactless", + "keyed_in", + "online", + "swipe" + ], + "type": "string" + }, + "balance_transactions": { + "description": "List of balance transactions associated with this authorization.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "card": { + "$ref": "#/components/schemas/issuing.card" + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this authorization belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "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).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was 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).", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_network_data" + }, + { + "type": "null" + } + ], + "description": "Details about the authorization, such as identifiers, set by the card network." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.authorization" + ], + "type": "string" + }, + "pending_request": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_pending_request" + }, + { + "type": "null" + } + ], + "description": "The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook." + }, + "request_history": { + "description": "History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.", + "items": { + "$ref": "#/components/schemas/issuing_authorization_request" + }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": [ + "closed", + "pending", + "reversed" + ], + "type": "string" + }, + "transactions": { + "description": "List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.", + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts)." + }, + "verification_data": { + "$ref": "#/components/schemas/issuing_authorization_verification_data" + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "approved", + "authorization_method", + "balance_transactions", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "request_history", + "status", + "transactions", + "verification_data" + ], + "title": "IssuingAuthorization", + "type": "object", + "x-expandableFields": [ + "amount_details", + "balance_transactions", + "card", + "cardholder", + "merchant_data", + "network_data", + "pending_request", + "request_history", + "transactions", + "treasury", + "verification_data" + ], + "x-resourceId": "issuing.authorization" + }, + "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" + }, + "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" + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "cvc_check", + "expiry_check" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "received_credits", + "received_debits" + ], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_request": { + "description": "", + "properties": { + "amount": { + "description": "The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether this request was approved.", + "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).", + "maxLength": 5000, + "type": "string" + }, + "merchant_amount": { + "description": "The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "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_inactive", + "cardholder_inactive", + "cardholder_verification_required", + "insufficient_funds", + "not_allowed", + "spending_controls", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason_message": { + "description": "If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "approved", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "reason" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "issuing_authorization_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_pending_request": { + "description": "", + "properties": { + "amount": { + "description": "The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "is_amount_controllable": { + "description": "If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The local currency the merchant is requesting to authorize.", + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "fee_refund": { + "description": "`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "fee_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "fee", + "id", + "object" + ], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "fee" + ], + "x-resourceId": "fee_refund" + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "amount": { + "description": "Amount earned, in %s.", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application_fee" + ], + "type": "string" + }, + "originating_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "refunded": { + "description": "Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the fee.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "charge", + "created", + "currency", + "id", + "livemode", + "object", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee" + }, + "application": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Application", + "type": "object", + "x-expandableFields": [] + }, + "dispute": { + "description": "A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you're given the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate. You can find more\ninformation about the dispute process in our [Disputes and\nFraud](/docs/disputes) documentation.\n\nRelated guide: [Disputes and Fraud](https://stripe.com/docs/disputes).", + "properties": { + "amount": { + "description": "Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/dispute_evidence" + }, + "evidence_details": { + "$ref": "#/components/schemas/dispute_evidence_details" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_charge_refundable": { + "description": "If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "dispute" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.", + "enum": [ + "charge_refunded", + "lost", + "needs_response", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string" + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent" + ], + "x-resourceId": "dispute" + }, + "dispute_evidence_details": { + "description": "", + "properties": { + "due_by": { + "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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": [ + "has_evidence", + "past_due", + "submission_count" + ], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": [] + }, + "dispute_evidence": { + "description": "", + "properties": { + "access_activity_log": { + "description": "Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "billing_address": { + "description": "The billing address provided by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cancellation_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cancellation_policy_disclosure": { + "description": "An explanation of how and when the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "cancellation_rebuttal": { + "description": "A justification for why the customer's subscription was not canceled.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "customer_communication": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_name": { + "description": "The name of the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_signature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_explanation": { + "description": "An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "duplicate_charge_id": { + "description": "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy_disclosure": { + "description": "Documentation demonstrating that the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "refund_refusal_explanation": { + "description": "A justification for why the customer is not entitled to a refund.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "service_date": { + "description": "The date on which the customer received or began receiving the purchased service, in a clear human-readable format.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "service_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_address": { + "description": "The address to which a physical product was shipped. You should try to include as complete address information as possible.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_tracking_number": { + "description": "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "uncategorized_file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + } + }, + "title": "DisputeEvidence", + "type": "object", + "x-expandableFields": [ + "cancellation_policy", + "customer_communication", + "customer_signature", + "duplicate_charge_documentation", + "receipt", + "refund_policy", + "service_documentation", + "shipping_documentation", + "uncategorized_file" + ] + }, + "connect_collection_transfer": { + "description": "", + "properties": { + "amount": { + "description": "Amount transferred, in %s.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "connect_collection_transfer" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "destination", + "id", + "livemode", + "object" + ], + "title": "ConnectCollectionTransfer", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "type" + ], + "title": "Fee", + "type": "object", + "x-expandableFields": [] + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "RadarRadarOptions", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/payment_method_details_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/payment_method_details_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_details_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_details_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_details_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_details_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_details_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_details_grabpay" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_details_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_details_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_details_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_details_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_details_link" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_details_multibanco" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_details_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_details_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_details_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_details_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_details_promptpay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_details_sofort" + }, + "stripe_account": { + "$ref": "#/components/schemas/payment_method_details_stripe_account" + }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_details_us_bank_account" + }, + "wechat": { + "$ref": "#/components/schemas/payment_method_details_wechat" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_details_wechat_pay" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "multibanco", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "stripe_account", + "us_bank_account", + "wechat", + "wechat_pay" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_wechat": { + "description": "", + "properties": {}, + "title": "payment_method_details_wechat", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_stripe_account": { + "description": "", + "properties": {}, + "title": "payment_method_details_stripe_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `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", + "volkswagen_bank", + null + ], + "type": [ + "string", + "null" + ] + }, + "reference": { + "description": "Unique reference for this Przelewy24 payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_multibanco": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_link": { + "description": "", + "properties": {}, + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_konbini_store" + }, + { + "type": "null" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed." + } + }, + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": [ + "store" + ] + }, + "payment_method_details_konbini_store": { + "description": "", + "properties": { + "chain": { + "description": "The name of the convenience store chain where the payment was completed.", + "enum": [ + "familymart", + "lawson", + "ministop", + "seicomart", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "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, + "type": [ + "string", + "null" + ] + }, + "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`, `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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_interac_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "savings", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_giropay": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction id generated by FPX for every request from the merchant", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "bank" + ], + "title": "payment_method_details_fpx", + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_details_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "type": [ + "integer", + "null" + ] + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "incremental_authorization_supported": { + "description": "Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).", + "type": "boolean" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "overcapture_supported": { + "description": "Defines whether the authorized amount can be over-captured or not", + "type": "boolean" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year", + "incremental_authorization_supported", + "overcapture_supported" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_card_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "credit", + "prepaid", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_checks" + }, + { + "type": "null" + } + ], + "description": "Check results by Card networks on Card address and CVC at time of payment." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment or created by it.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this transaction used 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "installments", + "three_d_secure", + "wallet" + ] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_details_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_details_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "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_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_details": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": [ + "challenge", + "frictionless", + null + ], + "type": [ + "string", + "null" + ] + }, + "result": { + "description": "Indicates the outcome of 3D Secure authentication.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + null + ], + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": [ + "1.0.2", + "2.1.0", + "2.2.0", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for the payment." + } + }, + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_method_details_card_installments_plan": { + "description": "", + "properties": { + "count": { + "description": "For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.", + "type": [ + "integer", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`.", + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_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, + "type": [ + "string", + "null" + ] + }, + "transaction_id": { + "description": "Transaction ID of this particular Alipay transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_afterpay_clearpay": { + "description": "", + "properties": { + "reference": { + "description": "Order identifier shown to the merchant in Afterpay’s online portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "institution_number": { + "description": "Institution number of the bank account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_debit": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing transit number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_credit_transfer": { + "description": "", + "properties": { + "account_number": { + "description": "Account number to transfer funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing transit number for the bank account to transfer funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "swift_code": { + "description": "SWIFT code of the bank associated with the routing number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [] + }, + "charge_outcome": { + "description": "", + "properties": { + "network_status": { + "description": "Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as \"pending\" on a cardholder's statement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "reason": { + "description": "An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "risk_level": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.", + "maxLength": 5000, + "type": "string" + }, + "risk_score": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.", + "type": "integer" + }, + "rule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/rule" + } + ], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/rule" + } + ] + } + }, + "seller_message": { + "description": "A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": [ + "rule" + ] + }, + "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": [] + }, + "invoice": { + "description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).", + "properties": { + "account_country": { + "description": "The country of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_name": { + "description": "The public name of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "amount_due": { + "description": "Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "type": "integer" + }, + "amount_paid": { + "description": "The amount, in %s, that was paid.", + "type": "integer" + }, + "amount_remaining": { + "description": "The difference between amount_due and amount_paid, in %s.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.", + "type": [ + "integer", + "null" + ] + }, + "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.", + "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 will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "$ref": "#/components/schemas/automatic_tax" + }, + "billing_reason": { + "description": "Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming", + null + ], + "type": [ + "string", + "null" + ] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the latest charge generated for this invoice, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer who will be billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "customer_shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "customer_tax_ids": { + "description": "The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.", + "items": { + "$ref": "#/components/schemas/invoices_resource_invoice_tax_id" + }, + "type": [ + "array", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts." + }, + "discounts": { + "description": "The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "from_invoice": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_from_invoice" + }, + { + "type": "null" + } + ], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.", + "maxLength": 5000, + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_finalization_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized." + }, + "latest_revision": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the most recent non-draft revision of this invoice", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoice" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_settings": { + "$ref": "#/components/schemas/invoices_payment_settings" + }, + "period_end": { + "description": "End of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "Start of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "post_payment_credit_notes_amount": { + "description": "Total amount of all post-payment credit notes issued for this invoice.", + "type": "integer" + }, + "pre_payment_credit_notes_amount": { + "description": "Total amount of all pre-payment credit notes issued for this invoice.", + "type": "integer" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + }, + { + "type": "null" + } + ], + "description": "The quote this invoice was generated from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied on the invoice." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void", + null + ], + "type": [ + "string", + "null" + ] + }, + "status_transitions": { + "$ref": "#/components/schemas/invoices_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that this invoice was prepared for, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "type": "integer" + }, + "subtotal": { + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated", + "type": [ + "integer", + "null" + ] + }, + "tax": { + "description": "The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.", + "type": [ + "integer", + "null" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this invoice belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "threshold_reason": { + "$ref": "#/components/schemas/invoice_threshold_reason" + }, + "total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "total_discount_amounts": { + "description": "The aggregate amounts calculated per discount across all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": [ + "array", + "null" + ] + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.", + "type": [ + "integer", + "null" + ] + }, + "total_tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice." + }, + "webhooks_delivered_at": { + "description": "Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "amount_due", + "amount_paid", + "amount_remaining", + "amount_shipping", + "attempt_count", + "attempted", + "automatic_tax", + "collection_method", + "created", + "currency", + "default_tax_rates", + "lines", + "livemode", + "object", + "paid", + "paid_out_of_band", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "starting_balance", + "status_transitions", + "subtotal", + "total", + "total_tax_amounts" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "charge", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "from_invoice", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "payment_intent", + "payment_settings", + "quote", + "rendering_options", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_tax_amounts", + "transfer_data" + ], + "x-resourceId": "invoice" + }, + "invoice_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "InvoiceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "invoice_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate" + ], + "title": "InvoiceTaxAmount", + "type": "object", + "x-expandableFields": [ + "tax_rate" + ] + }, + "discounts_resource_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the discount.", + "type": "integer" + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + } + }, + "required": [ + "amount", + "discount" + ], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "coupon", + "deleted", + "id", + "object", + "start" + ], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "deleted_discount" + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.", + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.", + "maxLength": 5000, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer that this promotion code can be used by.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "expires_at": { + "description": "Date at which the promotion code can no longer be redeemed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this promotion code can be redeemed.", + "type": [ + "integer", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "promotion_code" + ], + "type": "string" + }, + "restrictions": { + "$ref": "#/components/schemas/promotion_codes_resource_restrictions" + }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "coupon", + "created", + "id", + "livemode", + "object", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "restrictions" + ], + "x-resourceId": "promotion_code" + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/promotion_code_currency_option" + }, + "description": "Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "first_time_transaction": { + "description": "A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices", + "type": "boolean" + }, + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": [ + "integer", + "null" + ] + }, + "minimum_amount_currency": { + "description": "Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "first_time_transaction" + ], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "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": [] + }, + "coupon": { + "description": "A coupon contains information about a percent-off or amount-off discount you\nmight want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),\n[checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": [ + "integer", + "null" + ] + }, + "applies_to": { + "$ref": "#/components/schemas/coupon_applies_to" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.", + "type": [ + "string", + "null" + ] + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/coupon_currency_option" + }, + "description": "Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.", + "type": [ + "integer", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "name": { + "description": "Name of the coupon displayed to customers on for instance invoices or receipts.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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 %s100 invoice %s50 instead.", + "type": [ + "number", + "null" + ] + }, + "redeem_by": { + "description": "Date after which the coupon can no longer be redeemed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "times_redeemed": { + "description": "Number of times this coupon has been applied to a customer.", + "type": "integer" + }, + "valid": { + "description": "Taking account of the above properties, whether this coupon can still be applied to a customer.", + "type": "boolean" + } + }, + "required": [ + "created", + "duration", + "id", + "livemode", + "object", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": [ + "applies_to", + "currency_options" + ], + "x-resourceId": "coupon" + }, + "coupon_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": [] + }, + "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": [] + }, + "discount": { + "description": "A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "end": { + "description": "If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "coupon", + "id", + "object", + "start" + ], + "title": "Discount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "discount" + }, + "invoice_threshold_reason": { + "description": "", + "properties": { + "amount_gte": { + "description": "The total invoice amount threshold boundary if it triggered the threshold invoice.", + "type": [ + "integer", + "null" + ] + }, + "item_reasons": { + "description": "Indicates which line items triggered a threshold invoice.", + "items": { + "$ref": "#/components/schemas/invoice_item_threshold_reason" + }, + "type": "array" + } + }, + "required": [ + "item_reasons" + ], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": [ + "item_reasons" + ] + }, + "invoice_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": [] + }, + "invoices_status_transitions": { + "description": "", + "properties": { + "finalized_at": { + "description": "The time that the invoice draft was finalized.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "marked_uncollectible_at": { + "description": "The time that the invoice was marked uncollectible.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "paid_at": { + "description": "The time that the invoice was paid.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "voided_at": { + "description": "The time that the invoice was voided.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoicesStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "invoices_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "InvoicesShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "Amount of tax applied for this rate.", + "type": "integer" + }, + "rate": { + "$ref": "#/components/schemas/tax_rate" + } + }, + "required": [ + "amount", + "rate" + ], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": [ + "rate" + ] + }, + "shipping_rate": { + "description": "Shipping rates describe the price of shipping presented to your customers and can be\napplied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)\nand [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.", + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "delivery_estimate": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate" + }, + { + "type": "null" + } + ], + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions." + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fixed_amount": { + "$ref": "#/components/schemas/shipping_rate_fixed_amount" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "shipping_rate" + ], + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": [ + "delivery_estimate", + "fixed_amount", + "tax_code" + ], + "x-resourceId": "shipping_rate" + }, + "shipping_rate_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).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/shipping_rate_currency_option" + }, + "description": "Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "ShippingRateFixedAmount", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "shipping_rate_currency_option": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount", + "tax_behavior" + ], + "title": "ShippingRateCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite." + }, + "minimum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The lower bound of the estimated range. If empty, represents no lower bound." + } + }, + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": [ + "maximum", + "minimum" + ] + }, + "shipping_rate_delivery_estimate_bound": { + "description": "", + "properties": { + "unit": { + "description": "A unit of time.", + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "ShippingRateDeliveryEstimateBound", + "type": "object", + "x-expandableFields": [] + }, + "quote": { + "description": "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule.", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.", + "type": [ + "integer", + "null" + ] + }, + "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 subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/quotes_resource_automatic_tax" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "computed": { + "$ref": "#/components/schemas/quotes_resource_computed" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_tax_rates": { + "description": "The tax rates applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "type": "array" + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discounts": { + "description": "The discounts applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "expires_at": { + "description": "The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "from_quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_from_quote" + }, + { + "type": "null" + } + ], + "description": "Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details." + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + }, + { + "type": "null" + } + ], + "description": "The invoice that was created from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ] + } + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_quote_setting" + }, + { + "type": "null" + } + ], + "description": "All invoices will be billed using the specified settings." + }, + "line_items": { + "description": "A list of items the customer is being quoted for.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "quote" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "status": { + "description": "The status of the quote.", + "enum": [ + "accepted", + "canceled", + "draft", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/quotes_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_data": { + "$ref": "#/components/schemas/quotes_resource_subscription_data_subscription_data" + }, + "subscription_schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this quote belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices." + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "automatic_tax", + "collection_method", + "computed", + "created", + "discounts", + "expires_at", + "id", + "livemode", + "metadata", + "object", + "status", + "status_transitions", + "subscription_data", + "total_details" + ], + "title": "Quote", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "computed", + "customer", + "default_tax_rates", + "discounts", + "from_quote", + "invoice", + "invoice_settings", + "line_items", + "on_behalf_of", + "status_transitions", + "subscription", + "subscription_data", + "subscription_schedule", + "test_clock", + "total_details", + "transfer_data" + ], + "x-resourceId": "quote" + }, + "quotes_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.", + "type": [ + "number", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "QuotesResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "quotes_resource_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": [ + "integer", + "null" + ] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "QuotesResourceTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "quotes_resource_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "QuotesResourceTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "line_items_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount discounted.", + "type": "integer" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + }, + "required": [ + "amount", + "discount" + ], + "title": "LineItemsDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "quotes_resource_subscription_data_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "effective_date": { + "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "QuotesResourceSubscriptionDataSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_status_transitions": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the quote was accepted. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "canceled_at": { + "description": "The time that the quote was canceled. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "finalized_at": { + "description": "The time that the quote was finalized. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "QuotesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "item": { + "description": "A line item.", + "properties": { + "amount_discount": { + "description": "Total discount amount applied. If no discounts were applied, defaults to 0.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.", + "maxLength": 5000, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "item" + ], + "type": "string" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price used to generate the line item." + }, + "quantity": { + "description": "The quantity of products being purchased.", + "type": [ + "integer", + "null" + ] + }, + "taxes": { + "description": "The taxes applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_discount", + "amount_subtotal", + "amount_tax", + "amount_total", + "currency", + "description", + "id", + "object" + ], + "title": "LineItem", + "type": "object", + "x-expandableFields": [ + "discounts", + "price", + "taxes" + ], + "x-resourceId": "item" + }, + "invoice_setting_quote_setting": { + "description": "", + "properties": { + "days_until_due": { + "description": "Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoiceSettingQuoteSetting", + "type": "object", + "x-expandableFields": [] + }, + "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" + }, + "quotes_resource_from_quote": { + "description": "", + "properties": { + "is_revision": { + "description": "Whether this quote is a revision of a different quote.", + "type": "boolean" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + } + }, + "required": [ + "is_revision", + "quote" + ], + "title": "QuotesResourceFromQuote", + "type": "object", + "x-expandableFields": [ + "quote" + ] + }, + "quotes_resource_computed": { + "description": "", + "properties": { + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_recurring" + }, + { + "type": "null" + } + ], + "description": "The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices." + }, + "upfront": { + "$ref": "#/components/schemas/quotes_resource_upfront" + } + }, + "required": [ + "upfront" + ], + "title": "QuotesResourceComputed", + "type": "object", + "x-expandableFields": [ + "recurring", + "upfront" + ] + }, + "quotes_resource_upfront": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "line_items": { + "description": "The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "total_details" + ], + "title": "QuotesResourceUpfront", + "type": "object", + "x-expandableFields": [ + "line_items", + "total_details" + ] + }, + "quotes_resource_recurring": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "interval", + "interval_count", + "total_details" + ], + "title": "QuotesResourceRecurring", + "type": "object", + "x-expandableFields": [ + "total_details" + ] + }, + "quotes_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculate taxes", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this quote.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "QuotesResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "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." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent." + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "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." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "invoice_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": [ + "balances", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer" + }, + "type": { + "description": "The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.", + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/invoice_installments_card" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "invoice_payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "invoice_payment_method_options_acss_debit_mandate_options": { + "description": "", + "properties": { + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "line_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount for this line item, excluding all tax and discounts.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": [ + "array", + "null" + ] + }, + "discountable": { + "description": "If true, discounts will apply to this line item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_item": { + "description": "The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "line_item" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price of the line item." + }, + "proration": { + "description": "Whether this is a proration.", + "type": "boolean" + }, + "proration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_proration_details" + }, + { + "type": "null" + } + ], + "description": "Additional details for proration line items" + }, + "quantity": { + "description": "The quantity of the subscription, if the line item is a subscription or a proration.", + "type": [ + "integer", + "null" + ] + }, + "subscription": { + "description": "The subscription that the invoice item pertains to, if any.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "subscription_item": { + "description": "The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.", + "enum": [ + "invoiceitem", + "subscription" + ], + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount for this line item, excluding all tax and discounts.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "currency", + "discountable", + "id", + "livemode", + "metadata", + "object", + "period", + "proration", + "type" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "period", + "price", + "proration_details", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "line_item" + }, + "invoices_line_items_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_credited_items" + }, + { + "type": "null" + } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies." + } + }, + "title": "InvoicesLineItemsProrationDetails", + "type": "object", + "x-expandableFields": [ + "credited_items" + ] + }, + "invoices_line_items_credited_items": { + "description": "", + "properties": { + "invoice": { + "description": "Invoice containing the credited invoice line items", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_items": { + "description": "Credited invoice line items", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "invoice", + "invoice_line_items" + ], + "title": "InvoicesLineItemsCreditedItems", + "type": "object", + "x-expandableFields": [] + }, + "invoice_line_item_period": { + "description": "", + "properties": { + "end": { + "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.", + "format": "unix-time", + "type": "integer" + }, + "start": { + "description": "The start of the period. This value is inclusive.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "InvoiceLineItemPeriod", + "type": "object", + "x-expandableFields": [] + }, + "invoices_from_invoice": { + "description": "", + "properties": { + "action": { + "description": "The relation between this invoice and the cloned invoice", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + } + }, + "required": [ + "action", + "invoice" + ], + "title": "InvoicesFromInvoice", + "type": "object", + "x-expandableFields": [ + "invoice" + ] + }, + "invoices_resource_invoice_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type" + ], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [] + }, + "automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this invoice.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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": [] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Billing address." + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "Billing phone number (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "billing_details", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_intent_card_processing" + }, + "type": { + "description": "Type of the payment method for which payment is in `processing` state, one of `card`.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentProcessing", + "type": "object", + "x-expandableFields": [ + "card" + ] + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/components/schemas/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": [ + "customer_notification" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "completes_at": { + "description": "If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "affirm": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_affirm" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alipay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_alipay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bacs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bancontact" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "boleto": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_boleto" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_card" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_customer_balance" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "eps": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "fpx": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_fpx" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "giropay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_giropay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_grabpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "ideal": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_ideal" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_interac_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "klarna": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_klarna" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_konbini" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_oxxo" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "p24": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_p24" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paynow": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_paynow" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pix": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_pix" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_promptpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sofort": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_sofort" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_wechat_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ] + }, + "payment_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual", + "manual_preferred" + ], + "type": "string" + }, + "installments": { + "$ref": "#/components/schemas/payment_flows_installment_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "payment_flows_installment_options": { + "description": "", + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsInstallmentOptions", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_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, + "type": [ + "string", + "null" + ] + }, + "client": { + "description": "The client type that the end customer will pay from", + "enum": [ + "android", + "ios", + "web", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_promptpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire.", + "type": [ + "integer", + "null" + ] + }, + "expires_at": { + "description": "The timestamp at which the Pix expires.", + "type": [ + "integer", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_pix", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_p24": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_oxxo": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_link": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_konbini": { + "description": "", + "properties": { + "confirmation_number": { + "description": "An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "product_description": { + "description": "A product descriptor of up to 22 characters, which will appear to customers at the convenience store.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_konbini", + "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, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_options_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_ideal": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_grabpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_giropay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_fpx": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_fpx", + "type": "object", + "x-expandableFields": [] + }, + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "payment_method_options_customer_balance_eu_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)", + "type": [ + "boolean", + "null" + ] + }, + "request_incremental_authorization_support": { + "description": "Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments", + "mandate_options" + ] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "integer", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + "type": [ + "array", + "null" + ] + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for this PaymentIntent." + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": [ + "available_plans", + "plan" + ] + }, + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_blik": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bacs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alipay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_alipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_afterpay_clearpay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "reference": { + "description": "Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about\nthe payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_affirm": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_boleto" + }, + "card_await_notification": { + "$ref": "#/components/schemas/payment_intent_next_action_card_await_notification" + }, + "display_bank_transfer_instructions": { + "$ref": "#/components/schemas/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini" + }, + "oxxo_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_pix_display_qr_code" + }, + "promptpay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextAction", + "type": "object", + "x-expandableFields": [ + "alipay_handle_redirect", + "boleto_display_details", + "card_await_notification", + "display_bank_transfer_instructions", + "konbini_display_details", + "oxxo_display_details", + "paynow_display_qr_code", + "pix_display_qr_code", + "promptpay_display_qr_code", + "redirect_to_url", + "verify_with_microdeposits", + "wechat_pay_display_qr_code", + "wechat_pay_redirect_to_android_app", + "wechat_pay_redirect_to_ios_app" + ] + }, + "payment_intent_next_action_wechat_pay_redirect_to_ios_app": { + "description": "", + "properties": { + "native_url": { + "description": "An universal link that redirect to WeChat Pay app", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "native_url" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToIOSApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_android_app": { + "description": "", + "properties": { + "app_id": { + "description": "app_id is the APP ID registered on WeChat open platform", + "maxLength": 5000, + "type": "string" + }, + "nonce_str": { + "description": "nonce_str is a random string", + "maxLength": 5000, + "type": "string" + }, + "package": { + "description": "package is static value", + "maxLength": 5000, + "type": "string" + }, + "partner_id": { + "description": "an unique merchant ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "prepay_id": { + "description": "an unique trading ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "sign": { + "description": "A signature", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "Specifies the current time in epoch format", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToAndroidApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The data being used to generate QR code", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_data_url": { + "description": "The base64 image data for a pre-generated QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionWechatPayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_promptpay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The PNG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The SVG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPromptpayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_pix_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "expires_at": { + "description": "The date (unix timestamp) when the PIX expires.", + "type": "integer" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted pix instructions page, which allows customers to view the pix QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render png QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render svg QR code", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentIntentNextActionPixDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_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, + "type": [ + "string", + "null" + ] + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_oxxo_details": { + "description": "", + "properties": { + "expires_after": { + "description": "The timestamp after which the OXXO voucher expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "hosted_voucher_url": { + "description": "The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "OXXO reference number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp at which the pending Konbini payment expires.", + "format": "unix-time", + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "stores": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_stores" + } + }, + "required": [ + "expires_at", + "stores" + ], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": [ + "stores" + ] + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_familymart" + }, + { + "type": "null" + } + ], + "description": "FamilyMart instruction details." + }, + "lawson": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_lawson" + }, + { + "type": "null" + } + ], + "description": "Lawson instruction details." + }, + "ministop": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_ministop" + }, + { + "type": "null" + } + ], + "description": "Ministop instruction details." + }, + "seicomart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_seicomart" + }, + { + "type": "null" + } + ], + "description": "Seicomart instruction details." + } + }, + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": [ + "familymart", + "lawson", + "ministop", + "seicomart" + ] + }, + "payment_intent_next_action_konbini_seicomart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_seicomart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_ministop": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_ministop", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_lawson": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_lawson", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_familymart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_familymart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_bank_transfer_instructions": { + "description": "", + "properties": { + "amount_remaining": { + "description": "The remaining amount that needs to be transferred to complete the payment.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": [ + "string", + "null" + ] + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund the customer balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "hosted_instructions_url": { + "description": "A link to a hosted page that guides your customer through completing the transfer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of bank transfer", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": [ + "financial_addresses" + ] + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "iban": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_iban_record" + }, + "sort_code": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_sort_code_record" + }, + "spei": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_spei_record" + }, + "supported_networks": { + "description": "The payment networks supported by this FinancialAddress", + "items": { + "enum": [ + "bacs", + "fps", + "sepa", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": [ + "iban", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "zengin": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_zengin_record" + } + }, + "required": [ + "type" + ], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": [ + "iban", + "sort_code", + "spei", + "zengin" + ] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "The bank account type. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_code": { + "description": "The bank code of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "The bank name of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "The branch code of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_name": { + "description": "The branch name of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "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": [ + "bank_code", + "bank_name", + "clabe" + ], + "title": "FundingInstructionsBankTransferSpeiRecord", + "type": "object", + "x-expandableFields": [] + }, + "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_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" + }, + "sort_code": { + "description": "The six-digit sort code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number", + "sort_code" + ], + "title": "FundingInstructionsBankTransferSortCodeRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_iban_record": { + "description": "Iban Records contain E.U. bank account details per the SEPA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "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_name", + "bic", + "country", + "iban" + ], + "title": "FundingInstructionsBankTransferIbanRecord", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_card_await_notification": { + "description": "", + "properties": { + "charge_attempt_at": { + "description": "The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_boleto": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp after which the boleto expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "hosted_voucher_url": { + "description": "The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "The boleto number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "pdf": { + "description": "The URL to the downloadable boleto voucher PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "native_url": { + "description": "The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_payment_intent": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculates compatible payment methods", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsAutomaticPaymentMethodsPaymentIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "tip": { + "$ref": "#/components/schemas/payment_flows_amount_details_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": [ + "tip" + ] + }, + "payment_flows_amount_details_resource_tip": { + "description": "", + "properties": { + "amount": { + "description": "Portion of the amount that corresponds to a tip.", + "type": "integer" + } + }, + "title": "PaymentFlowsAmountDetailsResourceTip", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" + }, + "ideal": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_klarna" + }, + "link": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" + }, + "type": { + "description": "The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "SetupAttemptPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "ideal", + "klarna", + "link", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "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, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "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_link": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_link", + "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_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + } + }, + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "generated_card" + ] + }, + "setup_attempt_payment_method_details_card": { + "description": "", + "properties": { + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this authorization used 3D Secure authentication." + } + }, + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "three_d_secure" + ] + }, + "setup_attempt_payment_method_details_boleto": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_blik", + "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, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "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_au_becs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_acss_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_promptpay": { + "description": "", + "properties": {}, + "title": "payment_method_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pix": { + "description": "", + "properties": {}, + "title": "payment_method_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paynow": { + "description": "", + "properties": {}, + "title": "payment_method_paynow", + "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", + "volkswagen_bank", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_oxxo": { + "description": "", + "properties": {}, + "title": "payment_method_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_konbini": { + "description": "", + "properties": {}, + "title": "payment_method_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" + }, + { + "type": "null" + } + ], + "description": "The customer's date of birth, if provided." + } + }, + "title": "payment_method_klarna", + "type": "object", + "x-expandableFields": [ + "dob" + ] + }, + "payment_flows_private_payment_methods_klarna_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank, if the bank was provided.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_grabpay": { + "description": "", + "properties": {}, + "title": "payment_method_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_giropay": { + "description": "", + "properties": {}, + "title": "payment_method_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + } + }, + "required": [ + "bank" + ], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_present": { + "description": "", + "properties": {}, + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_checks" + }, + { + "type": "null" + } + ], + "description": "Checks on Card address and CVC if provided." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_generated_card" + }, + { + "type": "null" + } + ], + "description": "Details of the original PaymentMethod that created this object." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about card networks that can be used to process the payment." + }, + "three_d_secure_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_usage" + }, + { + "type": "null" + } + ], + "description": "Contains details on how this Card may be used for 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "last4" + ], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_google_pay", + "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_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_usage": { + "description": "", + "properties": { + "supported": { + "description": "Whether 3D Secure is supported on this card.", + "type": "boolean" + } + }, + "required": [ + "supported" + ], + "title": "three_d_secure_usage", + "type": "object", + "x-expandableFields": [] + }, + "networks": { + "description": "", + "properties": { + "available": { + "description": "All available networks for the card.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "The preferred network for the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "available" + ], + "title": "networks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_generated_card": { + "description": "", + "properties": { + "charge": { + "description": "The charge that created this object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/card_generated_from_payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Transaction-specific details of the payment method used in the payment." + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": [ + "payment_method_details", + "setup_attempt" + ] + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "type": { + "description": "The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "card_generated_from_payment_method_details", + "type": "object", + "x-expandableFields": [ + "card_present" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "Uniquely identifies the customer tax id (CNPJ or CPF)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_blik": { + "description": "", + "properties": {}, + "title": "payment_method_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_bacs_debit", + "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, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_alipay": { + "description": "", + "properties": {}, + "title": "PaymentFlowsPrivatePaymentMethodsAlipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_afterpay_clearpay": { + "description": "", + "properties": {}, + "title": "payment_method_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "institution_number": { + "description": "Institution number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "deleted_coupon": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "coupon" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCoupon", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_coupon" + }, + "subscription_billing_thresholds": { + "description": "", + "properties": { + "amount_gte": { + "description": "Monetary threshold that triggers the subscription to create an invoice", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "schedules_phase_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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": { + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "The quantity of the invoice item.", + "type": [ + "integer", + "null" + ] + }, + "tax_rates": { + "description": "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": [ + "price", + "tax_rates" + ] + }, + "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 subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule's default invoice settings." + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + } + }, + "required": [ + "billing_cycle_anchor" + ], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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": [] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "expires_at": { + "description": "The point after which the changes reflected by this update will be discarded and no longer applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription_items": { + "description": "List of subscription items, each with an attached plan, that will be set if the update is applied.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "expires_at" + ], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": [ + "subscription_items" + ] + }, + "subscription_item": { + "description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_item" + ], + "type": "string" + }, + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "description": "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "subscription": { + "description": "The `subscription` this `subscription_item` belongs to.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "created", + "id", + "metadata", + "object", + "price", + "subscription" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ], + "x-resourceId": "subscription_item" + }, + "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": [] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to invoices created by the subscription." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + }, + "save_default_payment_method": { + "description": "Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.", + "enum": [ + "off", + "on_subscription", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription." + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription." + } + }, + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_mandate_options_card" + }, + "network": { + "description": "Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": [ + "integer", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_pause_collection": { + "description": "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.", + "properties": { + "behavior": { + "description": "The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.", + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "behavior" + ], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [] + }, + "subscription_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this subscription.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Default options for invoice PDF rendering for this customer." + } + }, + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": [ + "custom_fields", + "default_payment_method", + "rendering_options" + ] + }, + "cash_balance": { + "description": "A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": [ + "object", + "null" + ] + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "cash_balance" + ], + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/customer_balance_customer_balance_settings" + } + }, + "required": [ + "customer", + "livemode", + "object", + "settings" + ], + "title": "cash_balance", + "type": "object", + "x-expandableFields": [ + "settings" + ], + "x-resourceId": "cash_balance" + }, + "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": [] + }, + "payment_pages_checkout_session_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentPagesCheckoutSessionInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_links_resource_completion_behavior_redirect": { + "description": "", + "properties": { + "url": { + "description": "The URL the customer will be redirected to after the purchase is complete.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "PaymentLinksResourceCompletionBehaviorRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_confirmation_page": { + "description": "", + "properties": { + "custom_message": { + "description": "The custom message that is displayed to the customer after the purchase is complete.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourceCompletionBehaviorConfirmationPage", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_dropdown_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentLinksResourceCustomFieldsDropdownOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown_option" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "PaymentLinksResourceCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_links_resource_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentLinksResourceCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "custom_fields": { + "description": "A list of up to 4 custom fields to be displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentLinksResourceInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_links_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The connected account receiving the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "PaymentLinksResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "payment_links_resource_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceTaxIdCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentLinksResourceSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the Shipping Rate to use for this shipping option.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentLinksResourceShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_links_resource_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentLinksResourceShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a phone number will be collected during checkout.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourcePhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_payment_intent_data": { + "description": "", + "properties": { + "capture_method": { + "description": "Indicates when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with the payment method collected during checkout.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourcePaymentIntentData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Enable creating an invoice on successful payment.", + "type": "boolean" + }, + "invoice_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_settings" + }, + { + "type": "null" + } + ], + "description": "Configuration for the invoice. Default invoice values will be used if unspecified." + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_links_resource_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentLinksResourceCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_links_resource_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_label" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentLinksResourceCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label" + ] + }, + "payment_links_resource_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications.", + "enum": [ + "auto", + "none", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.", + "enum": [ + "none", + "required", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourceConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, tax will be calculated automatically using the customer's location.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" + }, + "redirect": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" + }, + "type": { + "description": "The specified behavior after the purchase is complete.", + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceAfterCompletion", + "type": "object", + "x-expandableFields": [ + "hosted_confirmation", + "redirect" + ] + }, + "checkout_acss_debit_mandate_options": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "CheckoutAcssDebitMandateOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_installments_options": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates if installments are enabled", + "type": "boolean" + } + }, + "title": "CheckoutCardInstallmentsOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_customer_balance_bank_transfer_payment_method_options": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutCustomerBalanceBankTransferPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "checkout_us_bank_account_payment_method_options": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutUsBankAccountPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "checkout_sofort_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutSofortPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_sepa_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutSepaDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_pix_payment_method_options": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds after which Pix payment will expire.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "CheckoutPixPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paynow_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutPaynowPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_p24_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutP24PaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_oxxo_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutOxxoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_konbini_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.", + "type": [ + "integer", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutKonbiniPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_klarna_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutKlarnaPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_ideal_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutIdealPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_grab_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGrabPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_giropay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGiropayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_fpx_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutFpxPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_eps_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutEpsPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_customer_balance_payment_method_options": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/checkout_customer_balance_bank_transfer_payment_method_options" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutCustomerBalancePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "checkout_card_payment_method_options": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/checkout_card_installments_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "checkout_boleto_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutBoletoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bancontact_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutBancontactPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bacs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutBacsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_au_becs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAuBecsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_alipay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAlipayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_afterpay_clearpay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAfterpayClearpayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_affirm_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAffirmPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_acss_debit_payment_method_options": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account. Returned when the Session is in `setup` mode.", + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/checkout_acss_debit_mandate_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutAcssDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_pages_checkout_session_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "payment_pages_checkout_session_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": [ + "integer", + "null" + ] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "PaymentPagesCheckoutSessionTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "payment_pages_checkout_session_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionTaxIDCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The shipping rate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentPagesCheckoutSessionShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_pages_checkout_session_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after discounts and taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this order.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "PaymentPagesCheckoutSessionShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "payment_pages_checkout_session_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentPagesCheckoutSessionShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether phone number collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionPhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "checkout_session_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" + }, + "affirm": { + "$ref": "#/components/schemas/checkout_affirm_payment_method_options" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/checkout_afterpay_clearpay_payment_method_options" + }, + "alipay": { + "$ref": "#/components/schemas/checkout_alipay_payment_method_options" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/checkout_au_becs_debit_payment_method_options" + }, + "bacs_debit": { + "$ref": "#/components/schemas/checkout_bacs_debit_payment_method_options" + }, + "bancontact": { + "$ref": "#/components/schemas/checkout_bancontact_payment_method_options" + }, + "boleto": { + "$ref": "#/components/schemas/checkout_boleto_payment_method_options" + }, + "card": { + "$ref": "#/components/schemas/checkout_card_payment_method_options" + }, + "customer_balance": { + "$ref": "#/components/schemas/checkout_customer_balance_payment_method_options" + }, + "eps": { + "$ref": "#/components/schemas/checkout_eps_payment_method_options" + }, + "fpx": { + "$ref": "#/components/schemas/checkout_fpx_payment_method_options" + }, + "giropay": { + "$ref": "#/components/schemas/checkout_giropay_payment_method_options" + }, + "grabpay": { + "$ref": "#/components/schemas/checkout_grab_pay_payment_method_options" + }, + "ideal": { + "$ref": "#/components/schemas/checkout_ideal_payment_method_options" + }, + "klarna": { + "$ref": "#/components/schemas/checkout_klarna_payment_method_options" + }, + "konbini": { + "$ref": "#/components/schemas/checkout_konbini_payment_method_options" + }, + "oxxo": { + "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" + }, + "p24": { + "$ref": "#/components/schemas/checkout_p24_payment_method_options" + }, + "paynow": { + "$ref": "#/components/schemas/checkout_paynow_payment_method_options" + }, + "pix": { + "$ref": "#/components/schemas/checkout_pix_payment_method_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/checkout_sepa_debit_payment_method_options" + }, + "sofort": { + "$ref": "#/components/schemas/checkout_sofort_payment_method_options" + }, + "us_bank_account": { + "$ref": "#/components/schemas/checkout_us_bank_account_payment_method_options" + } + }, + "title": "CheckoutSessionPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "payment_link": { + "description": "A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.\n\nWhen a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)", + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "$ref": "#/components/schemas/payment_links_resource_after_completion" + }, + "allow_promotion_codes": { + "description": "Whether user redeemable promotion codes are enabled.", + "type": "boolean" + }, + "application_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.", + "type": [ + "integer", + "null" + ] + }, + "application_fee_percent": { + "description": "This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_links_resource_automatic_tax" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration to gather active consent from customers." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_links_resource_custom_text" + }, + "customer_creation": { + "description": "Configuration for Customer creation during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Configuration for creating invoice for payment mode payment links." + }, + "line_items": { + "description": "The line items representing what is being sold.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_link" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_intent_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_payment_intent_data" + }, + { + "type": "null" + } + ], + "description": "Indicates the parameters to be passed to PaymentIntent creation during checkout." + }, + "payment_method_collection": { + "description": "Configuration for collecting a payment method during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "Configuration for collecting the customer's shipping address." + }, + "shipping_options": { + "description": "The shipping rate options applied to the session.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_shipping_option" + }, + "type": "array" + }, + "submit_type": { + "description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_subscription_data" + }, + { + "type": "null" + } + ], + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`." + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_links_resource_tax_id_collection" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to." + }, + "url": { + "description": "The public URL that can be shared with customers.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "active", + "after_completion", + "allow_promotion_codes", + "automatic_tax", + "billing_address_collection", + "currency", + "custom_fields", + "custom_text", + "customer_creation", + "id", + "livemode", + "metadata", + "object", + "payment_method_collection", + "phone_number_collection", + "shipping_options", + "submit_type", + "tax_id_collection", + "url" + ], + "title": "PaymentLink", + "type": "object", + "x-expandableFields": [ + "after_completion", + "automatic_tax", + "consent_collection", + "custom_fields", + "custom_text", + "invoice_creation", + "line_items", + "on_behalf_of", + "payment_intent_data", + "phone_number_collection", + "shipping_address_collection", + "shipping_options", + "subscription_data", + "tax_id_collection", + "transfer_data" + ], + "x-resourceId": "payment_link" + }, + "payment_pages_checkout_session_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether invoice creation is enabled for the Checkout Session.", + "type": "boolean" + }, + "invoice_data": { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_settings" + } + }, + "required": [ + "enabled", + "invoice_data" + ], + "title": "PaymentPagesCheckoutSessionInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_pages_checkout_session_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022." + }, + "email": { + "description": "The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "The customer's phone number after a completed Checkout Session.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_exempt": { + "description": "The customer’s tax exempt status after a completed Checkout Session.", + "enum": [ + "exempt", + "none", + "reverse", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_ids": { + "description": "The customer’s tax IDs after a completed Checkout Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomerDetails", + "type": "object", + "x-expandableFields": [ + "address", + "tax_ids" + ] + }, + "payment_pages_checkout_session_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentPagesCheckoutSessionCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_pages_checkout_session_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_label" + }, + "numeric": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=numeric` fields." + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=text` fields." + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label", + "numeric", + "text" + ] + }, + "payment_pages_checkout_session_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants.", + "enum": [ + "auto", + "none", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If set to `required`, it requires customers to accept the terms of service before being able to pay.", + "enum": [ + "none", + "required", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent": { + "description": "", + "properties": { + "promotions": { + "description": "If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.", + "enum": [ + "opt_in", + "opt_out", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.", + "enum": [ + "accepted", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "PaymentPagesCheckoutSessionConsent", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether automatic tax is enabled for the session", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this session.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_after_expiration": { + "description": "", + "properties": { + "recovery": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" + }, + { + "type": "null" + } + ], + "description": "When set, configuration used to recover the Checkout Session on expiry." + } + }, + "title": "PaymentPagesCheckoutSessionAfterExpiration", + "type": "object", + "x-expandableFields": [ + "recovery" + ] + } + } + }, + "definitions": {} +} \ No newline at end of file diff --git a/generated-integrations/stripe/src/index.ts b/generated-integrations/stripe/src/index.ts new file mode 100644 index 00000000000..28592ea050d --- /dev/null +++ b/generated-integrations/stripe/src/index.ts @@ -0,0 +1,28 @@ +import { getTriggerRun } from "@trigger.dev/sdk"; +import type { TriggerEvent } from "@trigger.dev/sdk"; +import { z } from "zod"; +import { CheckoutSessionCompletedOutput, Prettify } from "./types"; + +const checkoutSessionCompletedEventSchema = z.object({ "after_expiration": z.union([z.any(), z.null()]).describe("When set, provides configuration for actions to take if this Checkout Session expires.").optional(), "allow_promotion_codes": z.union([z.boolean().describe("Enables user redeemable promotion codes."), z.null().describe("Enables user redeemable promotion codes.")]).describe("Enables user redeemable promotion codes.").optional(), "amount_subtotal": z.union([z.number().int().describe("Total of all items before discounts or taxes are applied."), z.null().describe("Total of all items before discounts or taxes are applied.")]).describe("Total of all items before discounts or taxes are applied.").optional(), "amount_total": z.union([z.number().int().describe("Total of all items after discounts and taxes are applied."), z.null().describe("Total of all items after discounts and taxes are applied.")]).describe("Total of all items after discounts and taxes are applied.").optional(), "automatic_tax": z.any(), "billing_address_collection": z.union([z.literal("auto"), z.literal("required"), z.literal(null)]).describe("Describes whether Checkout should collect the customer's billing address.").optional(), "cancel_url": z.union([z.string().max(5000).describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website."), z.null().describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.")]).describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.").optional(), "client_reference_id": z.union([z.string().max(5000).describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems."), z.null().describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.")]).describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.").optional(), "consent": z.union([z.any(), z.null()]).describe("Results of `consent_collection` for this session.").optional(), "consent_collection": z.union([z.any(), z.null()]).describe("When set, provides configuration for the Checkout Session to gather active consent from customers.").optional(), "created": z.number().int().describe("Time at which the object was created. Measured in seconds since the Unix epoch."), "currency": z.union([z.string().describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies)."), z.null().describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).")]).describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).").optional(), "custom_fields": z.array(z.any()).describe("Collect additional information from your customer using custom fields. Up to 2 fields are supported."), "custom_text": z.any(), "customer": z.union([z.string().max(5000), z.any(), z.any(), z.null()]).describe("The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.").optional(), "customer_creation": z.union([z.literal("always"), z.literal("if_required"), z.literal(null)]).describe("Configure whether a Checkout Session creates a Customer when the Checkout Session completes.").optional(), "customer_details": z.union([z.any(), z.null()]).describe("The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.").optional(), "customer_email": z.union([z.string().max(5000).describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute."), z.null().describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.")]).describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.").optional(), "expires_at": z.number().int().describe("The timestamp at which the Checkout Session will expire."), "id": z.string().max(5000).describe("Unique identifier for the object."), "invoice": z.union([z.string().max(5000), z.any(), z.null()]).describe("ID of the invoice created by the Checkout Session, if it exists.").optional(), "invoice_creation": z.union([z.any(), z.null()]).describe("Details on the state of invoice creation for the Checkout Session.").optional(), "line_items": z.object({ "data": z.array(z.any()).describe("Details about each object."), "has_more": z.boolean().describe("True if this list has another page of items after this one that can be fetched."), "object": z.enum(["list"]).describe("String representing the object's type. Objects of the same type share the same value. Always has the value `list`."), "url": z.string().max(5000).describe("The URL where this list can be accessed.") }).describe("The line items purchased by the customer.").optional(), "livemode": z.boolean().describe("Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode."), "locale": z.union([z.literal("auto"), z.literal("bg"), z.literal("cs"), z.literal("da"), z.literal("de"), z.literal("el"), z.literal("en"), z.literal("en-GB"), z.literal("es"), z.literal("es-419"), z.literal("et"), z.literal("fi"), z.literal("fil"), z.literal("fr"), z.literal("fr-CA"), z.literal("hr"), z.literal("hu"), z.literal("id"), z.literal("it"), z.literal("ja"), z.literal("ko"), z.literal("lt"), z.literal("lv"), z.literal("ms"), z.literal("mt"), z.literal("nb"), z.literal("nl"), z.literal("pl"), z.literal("pt"), z.literal("pt-BR"), z.literal("ro"), z.literal("ru"), z.literal("sk"), z.literal("sl"), z.literal("sv"), z.literal("th"), z.literal("tr"), z.literal("vi"), z.literal("zh"), z.literal("zh-HK"), z.literal("zh-TW"), z.literal(null)]).describe("The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.").optional(), "metadata": z.union([z.record(z.string().max(500)).describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format."), z.null().describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.")]).describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.").optional(), "mode": z.enum(["payment", "setup", "subscription"]).describe("The mode of the Checkout Session."), "object": z.enum(["checkout.session"]).describe("String representing the object's type. Objects of the same type share the same value."), "payment_intent": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the PaymentIntent for Checkout Sessions in `payment` mode.").optional(), "payment_link": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the Payment Link that created this Session.").optional(), "payment_method_collection": z.union([z.literal("always"), z.literal("if_required"), z.literal(null)]).describe("Configure whether a Checkout Session should collect a payment method.").optional(), "payment_method_options": z.union([z.any(), z.null()]).describe("Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.").optional(), "payment_method_types": z.array(z.string().max(5000)).describe("A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept."), "payment_status": z.enum(["no_payment_required", "paid", "unpaid"]).describe("The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order."), "phone_number_collection": z.any().optional(), "recovered_from": z.union([z.string().max(5000).describe("The ID of the original expired Checkout Session that triggered the recovery flow."), z.null().describe("The ID of the original expired Checkout Session that triggered the recovery flow.")]).describe("The ID of the original expired Checkout Session that triggered the recovery flow.").optional(), "setup_intent": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the SetupIntent for Checkout Sessions in `setup` mode.").optional(), "shipping_address_collection": z.union([z.any(), z.null()]).describe("When set, provides configuration for Checkout to collect a shipping address from a customer.").optional(), "shipping_cost": z.union([z.any(), z.null()]).describe("The details of the customer cost of shipping, including the customer chosen ShippingRate.").optional(), "shipping_details": z.union([z.any(), z.null()]).describe("Shipping information for this Checkout Session.").optional(), "shipping_options": z.array(z.any()).describe("The shipping rate options applied to this Session."), "status": z.union([z.literal("complete"), z.literal("expired"), z.literal("open"), z.literal(null)]).describe("The status of the Checkout Session, one of `open`, `complete`, or `expired`.").optional(), "submit_type": z.union([z.literal("auto"), z.literal("book"), z.literal("donate"), z.literal("pay"), z.literal(null)]).describe("Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.").optional(), "subscription": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the subscription for Checkout Sessions in `subscription` mode.").optional(), "success_url": z.string().max(5000).describe("The URL the customer will be directed to after the payment or\nsubscription creation is successful."), "tax_id_collection": z.any().optional(), "total_details": z.union([z.any(), z.null()]).describe("Tax and discount details for the computed total amount.").optional(), "url": z.union([z.string().max(5000).describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active."), z.null().describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.")]).describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.").optional() }).describe("A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).") + +/** A form response was submitted */ +function checkoutSessionCompletedEvent( + +): TriggerEvent { + return { + metadata: { + type: "INTEGRATION_WEBHOOK", + service: "stripe", + name: "checkout.session.completed", + key: `checkout.session.completed`, + filter: { + service: ["stripe"], + event: ["checkout.session.completed"], + }, + source: undefined, + }, + schema: checkoutSessionCompletedEventSchema, + }; +} + +export const events = { checkoutSessionCompletedEvent }; diff --git a/generated-integrations/stripe/src/types.ts b/generated-integrations/stripe/src/types.ts new file mode 100644 index 00000000000..c31887fde59 --- /dev/null +++ b/generated-integrations/stripe/src/types.ts @@ -0,0 +1,11668 @@ +export type StripeTypes = CheckoutSessionCompletedOutput +/** + * A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + */ +export type FileFileLinkList = ({ + /** + * Details about each object. + */ + data: FileLink[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} | null) +export type Polymorphic = (BankAccount | Card) +/** + * A list of refunds that have been applied to the charge. + */ +export type RefundList = ({ + /** + * Details about each object. + */ + data: Refund[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} | null) +export type Polymorphic1 = (BankAccount | Card | Source) + +/** + * A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) + * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a + * new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference + * to the [Customer](https://stripe.com/docs/api/customers), and either the successful + * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + * [Subscription](https://stripe.com/docs/api/subscriptions). + * + * You can create a Checkout Session on your server and redirect to its URL + * to begin Checkout. + * + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). + */ +export interface CheckoutSessionCompletedOutput { + /** + * When set, provides configuration for actions to take if this Checkout Session expires. + */ + after_expiration?: (PaymentPagesCheckoutSessionAfterExpiration | null) + /** + * Enables user redeemable promotion codes. + */ + allow_promotion_codes?: (boolean | null) + /** + * Total of all items before discounts or taxes are applied. + */ + amount_subtotal?: (number | null) + /** + * Total of all items after discounts and taxes are applied. + */ + amount_total?: (number | null) + automatic_tax: PaymentPagesCheckoutSessionAutomaticTax + /** + * Describes whether Checkout should collect the customer's billing address. + */ + billing_address_collection?: ("auto" | "required" | null) + /** + * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + */ + cancel_url?: (string | null) + /** + * A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * Session with your internal systems. + */ + client_reference_id?: (string | null) + /** + * Results of `consent_collection` for this session. + */ + consent?: (PaymentPagesCheckoutSessionConsent | null) + /** + * When set, provides configuration for the Checkout Session to gather active consent from customers. + */ + consent_collection?: (PaymentPagesCheckoutSessionConsentCollection | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency?: (string | null) + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields: PaymentPagesCheckoutSessionCustomFields[] + custom_text: PaymentPagesCheckoutSessionCustomText + /** + * The ID of the customer for this Session. + * For Checkout Sessions in `payment` or `subscription` mode, Checkout + * will create a new customer object based on information provided + * during the payment flow unless an existing customer was provided when + * the Session was created. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + */ + customer_creation?: ("always" | "if_required" | null) + /** + * The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. + */ + customer_details?: (PaymentPagesCheckoutSessionCustomerDetails | null) + /** + * If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once the payment flow is + * complete, use the `customer` attribute. + */ + customer_email?: (string | null) + /** + * The timestamp at which the Checkout Session will expire. + */ + expires_at: number + /** + * Unique identifier for the object. + */ + id: string + /** + * ID of the invoice created by the Checkout Session, if it exists. + */ + invoice?: (string | Invoice | null) + /** + * Details on the state of invoice creation for the Checkout Session. + */ + invoice_creation?: (PaymentPagesCheckoutSessionInvoiceCreation | null) + line_items?: PaymentPagesCheckoutSessionListLineItems + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + */ + locale?: ("auto" | "bg" | "cs" | "da" | "de" | "el" | "en" | "en-GB" | "es" | "es-419" | "et" | "fi" | "fil" | "fr" | "fr-CA" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "ms" | "mt" | "nb" | "nl" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sl" | "sv" | "th" | "tr" | "vi" | "zh" | "zh-HK" | "zh-TW" | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * The mode of the Checkout Session. + */ + mode: ("payment" | "setup" | "subscription") + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "checkout.session" + /** + * The ID of the PaymentIntent for Checkout Sessions in `payment` mode. + */ + payment_intent?: (string | PaymentIntent | null) + /** + * The ID of the Payment Link that created this Session. + */ + payment_link?: (string | PaymentLink | null) + /** + * Configure whether a Checkout Session should collect a payment method. + */ + payment_method_collection?: ("always" | "if_required" | null) + /** + * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + */ + payment_method_options?: (CheckoutSessionPaymentMethodOptions | null) + /** + * A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ + payment_method_types: string[] + /** + * The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + * You can use this value to decide when to fulfill your customer's order. + */ + payment_status: ("no_payment_required" | "paid" | "unpaid") + phone_number_collection?: PaymentPagesCheckoutSessionPhoneNumberCollection + /** + * The ID of the original expired Checkout Session that triggered the recovery flow. + */ + recovered_from?: (string | null) + /** + * The ID of the SetupIntent for Checkout Sessions in `setup` mode. + */ + setup_intent?: (string | SetupIntent | null) + /** + * When set, provides configuration for Checkout to collect a shipping address from a customer. + */ + shipping_address_collection?: (PaymentPagesCheckoutSessionShippingAddressCollection | null) + /** + * The details of the customer cost of shipping, including the customer chosen ShippingRate. + */ + shipping_cost?: (PaymentPagesCheckoutSessionShippingCost | null) + /** + * Shipping information for this Checkout Session. + */ + shipping_details?: (Shipping | null) + /** + * The shipping rate options applied to this Session. + */ + shipping_options: PaymentPagesCheckoutSessionShippingOption[] + /** + * The status of the Checkout Session, one of `open`, `complete`, or `expired`. + */ + status?: ("complete" | "expired" | "open" | null) + /** + * Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + * in `subscription` or `setup` mode. + */ + submit_type?: ("auto" | "book" | "donate" | "pay" | null) + /** + * The ID of the subscription for Checkout Sessions in `subscription` mode. + */ + subscription?: (string | Subscription | null) + /** + * The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ + success_url: string + tax_id_collection?: PaymentPagesCheckoutSessionTaxIDCollection + /** + * Tax and discount details for the computed total amount. + */ + total_details?: (PaymentPagesCheckoutSessionTotalDetails | null) + /** + * The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ + url?: (string | null) +} +export interface PaymentPagesCheckoutSessionAfterExpiration { + /** + * When set, configuration used to recover the Checkout Session on expiry. + */ + recovery?: (PaymentPagesCheckoutSessionAfterExpirationRecovery | null) +} +export interface PaymentPagesCheckoutSessionAfterExpirationRecovery { + /** + * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + */ + allow_promotion_codes: boolean + /** + * If `true`, a recovery url will be generated to recover this Checkout Session if it + * expires before a transaction is completed. It will be attached to the + * Checkout Session object upon expiration. + */ + enabled: boolean + /** + * The timestamp at which the recovery URL will expire. + */ + expires_at?: (number | null) + /** + * URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session + */ + url?: (string | null) +} +export interface PaymentPagesCheckoutSessionAutomaticTax { + /** + * Indicates whether automatic tax is enabled for the session + */ + enabled: boolean + /** + * The status of the most recent automated tax calculation for this session. + */ + status?: ("complete" | "failed" | "requires_location_inputs" | null) +} +export interface PaymentPagesCheckoutSessionConsent { + /** + * If `opt_in`, the customer consents to receiving promotional communications + * from the merchant about this Checkout Session. + */ + promotions?: ("opt_in" | "opt_out" | null) + /** + * If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + */ + terms_of_service?: ("accepted" | null) +} +export interface PaymentPagesCheckoutSessionConsentCollection { + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + * Session will determine whether to display an option to opt into promotional communication + * from the merchant depending on the customer's locale. Only available to US merchants. + */ + promotions?: ("auto" | "none" | null) + /** + * If set to `required`, it requires customers to accept the terms of service before being able to pay. + */ + terms_of_service?: ("none" | "required" | null) +} +export interface PaymentPagesCheckoutSessionCustomFields { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown?: (PaymentPagesCheckoutSessionCustomFieldsDropdown | null) + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string + label: PaymentPagesCheckoutSessionCustomFieldsLabel + /** + * Configuration for `type=numeric` fields. + */ + numeric?: (PaymentPagesCheckoutSessionCustomFieldsNumeric | null) + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional: boolean + /** + * Configuration for `type=text` fields. + */ + text?: (PaymentPagesCheckoutSessionCustomFieldsText | null) + /** + * The type of the field. + */ + type: ("dropdown" | "numeric" | "text") +} +export interface PaymentPagesCheckoutSessionCustomFieldsDropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: PaymentPagesCheckoutSessionCustomFieldsOption[] + /** + * The option selected by the customer. This will be the `value` for the option. + */ + value?: (string | null) +} +export interface PaymentPagesCheckoutSessionCustomFieldsOption { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string +} +export interface PaymentPagesCheckoutSessionCustomFieldsLabel { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom?: (string | null) + /** + * The type of the label. + */ + type: "custom" +} +export interface PaymentPagesCheckoutSessionCustomFieldsNumeric { + /** + * The value entered by the customer, containing only digits. + */ + value?: (string | null) +} +export interface PaymentPagesCheckoutSessionCustomFieldsText { + /** + * The value entered by the customer. + */ + value?: (string | null) +} +export interface PaymentPagesCheckoutSessionCustomText { + /** + * Custom text that should be displayed alongside shipping address collection. + */ + shipping_address?: (PaymentPagesCheckoutSessionCustomTextPosition | null) + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ + submit?: (PaymentPagesCheckoutSessionCustomTextPosition | null) +} +export interface PaymentPagesCheckoutSessionCustomTextPosition { + /** + * Text may be up to 1000 characters in length. + */ + message: string +} +/** + * This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. + * + * Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment). + */ +export interface Customer { + /** + * The customer's address. + */ + address?: (Address | null) + /** + * Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. + */ + balance?: number + /** + * The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. + */ + cash_balance?: (CashBalance | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + */ + currency?: (string | null) + /** + * ID of the default payment source for the customer. + * + * If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + */ + default_source?: (string | BankAccount | Card | Source | null) + /** + * When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. + * + * If an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`. + */ + delinquent?: (boolean | null) + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Describes the current discount active on the customer, if there is one. + */ + discount?: (Discount | null) + /** + * The customer's email address. + */ + email?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. + */ + invoice_credit_balance?: { + [k: string]: number + } + /** + * The prefix for the customer used to generate unique invoice numbers. + */ + invoice_prefix?: (string | null) + invoice_settings?: InvoiceSettingCustomerSetting + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: { + [k: string]: string + } + /** + * The customer's full name or business name. + */ + name?: (string | null) + /** + * The suffix of the customer's next invoice number, e.g., 0001. + */ + next_invoice_sequence?: number + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "customer" + /** + * The customer's phone number. + */ + phone?: (string | null) + /** + * The customer's preferred locales (languages), ordered by preference. + */ + preferred_locales?: (string[] | null) + /** + * Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + */ + shipping?: (Shipping | null) + sources?: ApmsSourcesSourceList + subscriptions?: SubscriptionList + tax?: CustomerTax + /** + * Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**. + */ + tax_exempt?: ("exempt" | "none" | "reverse" | null) + tax_ids?: TaxIDsList + /** + * ID of the test clock this customer belongs to. + */ + test_clock?: (string | TestClock | null) +} +export interface Address { + /** + * City, district, suburb, town, or village. + */ + city?: (string | null) + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: (string | null) + /** + * Address line 1 (e.g., street, PO Box, or company name). + */ + line1?: (string | null) + /** + * Address line 2 (e.g., apartment, suite, unit, or building). + */ + line2?: (string | null) + /** + * ZIP or postal code. + */ + postal_code?: (string | null) + /** + * State, county, province, or region. + */ + state?: (string | null) +} +/** + * A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ +export interface CashBalance { + /** + * A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + available?: ({ + [k: string]: number + } | null) + /** + * The ID of the customer whose cash balance this object represents. + */ + customer: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "cash_balance" + settings: CustomerBalanceCustomerBalanceSettings +} +export interface CustomerBalanceCustomerBalanceSettings { + /** + * The configuration for how funds that land in the customer cash balance are reconciled. + */ + reconciliation_mode: ("automatic" | "manual") + /** + * A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + */ + using_merchant_default: boolean +} +/** + * These bank accounts are payment methods on `Customer` objects. + * + * On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer + * destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). + * They can be bank accounts or debit cards as well, and are documented in the links above. + * + * Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers). + */ +export interface BankAccount { + /** + * The ID of the account that the bank account is associated with. + */ + account?: (string | Account | null) + /** + * The name of the person or business that owns the bank account. + */ + account_holder_name?: (string | null) + /** + * The type of entity that holds the account. This can be either `individual` or `company`. + */ + account_holder_type?: (string | null) + /** + * The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + */ + account_type?: (string | null) + /** + * A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + */ + available_payout_methods?: (("instant" | "standard")[] | null) + /** + * Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + */ + bank_name?: (string | null) + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ + currency: string + /** + * The ID of the customer that the bank account is associated with. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * Whether this bank account is the default external account for its currency. + */ + default_for_currency?: (boolean | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * The last four digits of the bank account number. + */ + last4: string + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "bank_account" + /** + * The routing transit number for the bank account. + */ + routing_number?: (string | null) + /** + * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. + * + * For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + */ + status: string +} +/** + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. + * + * For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that + * account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) + * for a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express** + * below. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts). + */ +export interface Account { + /** + * Business information about the account. + */ + business_profile?: (AccountBusinessProfile | null) + /** + * The business type. + */ + business_type?: ("company" | "government_entity" | "individual" | "non_profit" | null) + capabilities?: AccountCapabilities + /** + * Whether the account can create live charges. + */ + charges_enabled?: boolean + company?: LegalEntityCompany + controller?: AccountUnificationAccountController + /** + * The account's country. + */ + country?: string + /** + * Time at which the account was connected. Measured in seconds since the Unix epoch. + */ + created?: number + /** + * Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + */ + default_currency?: string + /** + * Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. + */ + details_submitted?: boolean + /** + * An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. + */ + email?: (string | null) + external_accounts?: ExternalAccountList + future_requirements?: AccountFutureRequirements + /** + * Unique identifier for the object. + */ + id: string + individual?: Person + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "account" + /** + * Whether Stripe can send payouts to this account. + */ + payouts_enabled?: boolean + requirements?: AccountRequirements + /** + * Options for customizing how the account functions within Stripe. + */ + settings?: (AccountSettings | null) + tos_acceptance?: AccountTOSAcceptance + /** + * The Stripe account type. Can be `standard`, `express`, or `custom`. + */ + type?: ("custom" | "express" | "standard") +} +export interface AccountBusinessProfile { + /** + * [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + */ + mcc?: (string | null) + /** + * The customer-facing business name. + */ + name?: (string | null) + /** + * Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + */ + product_description?: (string | null) + /** + * A publicly available mailing address for sending support issues to. + */ + support_address?: (Address | null) + /** + * A publicly available email address for sending support issues to. + */ + support_email?: (string | null) + /** + * A publicly available phone number to call with support issues. + */ + support_phone?: (string | null) + /** + * A publicly available website for handling support issues. + */ + support_url?: (string | null) + /** + * The business's publicly available website. + */ + url?: (string | null) +} +export interface AccountCapabilities { + /** + * The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + */ + acss_debit_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + */ + affirm_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + */ + afterpay_clearpay_payments?: ("active" | "inactive" | "pending") + /** + * The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + */ + au_becs_debit_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + */ + bacs_debit_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + */ + bancontact_payments?: ("active" | "inactive" | "pending") + /** + * The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + */ + bank_transfer_payments?: ("active" | "inactive" | "pending") + /** + * The status of the blik payments capability of the account, or whether the account can directly process blik charges. + */ + blik_payments?: ("active" | "inactive" | "pending") + /** + * The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + */ + boleto_payments?: ("active" | "inactive" | "pending") + /** + * The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + */ + card_issuing?: ("active" | "inactive" | "pending") + /** + * The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + */ + card_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + */ + cartes_bancaires_payments?: ("active" | "inactive" | "pending") + /** + * The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + */ + eps_payments?: ("active" | "inactive" | "pending") + /** + * The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + */ + fpx_payments?: ("active" | "inactive" | "pending") + /** + * The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + */ + giropay_payments?: ("active" | "inactive" | "pending") + /** + * The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + */ + grabpay_payments?: ("active" | "inactive" | "pending") + /** + * The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + */ + ideal_payments?: ("active" | "inactive" | "pending") + /** + * The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. + */ + india_international_payments?: ("active" | "inactive" | "pending") + /** + * The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + */ + jcb_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + */ + klarna_payments?: ("active" | "inactive" | "pending") + /** + * The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + */ + konbini_payments?: ("active" | "inactive" | "pending") + /** + * The status of the legacy payments capability of the account. + */ + legacy_payments?: ("active" | "inactive" | "pending") + /** + * The status of the link_payments capability of the account, or whether the account can directly process Link charges. + */ + link_payments?: ("active" | "inactive" | "pending") + /** + * The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + */ + oxxo_payments?: ("active" | "inactive" | "pending") + /** + * The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + */ + p24_payments?: ("active" | "inactive" | "pending") + /** + * The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + */ + paynow_payments?: ("active" | "inactive" | "pending") + /** + * The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + */ + promptpay_payments?: ("active" | "inactive" | "pending") + /** + * The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + */ + sepa_debit_payments?: ("active" | "inactive" | "pending") + /** + * The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + */ + sofort_payments?: ("active" | "inactive" | "pending") + /** + * The status of the tax reporting 1099-K (US) capability of the account. + */ + tax_reporting_us_1099_k?: ("active" | "inactive" | "pending") + /** + * The status of the tax reporting 1099-MISC (US) capability of the account. + */ + tax_reporting_us_1099_misc?: ("active" | "inactive" | "pending") + /** + * The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + */ + transfers?: ("active" | "inactive" | "pending") + /** + * The status of the banking capability, or whether the account can have bank accounts. + */ + treasury?: ("active" | "inactive" | "pending") + /** + * The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + */ + us_bank_account_ach_payments?: ("active" | "inactive" | "pending") +} +export interface LegalEntityCompany { + address?: Address + /** + * The Kana variation of the company's primary address (Japan only). + */ + address_kana?: (LegalEntityJapanAddress | null) + /** + * The Kanji variation of the company's primary address (Japan only). + */ + address_kanji?: (LegalEntityJapanAddress | null) + /** + * Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). + */ + directors_provided?: boolean + /** + * Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. + */ + executives_provided?: boolean + /** + * The company's legal name. + */ + name?: (string | null) + /** + * The Kana variation of the company's legal name (Japan only). + */ + name_kana?: (string | null) + /** + * The Kanji variation of the company's legal name (Japan only). + */ + name_kanji?: (string | null) + /** + * Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). + */ + owners_provided?: boolean + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + */ + ownership_declaration?: (LegalEntityUBODeclaration | null) + /** + * The company's phone number (used for verification). + */ + phone?: (string | null) + /** + * The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + */ + structure?: ("free_zone_establishment" | "free_zone_llc" | "government_instrumentality" | "governmental_unit" | "incorporated_non_profit" | "limited_liability_partnership" | "llc" | "multi_member_llc" | "private_company" | "private_corporation" | "private_partnership" | "public_company" | "public_corporation" | "public_partnership" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" | "tax_exempt_government_instrumentality" | "unincorporated_association" | "unincorporated_non_profit") + /** + * Whether the company's business ID number was provided. + */ + tax_id_provided?: boolean + /** + * The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + */ + tax_id_registrar?: string + /** + * Whether the company's business VAT number was provided. + */ + vat_id_provided?: boolean + /** + * Information on the verification state of the company. + */ + verification?: (LegalEntityCompanyVerification | null) +} +export interface LegalEntityJapanAddress { + /** + * City/Ward. + */ + city?: (string | null) + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: (string | null) + /** + * Block/Building number. + */ + line1?: (string | null) + /** + * Building details. + */ + line2?: (string | null) + /** + * ZIP or postal code. + */ + postal_code?: (string | null) + /** + * Prefecture. + */ + state?: (string | null) + /** + * Town/cho-me. + */ + town?: (string | null) +} +export interface LegalEntityUBODeclaration { + /** + * The Unix timestamp marking when the beneficial owner attestation was made. + */ + date?: (number | null) + /** + * The IP address from which the beneficial owner attestation was made. + */ + ip?: (string | null) + /** + * The user-agent string from the browser where the beneficial owner attestation was made. + */ + user_agent?: (string | null) +} +export interface LegalEntityCompanyVerification { + document: LegalEntityCompanyVerificationDocument +} +export interface LegalEntityCompanyVerificationDocument { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. + */ + back?: (string | File | null) + /** + * A user-displayable string describing the verification state of this document. + */ + details?: (string | null) + /** + * One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. + */ + details_code?: (string | null) + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. + */ + front?: (string | File | null) +} +/** + * This is an object representing a file hosted on Stripe's servers. The + * file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) + * request (for example, when uploading dispute evidence) or it may have + * been created by Stripe (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File Upload Guide](https://stripe.com/docs/file-upload). + */ +export interface File { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The time at which the file expires and is no longer available in epoch seconds. + */ + expires_at?: (number | null) + /** + * A filename for the file, suitable for saving to a filesystem. + */ + filename?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + links?: FileFileLinkList + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "file" + /** + * The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + */ + purpose: ("account_requirement" | "additional_verification" | "business_icon" | "business_logo" | "customer_signature" | "dispute_evidence" | "document_provider_identity_document" | "finance_report_run" | "identity_document" | "identity_document_downloadable" | "pci_document" | "selfie" | "sigma_scheduled_query" | "tax_document_user_upload" | "terminal_reader_splashscreen") + /** + * The size in bytes of the file object. + */ + size: number + /** + * A user friendly title for the document. + */ + title?: (string | null) + /** + * The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). + */ + type?: (string | null) + /** + * The URL from which the file can be downloaded using your live secret API key. + */ + url?: (string | null) +} +/** + * To share the contents of a `File` object with non-Stripe users, you can + * create a `FileLink`. `FileLink`s contain a URL that can be used to + * retrieve the contents of the file without authentication. + */ +export interface FileLink { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Whether this link is already expired. + */ + expired: boolean + /** + * Time at which the link expires. + */ + expires_at?: (number | null) + /** + * The file object this link points to. + */ + file: (string | File) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "file_link" + /** + * The publicly accessible URL to download the file. + */ + url?: (string | null) +} +export interface AccountUnificationAccountController { + /** + * `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. + */ + is_controller?: boolean + /** + * The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + */ + type: ("account" | "application") +} +/** + * External accounts (bank accounts and debit cards) currently attached to this account + */ +export interface ExternalAccountList { + /** + * The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. + */ + data: Polymorphic[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +/** + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards). + */ +export interface Card { + /** + * The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. + */ + account?: (string | Account | null) + /** + * City/District/Suburb/Town/Village. + */ + address_city?: (string | null) + /** + * Billing address country, if provided when creating card. + */ + address_country?: (string | null) + /** + * Address line 1 (Street address/PO Box/Company name). + */ + address_line1?: (string | null) + /** + * If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_line1_check?: (string | null) + /** + * Address line 2 (Apartment/Suite/Unit/Building). + */ + address_line2?: (string | null) + /** + * State/County/Province/Region. + */ + address_state?: (string | null) + /** + * ZIP or postal code. + */ + address_zip?: (string | null) + /** + * If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_zip_check?: (string | null) + /** + * A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + */ + available_payout_methods?: (("instant" | "standard")[] | null) + /** + * Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + */ + brand: string + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country?: (string | null) + /** + * Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. + */ + currency?: (string | null) + /** + * The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + */ + cvc_check?: (string | null) + /** + * Whether this card is the default external account for its currency. + */ + default_for_currency?: (boolean | null) + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ + dynamic_last4?: (string | null) + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: (string | null) + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string + /** + * Unique identifier for the object. + */ + id: string + /** + * The last four digits of the card. + */ + last4: string + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * Cardholder name. + */ + name?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "card" + /** + * For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + */ + status?: (string | null) + /** + * If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + */ + tokenization_method?: (string | null) +} +export interface DeletedCustomer { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "customer" +} +export interface AccountFutureRequirements { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ + alternatives?: (AccountRequirementsAlternative[] | null) + /** + * Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + */ + current_deadline?: (number | null) + /** + * Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + */ + currently_due?: (string[] | null) + /** + * This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. + */ + disabled_reason?: (string | null) + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ + errors?: (AccountRequirementsError[] | null) + /** + * Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + */ + eventually_due?: (string[] | null) + /** + * Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ + past_due?: (string[] | null) + /** + * Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + */ + pending_verification?: (string[] | null) +} +export interface AccountRequirementsAlternative { + /** + * Fields that can be provided to satisfy all fields in `original_fields_due`. + */ + alternative_fields_due: string[] + /** + * Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + */ + original_fields_due: string[] +} +export interface AccountRequirementsError { + /** + * The code for the type of error. + */ + code: ("invalid_address_city_state_postal_code" | "invalid_dob_age_under_18" | "invalid_representative_country" | "invalid_street_address" | "invalid_tos_acceptance" | "invalid_value_other" | "verification_document_address_mismatch" | "verification_document_address_missing" | "verification_document_corrupt" | "verification_document_country_not_supported" | "verification_document_dob_mismatch" | "verification_document_duplicate_type" | "verification_document_expired" | "verification_document_failed_copy" | "verification_document_failed_greyscale" | "verification_document_failed_other" | "verification_document_failed_test_mode" | "verification_document_fraudulent" | "verification_document_id_number_mismatch" | "verification_document_id_number_missing" | "verification_document_incomplete" | "verification_document_invalid" | "verification_document_issue_or_expiry_date_missing" | "verification_document_manipulated" | "verification_document_missing_back" | "verification_document_missing_front" | "verification_document_name_mismatch" | "verification_document_name_missing" | "verification_document_nationality_mismatch" | "verification_document_not_readable" | "verification_document_not_signed" | "verification_document_not_uploaded" | "verification_document_photo_mismatch" | "verification_document_too_large" | "verification_document_type_not_supported" | "verification_failed_address_match" | "verification_failed_business_iec_number" | "verification_failed_document_match" | "verification_failed_id_number_match" | "verification_failed_keyed_identity" | "verification_failed_keyed_match" | "verification_failed_name_match" | "verification_failed_other" | "verification_failed_residential_address" | "verification_failed_tax_id_match" | "verification_failed_tax_id_not_issued" | "verification_missing_executives" | "verification_missing_owners" | "verification_requires_additional_memorandum_of_associations") + /** + * An informative message that indicates the error type and provides additional details about the error. + */ + reason: string + /** + * The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + */ + requirement: string +} +/** + * This is an object representing a person associated with a Stripe account. + * + * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. + * See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps. + * + * Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). + */ +export interface Person { + /** + * The account the person is associated with. + */ + account: string + address?: Address + address_kana?: (LegalEntityJapanAddress | null) + address_kanji?: (LegalEntityJapanAddress | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + dob?: LegalEntityDOB + /** + * The person's email address. + */ + email?: (string | null) + /** + * The person's first name. + */ + first_name?: (string | null) + /** + * The Kana variation of the person's first name (Japan only). + */ + first_name_kana?: (string | null) + /** + * The Kanji variation of the person's first name (Japan only). + */ + first_name_kanji?: (string | null) + /** + * A list of alternate names or aliases that the person is known by. + */ + full_name_aliases?: string[] + future_requirements?: (PersonFutureRequirements | null) + /** + * The person's gender (International regulations require either "male" or "female"). + */ + gender?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Whether the person's `id_number` was provided. + */ + id_number_provided?: boolean + /** + * Whether the person's `id_number_secondary` was provided. + */ + id_number_secondary_provided?: boolean + /** + * The person's last name. + */ + last_name?: (string | null) + /** + * The Kana variation of the person's last name (Japan only). + */ + last_name_kana?: (string | null) + /** + * The Kanji variation of the person's last name (Japan only). + */ + last_name_kanji?: (string | null) + /** + * The person's maiden name. + */ + maiden_name?: (string | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: { + [k: string]: string + } + /** + * The country where the person is a national. + */ + nationality?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "person" + /** + * The person's phone number. + */ + phone?: (string | null) + /** + * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + */ + political_exposure?: ("existing" | "none") + registered_address?: Address + relationship?: PersonRelationship + requirements?: (PersonRequirements | null) + /** + * Whether the last four digits of the person's Social Security number have been provided (U.S. only). + */ + ssn_last_4_provided?: boolean + verification?: LegalEntityPersonVerification +} +export interface LegalEntityDOB { + /** + * The day of birth, between 1 and 31. + */ + day?: (number | null) + /** + * The month of birth, between 1 and 12. + */ + month?: (number | null) + /** + * The four-digit year of birth. + */ + year?: (number | null) +} +export interface PersonFutureRequirements { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ + alternatives?: (AccountRequirementsAlternative[] | null) + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. + */ + currently_due: string[] + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ + errors: AccountRequirementsError[] + /** + * Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + */ + eventually_due: string[] + /** + * Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + */ + past_due: string[] + /** + * Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + */ + pending_verification: string[] +} +export interface PersonRelationship { + /** + * Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + */ + director?: (boolean | null) + /** + * Whether the person has significant responsibility to control, manage, or direct the organization. + */ + executive?: (boolean | null) + /** + * Whether the person is an owner of the account’s legal entity. + */ + owner?: (boolean | null) + /** + * The percent owned by the person of the account's legal entity. + */ + percent_ownership?: (number | null) + /** + * Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + */ + representative?: (boolean | null) + /** + * The person's title (e.g., CEO, Support Engineer). + */ + title?: (string | null) +} +export interface PersonRequirements { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ + alternatives?: (AccountRequirementsAlternative[] | null) + /** + * Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ + currently_due: string[] + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ + errors: AccountRequirementsError[] + /** + * Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + */ + eventually_due: string[] + /** + * Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. + */ + past_due: string[] + /** + * Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + */ + pending_verification: string[] +} +export interface LegalEntityPersonVerification { + /** + * A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + */ + additional_document?: (LegalEntityPersonVerificationDocument | null) + /** + * A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". + */ + details?: (string | null) + /** + * One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. + */ + details_code?: (string | null) + document?: LegalEntityPersonVerificationDocument + /** + * The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. + */ + status: string +} +export interface LegalEntityPersonVerificationDocument { + /** + * The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ + back?: (string | File | null) + /** + * A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + */ + details?: (string | null) + /** + * One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + */ + details_code?: (string | null) + /** + * The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ + front?: (string | File | null) +} +export interface AccountRequirements { + /** + * Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + */ + alternatives?: (AccountRequirementsAlternative[] | null) + /** + * Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + */ + current_deadline?: (number | null) + /** + * Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + */ + currently_due?: (string[] | null) + /** + * If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. + */ + disabled_reason?: (string | null) + /** + * Fields that are `currently_due` and need to be collected again because validation or verification failed. + */ + errors?: (AccountRequirementsError[] | null) + /** + * Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + */ + eventually_due?: (string[] | null) + /** + * Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. + */ + past_due?: (string[] | null) + /** + * Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + */ + pending_verification?: (string[] | null) +} +export interface AccountSettings { + bacs_debit_payments?: AccountBacsDebitPaymentsSettings + branding: AccountBrandingSettings + card_issuing?: AccountCardIssuingSettings + card_payments: AccountCardPaymentsSettings + dashboard: AccountDashboardSettings + payments: AccountPaymentsSettings + payouts?: AccountPayoutSettings + sepa_debit_payments?: AccountSepaDebitPaymentsSettings + treasury?: AccountTreasurySettings +} +export interface AccountBacsDebitPaymentsSettings { + /** + * The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor. + */ + display_name?: string +} +export interface AccountBrandingSettings { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + */ + icon?: (string | File | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + */ + logo?: (string | File | null) + /** + * A CSS hex color value representing the primary branding color for this account + */ + primary_color?: (string | null) + /** + * A CSS hex color value representing the secondary branding color for this account + */ + secondary_color?: (string | null) +} +export interface AccountCardIssuingSettings { + tos_acceptance?: CardIssuingAccountTermsOfService +} +export interface CardIssuingAccountTermsOfService { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ + date?: (number | null) + /** + * The IP address from which the account representative accepted the service agreement. + */ + ip?: (string | null) + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ + user_agent?: string +} +export interface AccountCardPaymentsSettings { + decline_on?: AccountDeclineChargeOn + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + */ + statement_descriptor_prefix?: (string | null) + /** + * The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + */ + statement_descriptor_prefix_kana?: (string | null) + /** + * The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + */ + statement_descriptor_prefix_kanji?: (string | null) +} +export interface AccountDeclineChargeOn { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + */ + avs_failure: boolean + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + */ + cvc_failure: boolean +} +export interface AccountDashboardSettings { + /** + * The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. + */ + display_name?: (string | null) + /** + * The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). + */ + timezone?: (string | null) +} +export interface AccountPaymentsSettings { + /** + * The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + */ + statement_descriptor?: (string | null) + /** + * The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) + */ + statement_descriptor_kana?: (string | null) + /** + * The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) + */ + statement_descriptor_kanji?: (string | null) + /** + * The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + */ + statement_descriptor_prefix_kana?: (string | null) + /** + * The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + */ + statement_descriptor_prefix_kanji?: (string | null) +} +export interface AccountPayoutSettings { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`. + */ + debit_negative_balances: boolean + schedule: TransferSchedule + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + */ + statement_descriptor?: (string | null) +} +export interface TransferSchedule { + /** + * The number of days charges for the account will be held before being paid out. + */ + delay_days: number + /** + * How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + */ + interval: string + /** + * The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + */ + monthly_anchor?: number + /** + * The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. + */ + weekly_anchor?: string +} +export interface AccountSepaDebitPaymentsSettings { + /** + * SEPA creditor identifier that identifies the company making the payment. + */ + creditor_id?: string +} +export interface AccountTreasurySettings { + tos_acceptance?: AccountTermsOfService +} +export interface AccountTermsOfService { + /** + * The Unix timestamp marking when the account representative accepted the service agreement. + */ + date?: (number | null) + /** + * The IP address from which the account representative accepted the service agreement. + */ + ip?: (string | null) + /** + * The user agent of the browser from which the account representative accepted the service agreement. + */ + user_agent?: string +} +export interface AccountTOSAcceptance { + /** + * The Unix timestamp marking when the account representative accepted their service agreement + */ + date?: (number | null) + /** + * The IP address from which the account representative accepted their service agreement + */ + ip?: (string | null) + /** + * The user's service agreement type + */ + service_agreement?: string + /** + * The user agent of the browser from which the account representative accepted their service agreement + */ + user_agent?: (string | null) +} +/** + * `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + * We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + * This newer API provides access to our latest features and payment method types. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ +export interface Source { + ach_credit_transfer?: SourceTypeAchCreditTransfer + ach_debit?: SourceTypeAchDebit + acss_debit?: SourceTypeAcssDebit + alipay?: SourceTypeAlipay + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + */ + amount?: (number | null) + au_becs_debit?: SourceTypeAuBecsDebit + bancontact?: SourceTypeBancontact + card?: SourceTypeCard + card_present?: SourceTypeCardPresent + /** + * The client secret of the source. Used for client-side retrieval using a publishable key. + */ + client_secret: string + code_verification?: SourceCodeVerificationFlow + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + */ + currency?: (string | null) + /** + * The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + */ + customer?: string + eps?: SourceTypeEps + /** + * The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + */ + flow: string + giropay?: SourceTypeGiropay + /** + * Unique identifier for the object. + */ + id: string + ideal?: SourceTypeIdeal + klarna?: SourceTypeKlarna + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + multibanco?: SourceTypeMultibanco + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "source" + /** + * Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: (SourceOwner | null) + p24?: SourceTypeP24 + receiver?: SourceReceiverFlow + redirect?: SourceRedirectFlow + sepa_debit?: SourceTypeSepaDebit + sofort?: SourceTypeSofort + source_order?: SourceOrder + /** + * Extra information about a source. This will appear on your customer's statement every time you charge the source. + */ + statement_descriptor?: (string | null) + /** + * The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + */ + status: string + three_d_secure?: SourceTypeThreeDSecure + /** + * The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + */ + type: ("ach_credit_transfer" | "ach_debit" | "acss_debit" | "alipay" | "au_becs_debit" | "bancontact" | "card" | "card_present" | "eps" | "giropay" | "ideal" | "klarna" | "multibanco" | "p24" | "sepa_debit" | "sofort" | "three_d_secure" | "wechat") + /** + * Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + */ + usage?: (string | null) + wechat?: SourceTypeWechat +} +export interface SourceTypeAchCreditTransfer { + account_number?: (string | null) + bank_name?: (string | null) + fingerprint?: (string | null) + refund_account_holder_name?: (string | null) + refund_account_holder_type?: (string | null) + refund_routing_number?: (string | null) + routing_number?: (string | null) + swift_code?: (string | null) +} +export interface SourceTypeAchDebit { + bank_name?: (string | null) + country?: (string | null) + fingerprint?: (string | null) + last4?: (string | null) + routing_number?: (string | null) + type?: (string | null) +} +export interface SourceTypeAcssDebit { + bank_address_city?: (string | null) + bank_address_line_1?: (string | null) + bank_address_line_2?: (string | null) + bank_address_postal_code?: (string | null) + bank_name?: (string | null) + category?: (string | null) + country?: (string | null) + fingerprint?: (string | null) + last4?: (string | null) + routing_number?: (string | null) +} +export interface SourceTypeAlipay { + data_string?: (string | null) + native_url?: (string | null) + statement_descriptor?: (string | null) +} +export interface SourceTypeAuBecsDebit { + bsb_number?: (string | null) + fingerprint?: (string | null) + last4?: (string | null) +} +export interface SourceTypeBancontact { + bank_code?: (string | null) + bank_name?: (string | null) + bic?: (string | null) + iban_last4?: (string | null) + preferred_language?: (string | null) + statement_descriptor?: (string | null) +} +export interface SourceTypeCard { + address_line1_check?: (string | null) + address_zip_check?: (string | null) + brand?: (string | null) + country?: (string | null) + cvc_check?: (string | null) + dynamic_last4?: (string | null) + exp_month?: (number | null) + exp_year?: (number | null) + fingerprint?: string + funding?: (string | null) + last4?: (string | null) + name?: (string | null) + three_d_secure?: string + tokenization_method?: (string | null) +} +export interface SourceTypeCardPresent { + application_cryptogram?: string + application_preferred_name?: string + authorization_code?: (string | null) + authorization_response_code?: string + brand?: (string | null) + country?: (string | null) + cvm_type?: string + data_type?: (string | null) + dedicated_file_name?: string + emv_auth_data?: string + evidence_customer_signature?: (string | null) + evidence_transaction_certificate?: (string | null) + exp_month?: (number | null) + exp_year?: (number | null) + fingerprint?: string + funding?: (string | null) + last4?: (string | null) + pos_device_id?: (string | null) + pos_entry_mode?: string + read_method?: (string | null) + reader?: (string | null) + terminal_verification_results?: string + transaction_status_information?: string +} +export interface SourceCodeVerificationFlow { + /** + * The number of attempts remaining to authenticate the source object with a verification code. + */ + attempts_remaining: number + /** + * The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). + */ + status: string +} +export interface SourceTypeEps { + reference?: (string | null) + statement_descriptor?: (string | null) +} +export interface SourceTypeGiropay { + bank_code?: (string | null) + bank_name?: (string | null) + bic?: (string | null) + statement_descriptor?: (string | null) +} +export interface SourceTypeIdeal { + bank?: (string | null) + bic?: (string | null) + iban_last4?: (string | null) + statement_descriptor?: (string | null) +} +export interface SourceTypeKlarna { + background_image_url?: string + client_token?: (string | null) + first_name?: string + last_name?: string + locale?: string + logo_url?: string + page_title?: string + pay_later_asset_urls_descriptive?: string + pay_later_asset_urls_standard?: string + pay_later_name?: string + pay_later_redirect_url?: string + pay_now_asset_urls_descriptive?: string + pay_now_asset_urls_standard?: string + pay_now_name?: string + pay_now_redirect_url?: string + pay_over_time_asset_urls_descriptive?: string + pay_over_time_asset_urls_standard?: string + pay_over_time_name?: string + pay_over_time_redirect_url?: string + payment_method_categories?: string + purchase_country?: string + purchase_type?: string + redirect_url?: string + shipping_delay?: number + shipping_first_name?: string + shipping_last_name?: string +} +export interface SourceTypeMultibanco { + entity?: (string | null) + reference?: (string | null) + refund_account_holder_address_city?: (string | null) + refund_account_holder_address_country?: (string | null) + refund_account_holder_address_line1?: (string | null) + refund_account_holder_address_line2?: (string | null) + refund_account_holder_address_postal_code?: (string | null) + refund_account_holder_address_state?: (string | null) + refund_account_holder_name?: (string | null) + refund_iban?: (string | null) +} +export interface SourceOwner { + /** + * Owner's address. + */ + address?: (Address | null) + /** + * Owner's email address. + */ + email?: (string | null) + /** + * Owner's full name. + */ + name?: (string | null) + /** + * Owner's phone number (including extension). + */ + phone?: (string | null) + /** + * Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_address?: (Address | null) + /** + * Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_email?: (string | null) + /** + * Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) + /** + * Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_phone?: (string | null) +} +export interface SourceTypeP24 { + reference?: (string | null) +} +export interface SourceReceiverFlow { + /** + * The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. + */ + address?: (string | null) + /** + * The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. + */ + amount_charged: number + /** + * The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. + */ + amount_received: number + /** + * The total amount that was returned to the customer. The amount returned is expressed in the source's currency. + */ + amount_returned: number + /** + * Type of refund attribute method, one of `email`, `manual`, or `none`. + */ + refund_attributes_method: string + /** + * Type of refund attribute status, one of `missing`, `requested`, or `available`. + */ + refund_attributes_status: string +} +export interface SourceRedirectFlow { + /** + * The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. + */ + failure_reason?: (string | null) + /** + * The URL you provide to redirect the customer to after they authenticated their payment. + */ + return_url: string + /** + * The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). + */ + status: string + /** + * The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. + */ + url: string +} +export interface SourceTypeSepaDebit { + bank_code?: (string | null) + branch_code?: (string | null) + country?: (string | null) + fingerprint?: (string | null) + last4?: (string | null) + mandate_reference?: (string | null) + mandate_url?: (string | null) +} +export interface SourceTypeSofort { + bank_code?: (string | null) + bank_name?: (string | null) + bic?: (string | null) + country?: (string | null) + iban_last4?: (string | null) + preferred_language?: (string | null) + statement_descriptor?: (string | null) +} +export interface SourceOrder { + /** + * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + */ + amount: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * The email address of the customer placing the order. + */ + email?: string + /** + * List of items constituting the order. + */ + items?: (SourceOrderItem[] | null) + shipping?: Shipping + minItems?: 0 +} +export interface SourceOrderItem { + /** + * The amount (price) for this order item. + */ + amount?: (number | null) + /** + * This currency of this order item. Required when `amount` is present. + */ + currency?: (string | null) + /** + * Human-readable description for this order item. + */ + description?: (string | null) + /** + * The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). + */ + parent?: (string | null) + /** + * The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + */ + quantity?: number + /** + * The type of this order item. Must be `sku`, `tax`, or `shipping`. + */ + type?: (string | null) +} +export interface Shipping { + address?: Address + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + */ + carrier?: (string | null) + /** + * Recipient name. + */ + name?: string + /** + * Recipient phone (including extension). + */ + phone?: (string | null) + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ + tracking_number?: (string | null) +} +export interface SourceTypeThreeDSecure { + address_line1_check?: (string | null) + address_zip_check?: (string | null) + authenticated?: (boolean | null) + brand?: (string | null) + card?: (string | null) + country?: (string | null) + customer?: (string | null) + cvc_check?: (string | null) + dynamic_last4?: (string | null) + exp_month?: (number | null) + exp_year?: (number | null) + fingerprint?: string + funding?: (string | null) + last4?: (string | null) + name?: (string | null) + three_d_secure?: string + tokenization_method?: (string | null) +} +export interface SourceTypeWechat { + prepay_id?: string + qr_code_url?: (string | null) + statement_descriptor?: string +} +/** + * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. + * + * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). + */ +export interface Discount { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ + checkout_session?: (string | null) + coupon: Coupon + /** + * The ID of the customer associated with this discount. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + */ + end?: (number | null) + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ + id: string + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ + invoice?: (string | null) + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ + invoice_item?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "discount" + /** + * The promotion code applied to create this discount. + */ + promotion_code?: (string | PromotionCode | null) + /** + * Date that the coupon was applied. + */ + start: number + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ + subscription?: (string | null) +} +/** + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + */ +export interface Coupon { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ + amount_off?: (number | null) + applies_to?: CouponAppliesTo + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + */ + currency?: (string | null) + /** + * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ + currency_options?: { + [k: string]: CouponCurrencyOption + } + /** + * One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + */ + duration: ("forever" | "once" | "repeating") + /** + * If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + */ + duration_in_months?: (number | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + */ + max_redemptions?: (number | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * Name of the coupon displayed to customers on for instance invoices or receipts. + */ + name?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "coupon" + /** + * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. + */ + percent_off?: (number | null) + /** + * Date after which the coupon can no longer be redeemed. + */ + redeem_by?: (number | null) + /** + * Number of times this coupon has been applied to a customer. + */ + times_redeemed: number + /** + * Taking account of the above properties, whether this coupon can still be applied to a customer. + */ + valid: boolean +} +export interface CouponAppliesTo { + /** + * A list of product IDs this coupon applies to + */ + products: string[] +} +export interface CouponCurrencyOption { + /** + * Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + */ + amount_off: number +} +/** + * A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to + * create multiple codes for a single coupon. + */ +export interface PromotionCode { + /** + * Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + */ + active: boolean + /** + * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. + */ + code: string + coupon: Coupon + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The customer that this promotion code can be used by. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * Date at which the promotion code can no longer be redeemed. + */ + expires_at?: (number | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Maximum number of times this promotion code can be redeemed. + */ + max_redemptions?: (number | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "promotion_code" + restrictions: PromotionCodesResourceRestrictions + /** + * Number of times this promotion code has been used. + */ + times_redeemed: number +} +export interface PromotionCodesResourceRestrictions { + /** + * Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ + currency_options?: { + [k: string]: PromotionCodeCurrencyOption + } + /** + * A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + */ + first_time_transaction: boolean + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ + minimum_amount?: (number | null) + /** + * Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + */ + minimum_amount_currency?: (string | null) +} +export interface PromotionCodeCurrencyOption { + /** + * Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + */ + minimum_amount: number +} +export interface InvoiceSettingCustomerSetting { + /** + * Default custom fields to be displayed on invoices for this customer. + */ + custom_fields?: (InvoiceSettingCustomField[] | null) + /** + * ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + */ + default_payment_method?: (string | PaymentMethod | null) + /** + * Default footer to be displayed on invoices for this customer. + */ + footer?: (string | null) + /** + * Default options for invoice PDF rendering for this customer. + */ + rendering_options?: (InvoiceSettingRenderingOptions | null) +} +export interface InvoiceSettingCustomField { + /** + * The name of the custom field. + */ + name: string + /** + * The value of the custom field. + */ + value: string +} +/** + * PaymentMethod objects represent your customer's payment instruments. + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ +export interface PaymentMethod { + acss_debit?: PaymentMethodAcssDebit + affirm?: PaymentMethodAffirm + afterpay_clearpay?: PaymentMethodAfterpayClearpay + alipay?: PaymentFlowsPrivatePaymentMethodsAlipay + au_becs_debit?: PaymentMethodAuBecsDebit + bacs_debit?: PaymentMethodBacsDebit + bancontact?: PaymentMethodBancontact + billing_details: BillingDetails + blik?: PaymentMethodBlik + boleto?: PaymentMethodBoleto + card?: PaymentMethodCard + card_present?: PaymentMethodCardPresent + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + */ + customer?: (string | Customer | null) + customer_balance?: PaymentMethodCustomerBalance + eps?: PaymentMethodEps + fpx?: PaymentMethodFpx + giropay?: PaymentMethodGiropay + grabpay?: PaymentMethodGrabpay + /** + * Unique identifier for the object. + */ + id: string + ideal?: PaymentMethodIdeal + interac_present?: PaymentMethodInteracPresent + klarna?: PaymentMethodKlarna + konbini?: PaymentMethodKonbini + link?: PaymentMethodLink + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "payment_method" + oxxo?: PaymentMethodOxxo + p24?: PaymentMethodP24 + paynow?: PaymentMethodPaynow + pix?: PaymentMethodPix + promptpay?: PaymentMethodPromptpay + radar_options?: RadarRadarOptions + sepa_debit?: PaymentMethodSepaDebit + sofort?: PaymentMethodSofort + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ + type: ("acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "card_present" | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "interac_present" | "klarna" | "konbini" | "link" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay") + us_bank_account?: PaymentMethodUsBankAccount + wechat_pay?: PaymentMethodWechatPay +} +export interface PaymentMethodAcssDebit { + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Institution number of the bank account. + */ + institution_number?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * Transit number of the bank account. + */ + transit_number?: (string | null) +} +export interface PaymentMethodAffirm { + +} +export interface PaymentMethodAfterpayClearpay { + +} +export interface PaymentFlowsPrivatePaymentMethodsAlipay { + +} +export interface PaymentMethodAuBecsDebit { + /** + * Six-digit number identifying bank and branch associated with this bank account. + */ + bsb_number?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) +} +export interface PaymentMethodBacsDebit { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code?: (string | null) +} +export interface PaymentMethodBancontact { + +} +export interface BillingDetails { + /** + * Billing address. + */ + address?: (Address | null) + /** + * Email address. + */ + email?: (string | null) + /** + * Full name. + */ + name?: (string | null) + /** + * Billing phone number (including extension). + */ + phone?: (string | null) +} +export interface PaymentMethodBlik { + +} +export interface PaymentMethodBoleto { + /** + * Uniquely identifies the customer tax id (CNPJ or CPF) + */ + tax_id: string +} +export interface PaymentMethodCard { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string + /** + * Checks on Card address and CVC if provided. + */ + checks?: (PaymentMethodCardChecks | null) + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country?: (string | null) + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: (string | null) + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string + /** + * Details of the original PaymentMethod that created this object. + */ + generated_from?: (PaymentMethodCardGeneratedCard | null) + /** + * The last four digits of the card. + */ + last4: string + /** + * Contains information about card networks that can be used to process the payment. + */ + networks?: (Networks | null) + /** + * Contains details on how this Card may be used for 3D Secure authentication. + */ + three_d_secure_usage?: (ThreeDSecureUsage | null) + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ + wallet?: (PaymentMethodCardWallet | null) +} +export interface PaymentMethodCardChecks { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_line1_check?: (string | null) + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_postal_code_check?: (string | null) + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + cvc_check?: (string | null) +} +export interface PaymentMethodCardGeneratedCard { + /** + * The charge that created this object. + */ + charge?: (string | null) + /** + * Transaction-specific details of the payment method used in the payment. + */ + payment_method_details?: (CardGeneratedFromPaymentMethodDetails | null) + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ + setup_attempt?: (string | PaymentFlowsSetupIntentSetupAttempt | null) +} +export interface CardGeneratedFromPaymentMethodDetails { + card_present?: PaymentMethodDetailsCardPresent + /** + * The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + */ + type: string +} +export interface PaymentMethodDetailsCardPresent { + /** + * The authorized amount + */ + amount_authorized?: (number | null) + /** + * Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand?: (string | null) + /** + * When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + */ + capture_before?: number + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name?: (string | null) + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country?: (string | null) + /** + * Authorization response cryptogram. + */ + emv_auth_data?: (string | null) + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: (string | null) + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding?: (string | null) + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ + generated_card?: (string | null) + /** + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + */ + incremental_authorization_supported: boolean + /** + * The last four digits of the card. + */ + last4?: (string | null) + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network?: (string | null) + /** + * Defines whether the authorized amount can be over-captured or not + */ + overcapture_supported: boolean + /** + * How card details were read in this transaction. + */ + read_method?: ("contact_emv" | "contactless_emv" | "contactless_magstripe_mode" | "magnetic_stripe_fallback" | "magnetic_stripe_track2" | null) + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt?: (PaymentMethodDetailsCardPresentReceipt | null) +} +export interface PaymentMethodDetailsCardPresentReceipt { + /** + * The type of account being debited or credited + */ + account_type?: ("checking" | "credit" | "prepaid" | "unknown") + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram?: (string | null) + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name?: (string | null) + /** + * Identifier for this transaction. + */ + authorization_code?: (string | null) + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code?: (string | null) + /** + * How the cardholder verified ownership of the card. + */ + cardholder_verification_method?: (string | null) + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name?: (string | null) + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results?: (string | null) + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information?: (string | null) +} +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation was successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ +export interface PaymentFlowsSetupIntentSetupAttempt { + /** + * The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + */ + application?: (string | Application | null) + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: (("inbound" | "outbound")[] | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "setup_attempt" + /** + * The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + */ + on_behalf_of?: (string | Account | null) + /** + * ID of the payment method used with this SetupAttempt. + */ + payment_method: (string | PaymentMethod) + payment_method_details: SetupAttemptPaymentMethodDetails + /** + * The error encountered during this attempt to confirm the SetupIntent, if any. + */ + setup_error?: (APIErrors | null) + /** + * ID of the SetupIntent that this attempt belongs to. + */ + setup_intent: (string | SetupIntent) + /** + * Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + */ + status: string + /** + * The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + */ + usage: string +} +export interface Application { + /** + * Unique identifier for the object. + */ + id: string + /** + * The name of the application. + */ + name?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "application" +} +export interface SetupAttemptPaymentMethodDetails { + acss_debit?: SetupAttemptPaymentMethodDetailsAcssDebit + au_becs_debit?: SetupAttemptPaymentMethodDetailsAuBecsDebit + bacs_debit?: SetupAttemptPaymentMethodDetailsBacsDebit + bancontact?: SetupAttemptPaymentMethodDetailsBancontact + blik?: SetupAttemptPaymentMethodDetailsBlik + boleto?: SetupAttemptPaymentMethodDetailsBoleto + card?: SetupAttemptPaymentMethodDetailsCard + card_present?: SetupAttemptPaymentMethodDetailsCardPresent + ideal?: SetupAttemptPaymentMethodDetailsIdeal + klarna?: SetupAttemptPaymentMethodDetailsKlarna + link?: SetupAttemptPaymentMethodDetailsLink + sepa_debit?: SetupAttemptPaymentMethodDetailsSepaDebit + sofort?: SetupAttemptPaymentMethodDetailsSofort + /** + * The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. + */ + type: string + us_bank_account?: SetupAttemptPaymentMethodDetailsUsBankAccount +} +export interface SetupAttemptPaymentMethodDetailsAcssDebit { + +} +export interface SetupAttemptPaymentMethodDetailsAuBecsDebit { + +} +export interface SetupAttemptPaymentMethodDetailsBacsDebit { + +} +export interface SetupAttemptPaymentMethodDetailsBancontact { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic?: (string | null) + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ + generated_sepa_debit?: (string | PaymentMethod | null) + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ + generated_sepa_debit_mandate?: (string | Mandate | null) + /** + * Last four characters of the IBAN. + */ + iban_last4?: (string | null) + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language?: ("de" | "en" | "fr" | "nl" | null) + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) +} +/** + * A Mandate is a record of the permission a customer has given you to debit their payment method. + */ +export interface Mandate { + customer_acceptance: CustomerAcceptance + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + multi_use?: MandateMultiUse + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "mandate" + /** + * ID of the payment method associated with this mandate. + */ + payment_method: (string | PaymentMethod) + payment_method_details: MandatePaymentMethodDetails + single_use?: MandateSingleUse + /** + * The status of the mandate, which indicates whether it can be used to initiate a payment. + */ + status: ("active" | "inactive" | "pending") + /** + * The type of the mandate. + */ + type: ("multi_use" | "single_use") +} +export interface CustomerAcceptance { + /** + * The time at which the customer accepted the Mandate. + */ + accepted_at?: (number | null) + offline?: OfflineAcceptance + online?: OnlineAcceptance + /** + * The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + */ + type: ("offline" | "online") +} +export interface OfflineAcceptance { + +} +export interface OnlineAcceptance { + /** + * The IP address from which the Mandate was accepted by the customer. + */ + ip_address?: (string | null) + /** + * The user agent of the browser from which the Mandate was accepted by the customer. + */ + user_agent?: (string | null) +} +export interface MandateMultiUse { + +} +export interface MandatePaymentMethodDetails { + acss_debit?: MandateAcssDebit + au_becs_debit?: MandateAuBecsDebit + bacs_debit?: MandateBacsDebit + blik?: MandateBlik + card?: CardMandatePaymentMethodDetails + link?: MandateLink + sepa_debit?: MandateSepaDebit + /** + * The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. + */ + type: string + us_bank_account?: MandateUsBankAccount +} +export interface MandateAcssDebit { + /** + * List of Stripe products where this mandate can be selected automatically. + */ + default_for?: ("invoice" | "subscription")[] + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ + interval_description?: (string | null) + /** + * Payment schedule for the mandate. + */ + payment_schedule: ("combined" | "interval" | "sporadic") + /** + * Transaction type of the mandate. + */ + transaction_type: ("business" | "personal") +} +export interface MandateAuBecsDebit { + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ + url: string +} +export interface MandateBacsDebit { + /** + * The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + */ + network_status: ("accepted" | "pending" | "refused" | "revoked") + /** + * The unique reference identifying the mandate on the Bacs network. + */ + reference: string + /** + * The URL that will contain the mandate that the customer has signed. + */ + url: string +} +export interface MandateBlik { + /** + * Date at which the mandate expires. + */ + expires_after?: (number | null) + off_session?: MandateOptionsOffSessionDetailsBlik + /** + * Type of the mandate. + */ + type?: ("off_session" | "on_session" | null) +} +export interface MandateOptionsOffSessionDetailsBlik { + /** + * Amount of each recurring payment. + */ + amount?: (number | null) + /** + * Currency of each recurring payment. + */ + currency?: (string | null) + /** + * Frequency interval of each recurring payment. + */ + interval?: ("day" | "month" | "week" | "year" | null) + /** + * Frequency indicator of each recurring payment. + */ + interval_count?: (number | null) +} +export interface CardMandatePaymentMethodDetails { + +} +export interface MandateLink { + +} +export interface MandateSepaDebit { + /** + * The unique reference of the mandate. + */ + reference: string + /** + * The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + */ + url: string +} +export interface MandateUsBankAccount { + +} +export interface MandateSingleUse { + /** + * On a single use mandate, the amount of the payment. + */ + amount: number + /** + * On a single use mandate, the currency of the payment. + */ + currency: string +} +export interface SetupAttemptPaymentMethodDetailsBlik { + +} +export interface SetupAttemptPaymentMethodDetailsBoleto { + +} +export interface SetupAttemptPaymentMethodDetailsCard { + /** + * Populated if this authorization used 3D Secure authentication. + */ + three_d_secure?: (ThreeDSecureDetails | null) +} +export interface ThreeDSecureDetails { + /** + * For authenticated transactions: how the customer was authenticated by + * the issuing bank. + */ + authentication_flow?: ("challenge" | "frictionless" | null) + /** + * Indicates the outcome of 3D Secure authentication. + */ + result?: ("attempt_acknowledged" | "authenticated" | "exempted" | "failed" | "not_supported" | "processing_error" | null) + /** + * Additional information about why 3D Secure succeeded or failed based + * on the `result`. + */ + result_reason?: ("abandoned" | "bypassed" | "canceled" | "card_not_enrolled" | "network_not_supported" | "protocol_error" | "rejected" | null) + /** + * The version of 3D Secure that was used. + */ + version?: ("1.0.2" | "2.1.0" | "2.2.0" | null) +} +export interface SetupAttemptPaymentMethodDetailsCardPresent { + /** + * The ID of the Card PaymentMethod which was generated by this SetupAttempt. + */ + generated_card?: (string | PaymentMethod | null) +} +export interface SetupAttemptPaymentMethodDetailsIdeal { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ + bank?: ("abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot" | "yoursafe" | null) + /** + * The Bank Identifier Code of the customer's bank. + */ + bic?: ("ABNANL2A" | "ASNBNL21" | "BITSNL2A" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U" | null) + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ + generated_sepa_debit?: (string | PaymentMethod | null) + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ + generated_sepa_debit_mandate?: (string | Mandate | null) + /** + * Last four characters of the IBAN. + */ + iban_last4?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) +} +export interface SetupAttemptPaymentMethodDetailsKlarna { + +} +export interface SetupAttemptPaymentMethodDetailsLink { + +} +export interface SetupAttemptPaymentMethodDetailsSepaDebit { + +} +export interface SetupAttemptPaymentMethodDetailsSofort { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic?: (string | null) + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ + generated_sepa_debit?: (string | PaymentMethod | null) + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + */ + generated_sepa_debit_mandate?: (string | Mandate | null) + /** + * Last four characters of the IBAN. + */ + iban_last4?: (string | null) + /** + * Preferred language of the Sofort authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language?: ("de" | "en" | "fr" | "nl" | null) + /** + * Owner's verified full name. Values are verified or provided by Sofort directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) +} +export interface SetupAttemptPaymentMethodDetailsUsBankAccount { + +} +export interface APIErrors { + /** + * For card errors, the ID of the failed charge. + */ + charge?: string + /** + * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + */ + code?: string + /** + * For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + */ + decline_code?: string + /** + * A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + */ + doc_url?: string + /** + * A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + */ + message?: string + /** + * If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + */ + param?: string + payment_intent?: PaymentIntent + payment_method?: PaymentMethod + /** + * If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + */ + payment_method_type?: string + /** + * A URL to the request log entry in your dashboard. + */ + request_log_url?: string + setup_intent?: SetupIntent + /** + * The source object for errors returned on a request involving a source. + */ + source?: (BankAccount | Card | Source) + /** + * The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + */ + type: ("api_error" | "card_error" | "idempotency_error" | "invalid_request_error") +} +/** + * A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). + */ +export interface PaymentIntent { + /** + * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ + amount: number + /** + * Amount that can be captured from this PaymentIntent. + */ + amount_capturable?: number + amount_details?: PaymentFlowsAmountDetails + /** + * Amount that was collected by this PaymentIntent. + */ + amount_received?: number + /** + * ID of the Connect application that created the PaymentIntent. + */ + application?: (string | Application | null) + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + application_fee_amount?: (number | null) + /** + * Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + */ + automatic_payment_methods?: (PaymentFlowsAutomaticPaymentMethodsPaymentIntent | null) + /** + * Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + */ + canceled_at?: (number | null) + /** + * Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + */ + cancellation_reason?: ("abandoned" | "automatic" | "duplicate" | "failed_invoice" | "fraudulent" | "requested_by_customer" | "void_invoice" | null) + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method: ("automatic" | "manual") + /** + * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + */ + client_secret?: (string | null) + confirmation_method: ("automatic" | "manual") + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * ID of the invoice that created this PaymentIntent, if it exists. + */ + invoice?: (string | Invoice | null) + /** + * The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + */ + last_payment_error?: (APIErrors | null) + /** + * The latest charge created by this payment intent. + */ + latest_charge?: (string | Charge | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + */ + metadata?: { + [k: string]: string + } + /** + * If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + */ + next_action?: (PaymentIntentNextAction | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "payment_intent" + /** + * The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + */ + on_behalf_of?: (string | Account | null) + /** + * ID of the payment method used in this PaymentIntent. + */ + payment_method?: (string | PaymentMethod | null) + /** + * Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: (PaymentIntentPaymentMethodOptions | null) + /** + * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + */ + payment_method_types: string[] + /** + * If present, this property tells you about the processing state of the payment. + */ + processing?: (PaymentIntentProcessing | null) + /** + * Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + */ + receipt_email?: (string | null) + /** + * ID of the review associated with this PaymentIntent, if any. + */ + review?: (string | RadarReview | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("off_session" | "on_session" | null) + /** + * Shipping information for this PaymentIntent. + */ + shipping?: (Shipping | null) + /** + * For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. + */ + statement_descriptor?: (string | null) + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + */ + statement_descriptor_suffix?: (string | null) + /** + * Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + */ + status: ("canceled" | "processing" | "requires_action" | "requires_capture" | "requires_confirmation" | "requires_payment_method" | "succeeded") + /** + * The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + */ + transfer_data?: (TransferData | null) + /** + * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + */ + transfer_group?: (string | null) +} +export interface PaymentFlowsAmountDetails { + tip?: PaymentFlowsAmountDetailsResourceTip +} +export interface PaymentFlowsAmountDetailsResourceTip { + /** + * Portion of the amount that corresponds to a tip. + */ + amount?: number +} +export interface PaymentFlowsAutomaticPaymentMethodsPaymentIntent { + /** + * Automatically calculates compatible payment methods + */ + enabled: boolean +} +/** + * Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending). + */ +export interface Invoice { + /** + * The country of the business associated with this invoice, most often the business creating the invoice. + */ + account_country?: (string | null) + /** + * The public name of the business associated with this invoice, most often the business creating the invoice. + */ + account_name?: (string | null) + /** + * The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + */ + account_tax_ids?: ((string | TaxId | DeletedTaxId)[] | null) + /** + * Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + */ + amount_due: number + /** + * The amount, in %s, that was paid. + */ + amount_paid: number + /** + * The difference between amount_due and amount_paid, in %s. + */ + amount_remaining: number + /** + * This is the sum of all the shipping amounts. + */ + amount_shipping: number + /** + * ID of the Connect Application that created the invoice. + */ + application?: (string | Application | DeletedApplication | null) + /** + * The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + */ + application_fee_amount?: (number | null) + /** + * 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. + */ + attempt_count: number + /** + * Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + */ + attempted: boolean + /** + * Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. + */ + auto_advance?: boolean + automatic_tax: AutomaticTax + /** + * Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached. + */ + billing_reason?: ("automatic_pending_invoice_item_invoice" | "manual" | "quote_accept" | "subscription" | "subscription_create" | "subscription_cycle" | "subscription_threshold" | "subscription_update" | "upcoming" | null) + /** + * ID of the latest charge generated for this invoice, if any. + */ + charge?: (string | Charge | null) + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + */ + collection_method: ("charge_automatically" | "send_invoice") + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Custom fields displayed on the invoice. + */ + custom_fields?: (InvoiceSettingCustomField[] | null) + /** + * The ID of the customer who will be billed. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_address?: (Address | null) + /** + * The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_email?: (string | null) + /** + * The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_name?: (string | null) + /** + * The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_phone?: (string | null) + /** + * The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_shipping?: (Shipping | null) + /** + * The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_tax_exempt?: ("exempt" | "none" | "reverse" | null) + /** + * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + */ + customer_tax_ids?: (InvoicesResourceInvoiceTaxID[] | null) + /** + * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + */ + default_payment_method?: (string | PaymentMethod | null) + /** + * ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + */ + default_source?: (string | BankAccount | Card | Source | null) + /** + * The tax rates applied to this invoice, if any. + */ + default_tax_rates: TaxRate[] + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + */ + description?: (string | null) + /** + * Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + */ + discount?: (Discount | null) + /** + * The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ + discounts?: ((string | Discount | DeletedDiscount)[] | null) + /** + * The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + */ + due_date?: (number | null) + /** + * Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + */ + ending_balance?: (number | null) + /** + * Footer displayed on the invoice. + */ + footer?: (string | null) + /** + * Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: (InvoicesFromInvoice | null) + /** + * The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + */ + hosted_invoice_url?: (string | null) + /** + * Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + */ + id?: string + /** + * The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + */ + invoice_pdf?: (string | null) + /** + * The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + */ + last_finalization_error?: (APIErrors | null) + /** + * The ID of the most recent non-draft revision of this invoice + */ + latest_revision?: (string | Invoice | null) + lines: InvoiceLinesList + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + */ + next_payment_attempt?: (number | null) + /** + * A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + */ + number?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "invoice" + /** + * The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + */ + on_behalf_of?: (string | Account | null) + /** + * Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + */ + paid: boolean + /** + * Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + */ + paid_out_of_band: boolean + /** + * The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + */ + payment_intent?: (string | PaymentIntent | null) + payment_settings: InvoicesPaymentSettings + /** + * End of the usage period during which invoice items were added to this invoice. + */ + period_end: number + /** + * Start of the usage period during which invoice items were added to this invoice. + */ + period_start: number + /** + * Total amount of all post-payment credit notes issued for this invoice. + */ + post_payment_credit_notes_amount: number + /** + * Total amount of all pre-payment credit notes issued for this invoice. + */ + pre_payment_credit_notes_amount: number + /** + * The quote this invoice was generated from. + */ + quote?: (string | Quote | null) + /** + * This is the transaction number that appears on email receipts sent for this invoice. + */ + receipt_number?: (string | null) + /** + * Options for invoice PDF rendering. + */ + rendering_options?: (InvoiceSettingRenderingOptions | null) + /** + * The details of the cost of shipping, including the ShippingRate applied on the invoice. + */ + shipping_cost?: (InvoicesShippingCost | null) + /** + * Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + */ + shipping_details?: (Shipping | null) + /** + * Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + */ + starting_balance: number + /** + * Extra information about an invoice for the customer's credit card statement. + */ + statement_descriptor?: (string | null) + /** + * The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + */ + status?: ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void" | null) + status_transitions: InvoicesStatusTransitions + /** + * The subscription that this invoice was prepared for, if any. + */ + subscription?: (string | Subscription | null) + /** + * Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + */ + subscription_proration_date?: number + /** + * Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + */ + subtotal: number + /** + * The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + */ + subtotal_excluding_tax?: (number | null) + /** + * The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + */ + tax?: (number | null) + /** + * ID of the test clock this invoice belongs to. + */ + test_clock?: (string | TestClock | null) + threshold_reason?: InvoiceThresholdReason + /** + * Total after discounts and taxes. + */ + total: number + /** + * The aggregate amounts calculated per discount across all line items. + */ + total_discount_amounts?: (DiscountsResourceDiscountAmount[] | null) + /** + * The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. + */ + total_excluding_tax?: (number | null) + /** + * The aggregate amounts calculated per tax rate for all line items. + */ + total_tax_amounts: InvoiceTaxAmount[] + /** + * The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + */ + transfer_data?: (InvoiceTransferData | null) + /** + * Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ + webhooks_delivered_at?: (number | null) +} +/** + * You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). + * A customer's tax IDs are displayed on invoices and credit notes issued for the customer. + * + * Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). + */ +export interface TaxId { + /** + * Two-letter ISO code representing the country of the tax ID. + */ + country?: (string | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * ID of the customer. + */ + customer?: (string | Customer | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "tax_id" + /** + * Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + */ + type: ("ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "unknown" | "us_ein" | "za_vat") + /** + * Value of the tax ID. + */ + value: string + /** + * Tax ID verification information. + */ + verification?: (TaxIdVerification | null) +} +export interface TaxIdVerification { + /** + * Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + */ + status: ("pending" | "unavailable" | "unverified" | "verified") + /** + * Verified address. + */ + verified_address?: (string | null) + /** + * Verified name. + */ + verified_name?: (string | null) +} +export interface DeletedTaxId { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "tax_id" +} +export interface DeletedApplication { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * The name of the application. + */ + name?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "application" +} +export interface AutomaticTax { + /** + * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + */ + enabled: boolean + /** + * The status of the most recent automated tax calculation for this invoice. + */ + status?: ("complete" | "failed" | "requires_location_inputs" | null) +} +/** + * To charge a credit or a debit card, you create a `Charge` object. You can + * retrieve and refund individual charges as well as list all charges. Charges + * are identified by a unique, random ID. + * + * Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges). + */ +export interface Charge { + /** + * Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ + amount: number + /** + * Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). + */ + amount_captured: number + /** + * Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). + */ + amount_refunded: number + /** + * ID of the Connect application that created the charge. + */ + application?: (string | Application | null) + /** + * The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + */ + application_fee?: (string | PlatformFee | null) + /** + * The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + */ + application_fee_amount?: (number | null) + /** + * ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + */ + balance_transaction?: (string | BalanceTransaction | null) + billing_details: BillingDetails + /** + * 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. + */ + calculated_statement_descriptor?: (string | null) + /** + * If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + */ + captured: boolean + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * ID of the customer this charge is for if one exists. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Whether the charge has been disputed. + */ + disputed: boolean + /** + * ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + */ + failure_balance_transaction?: (string | BalanceTransaction | null) + /** + * Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + */ + failure_code?: (string | null) + /** + * Message to user further explaining reason for charge failure if available. + */ + failure_message?: (string | null) + /** + * Information on fraud assessments for the charge. + */ + fraud_details?: (ChargeFraudDetails | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * ID of the invoice this charge is for if one exists. + */ + invoice?: (string | Invoice | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "charge" + /** + * The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. + */ + on_behalf_of?: (string | Account | null) + /** + * Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + */ + outcome?: (ChargeOutcome | null) + /** + * `true` if the charge succeeded, or was successfully authorized for later capture. + */ + paid: boolean + /** + * ID of the PaymentIntent associated with this charge, if one exists. + */ + payment_intent?: (string | PaymentIntent | null) + /** + * ID of the payment method used in this charge. + */ + payment_method?: (string | null) + /** + * Details about the payment method at the time of the transaction. + */ + payment_method_details?: (PaymentMethodDetails | null) + radar_options?: RadarRadarOptions + /** + * This is the email address that the receipt for this charge was sent to. + */ + receipt_email?: (string | null) + /** + * This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + */ + receipt_number?: (string | null) + /** + * This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + */ + receipt_url?: (string | null) + /** + * Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + */ + refunded: boolean + refunds?: RefundList + /** + * ID of the review associated with this charge if one exists. + */ + review?: (string | RadarReview | null) + /** + * Shipping information for the charge. + */ + shipping?: (Shipping | null) + /** + * The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ + source_transfer?: (string | Transfer | null) + /** + * For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. + */ + statement_descriptor?: (string | null) + /** + * Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + */ + statement_descriptor_suffix?: (string | null) + /** + * The status of the payment is either `succeeded`, `pending`, or `failed`. + */ + status: ("failed" | "pending" | "succeeded") + /** + * ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + */ + transfer?: (string | Transfer) + /** + * An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ + transfer_data?: (ChargeTransferData | null) + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. + */ + transfer_group?: (string | null) +} +export interface PlatformFee { + /** + * ID of the Stripe account this fee was taken from. + */ + account: (string | Account) + /** + * Amount earned, in %s. + */ + amount: number + /** + * Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) + */ + amount_refunded: number + /** + * ID of the Connect application that earned the fee. + */ + application: (string | Application) + /** + * Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * ID of the charge that the application fee was taken from. + */ + charge: (string | Charge) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "application_fee" + /** + * ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + */ + originating_transaction?: (string | Charge | null) + /** + * Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + */ + refunded: boolean + refunds: FeeRefundList +} +/** + * Balance transactions represent funds moving through your Stripe account. + * They're created for every type of transaction that comes into or flows out of your Stripe account balance. + * + * Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types). + */ +export interface BalanceTransaction { + /** + * Gross amount of the transaction, in %s. + */ + amount: number + /** + * The date the transaction's net funds will become available in the Stripe balance. + */ + available_on: number + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. + */ + exchange_rate?: (number | null) + /** + * Fees (in %s) paid for this transaction. + */ + fee: number + /** + * Detailed breakdown of fees (in %s) paid for this transaction. + */ + fee_details: Fee[] + /** + * Unique identifier for the object. + */ + id: string + /** + * Net amount of the transaction, in %s. + */ + net: number + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "balance_transaction" + /** + * [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective. + */ + reporting_category: string + /** + * The Stripe object to which this transaction is related. + */ + source?: (string | PlatformFee | Charge | ConnectCollectionTransfer | Dispute | FeeRefund | IssuingAuthorization | IssuingDispute | IssuingTransaction | Payout | PlatformTax | Refund | ReserveTransaction | TaxDeductedAtSource | Topup | Transfer | TransferReversal | null) + /** + * If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. + */ + status: string + /** + * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + */ + type: ("adjustment" | "advance" | "advance_funding" | "anticipation_repayment" | "application_fee" | "application_fee_refund" | "charge" | "connect_collection_transfer" | "contribution" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" | "payment" | "payment_failure_refund" | "payment_refund" | "payout" | "payout_cancel" | "payout_failure" | "refund" | "refund_failure" | "reserve_transaction" | "reserved_funds" | "stripe_fee" | "stripe_fx_fee" | "tax_fee" | "topup" | "topup_reversal" | "transfer" | "transfer_cancel" | "transfer_failure" | "transfer_refund") +} +export interface Fee { + /** + * Amount of the fee, in cents. + */ + amount: number + /** + * ID of the Connect application that earned the fee. + */ + application?: (string | null) + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. + */ + type: string +} +export interface ConnectCollectionTransfer { + /** + * Amount transferred, in %s. + */ + amount: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * ID of the account that funds are being collected for. + */ + destination: (string | Account) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "connect_collection_transfer" +} +/** + * A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you're given the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. You can find more + * information about the dispute process in our [Disputes and + * Fraud](/docs/disputes) documentation. + * + * Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes). + */ +export interface Dispute { + /** + * Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). + */ + amount: number + /** + * List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + */ + balance_transactions: BalanceTransaction[] + /** + * ID of the charge that was disputed. + */ + charge: (string | Charge) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + evidence: DisputeEvidence + evidence_details: DisputeEvidenceDetails + /** + * Unique identifier for the object. + */ + id: string + /** + * If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. + */ + is_charge_refundable: boolean + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "dispute" + /** + * ID of the PaymentIntent that was disputed. + */ + payment_intent?: (string | PaymentIntent | null) + /** + * Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). + */ + reason: string + /** + * Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. + */ + status: ("charge_refunded" | "lost" | "needs_response" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won") +} +export interface DisputeEvidence { + /** + * Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. + */ + access_activity_log?: (string | null) + /** + * The billing address provided by the customer. + */ + billing_address?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + */ + cancellation_policy?: (string | File | null) + /** + * An explanation of how and when the customer was shown your refund policy prior to purchase. + */ + cancellation_policy_disclosure?: (string | null) + /** + * A justification for why the customer's subscription was not canceled. + */ + cancellation_rebuttal?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + */ + customer_communication?: (string | File | null) + /** + * The email address of the customer. + */ + customer_email_address?: (string | null) + /** + * The name of the customer. + */ + customer_name?: (string | null) + /** + * The IP address that the customer used when making the purchase. + */ + customer_purchase_ip?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + */ + customer_signature?: (string | File | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + */ + duplicate_charge_documentation?: (string | File | null) + /** + * An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. + */ + duplicate_charge_explanation?: (string | null) + /** + * The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + */ + duplicate_charge_id?: (string | null) + /** + * A description of the product or service that was sold. + */ + product_description?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + */ + receipt?: (string | File | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + */ + refund_policy?: (string | File | null) + /** + * Documentation demonstrating that the customer was shown your refund policy prior to purchase. + */ + refund_policy_disclosure?: (string | null) + /** + * A justification for why the customer is not entitled to a refund. + */ + refund_refusal_explanation?: (string | null) + /** + * The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + */ + service_date?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + */ + service_documentation?: (string | File | null) + /** + * The address to which a physical product was shipped. You should try to include as complete address information as possible. + */ + shipping_address?: (string | null) + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + */ + shipping_carrier?: (string | null) + /** + * The date on which a physical product began its route to the shipping address, in a clear human-readable format. + */ + shipping_date?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + */ + shipping_documentation?: (string | File | null) + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ + shipping_tracking_number?: (string | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + */ + uncategorized_file?: (string | File | null) + /** + * Any additional evidence or statements. + */ + uncategorized_text?: (string | null) +} +export interface DisputeEvidenceDetails { + /** + * Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute. + */ + due_by?: (number | null) + /** + * Whether evidence has been staged for this dispute. + */ + has_evidence: boolean + /** + * Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. + */ + past_due: boolean + /** + * The number of times evidence has been submitted. Typically, you may only submit evidence once. + */ + submission_count: number +} +/** + * `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee). + */ +export interface FeeRefund { + /** + * Amount, in %s. + */ + amount: number + /** + * Balance transaction that describes the impact on your account balance. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * ID of the application fee that was refunded. + */ + fee: (string | PlatformFee) + /** + * Unique identifier for the object. + */ + id: string + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "fee_refund" +} +/** + * When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + * purchase to be completed successfully. + * + * Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations). + */ +export interface IssuingAuthorization { + /** + * The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount: number + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount_details?: (IssuingAuthorizationAmountDetails | null) + /** + * Whether the authorization has been approved. + */ + approved: boolean + /** + * How the card details were provided. + */ + authorization_method: ("chip" | "contactless" | "keyed_in" | "online" | "swipe") + /** + * List of balance transactions associated with this authorization. + */ + balance_transactions: BalanceTransaction[] + card: IssuingCard + /** + * The cardholder to whom this authorization belongs. + */ + cardholder?: (string | IssuingCardholder | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + merchant_amount: number + /** + * The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + merchant_currency: string + merchant_data: IssuingAuthorizationMerchantData + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * Details about the authorization, such as identifiers, set by the card network. + */ + network_data?: (IssuingAuthorizationNetworkData | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "issuing.authorization" + /** + * The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + */ + pending_request?: (IssuingAuthorizationPendingRequest | null) + /** + * History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + */ + request_history: IssuingAuthorizationRequest[] + /** + * The current status of the authorization in its lifecycle. + */ + status: ("closed" | "pending" | "reversed") + /** + * List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + */ + transactions: IssuingTransaction[] + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + */ + treasury?: (IssuingAuthorizationTreasury | null) + verification_data: IssuingAuthorizationVerificationData + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + */ + wallet?: (string | null) +} +export interface IssuingAuthorizationAmountDetails { + /** + * The fee charged by the ATM for the cash withdrawal. + */ + atm_fee?: (number | null) +} +/** + * You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + */ +export interface IssuingCard { + /** + * The brand of the card. + */ + brand: string + /** + * The reason why the card was canceled. + */ + cancellation_reason?: ("design_rejected" | "lost" | "stolen" | null) + cardholder: IssuingCardholder + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + */ + currency: string + /** + * The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ + cvc?: string + /** + * The expiration month of the card. + */ + exp_month: number + /** + * The expiration year of the card. + */ + exp_year: number + /** + * The financial account this card is attached to. + */ + financial_account?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * The last 4 digits of the card number. + */ + last4: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + */ + number?: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "issuing.card" + /** + * The latest card that replaces this card, if any. + */ + replaced_by?: (string | IssuingCard | null) + /** + * The card this card replaces, if any. + */ + replacement_for?: (string | IssuingCard | null) + /** + * The reason why the previous card needed to be replaced. + */ + replacement_reason?: ("damaged" | "expired" | "lost" | "stolen" | null) + /** + * Where and how the card will be shipped. + */ + shipping?: (IssuingCardShipping | null) + spending_controls: IssuingCardAuthorizationControls + /** + * Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + */ + status: ("active" | "canceled" | "inactive") + /** + * The type of the card. + */ + type: ("physical" | "virtual") + /** + * Information relating to digital wallets (like Apple Pay and Google Pay). + */ + wallets?: (IssuingCardWallets | null) +} +/** + * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + * + * Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + */ +export interface IssuingCardholder { + billing: IssuingCardholderAddress + /** + * Additional information about a `company` cardholder. + */ + company?: (IssuingCardholderCompany | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The cardholder's email address. + */ + email?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Additional information about an `individual` cardholder. + */ + individual?: (IssuingCardholderIndividual | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * The cardholder's name. This will be printed on cards issued to them. + */ + name: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "issuing.cardholder" + /** + * The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + */ + phone_number?: (string | null) + requirements: IssuingCardholderRequirements + /** + * Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: (IssuingCardholderAuthorizationControls | null) + /** + * Specifies whether to permit authorizations on this cardholder's cards. + */ + status: ("active" | "blocked" | "inactive") + /** + * One of `individual` or `company`. + */ + type: ("company" | "individual") +} +export interface IssuingCardholderAddress { + address: Address +} +export interface IssuingCardholderCompany { + /** + * Whether the company's business ID number was provided. + */ + tax_id_provided: boolean +} +export interface IssuingCardholderIndividual { + /** + * Information related to the card_issuing program for this cardholder. + */ + card_issuing?: (IssuingCardholderCardIssuing | null) + /** + * The date of birth of this cardholder. + */ + dob?: (IssuingCardholderIndividualDOB | null) + /** + * The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ + first_name?: (string | null) + /** + * The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + */ + last_name?: (string | null) + /** + * Government-issued ID document for this cardholder. + */ + verification?: (IssuingCardholderVerification | null) +} +export interface IssuingCardholderCardIssuing { + /** + * Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + */ + user_terms_acceptance?: (IssuingCardholderUserTermsAcceptance | null) +} +export interface IssuingCardholderUserTermsAcceptance { + /** + * The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + */ + date?: (number | null) + /** + * The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + */ + ip?: (string | null) + /** + * The user agent of the browser from which the cardholder accepted the Authorized User Terms. + */ + user_agent?: (string | null) +} +export interface IssuingCardholderIndividualDOB { + /** + * The day of birth, between 1 and 31. + */ + day?: (number | null) + /** + * The month of birth, between 1 and 12. + */ + month?: (number | null) + /** + * The four-digit year of birth. + */ + year?: (number | null) +} +export interface IssuingCardholderVerification { + /** + * An identifying document, either a passport or local ID card. + */ + document?: (IssuingCardholderIdDocument | null) +} +export interface IssuingCardholderIdDocument { + /** + * The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ + back?: (string | File | null) + /** + * The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + */ + front?: (string | File | null) +} +export interface IssuingCardholderRequirements { + /** + * If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + */ + disabled_reason?: ("listed" | "rejected.listed" | "under_review" | null) + /** + * Array of fields that need to be collected in order to verify and re-enable the cardholder. + */ + past_due?: (("company.tax_id" | "individual.dob.day" | "individual.dob.month" | "individual.dob.year" | "individual.first_name" | "individual.last_name" | "individual.verification.document")[] | null) +} +export interface IssuingCardholderAuthorizationControls { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ + allowed_categories?: (("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" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "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_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" | "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")[] | null) + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ + blocked_categories?: (("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" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "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_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" | "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")[] | null) + /** + * Limit spending with amount-based rules that apply across this cardholder's cards. + */ + spending_limits?: (IssuingCardholderSpendingLimit[] | null) + /** + * Currency of the amounts within `spending_limits`. + */ + spending_limits_currency?: (string | null) +} +export interface IssuingCardholderSpendingLimit { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount: number + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ + categories?: (("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" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "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_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" | "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")[] | null) + /** + * Interval (or event) to which the amount applies. + */ + interval: ("all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly") +} +export interface IssuingCardShipping { + address: Address + /** + * The delivery company that shipped a card. + */ + carrier?: ("dhl" | "fedex" | "royal_mail" | "usps" | null) + /** + * Additional information that may be required for clearing customs. + */ + customs?: (IssuingCardShippingCustoms | null) + /** + * A unix timestamp representing a best estimate of when the card will be delivered. + */ + eta?: (number | null) + /** + * Recipient name. + */ + name: string + /** + * The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. + */ + phone_number?: (string | null) + /** + * Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. + */ + require_signature?: (boolean | null) + /** + * Shipment service, such as `standard` or `express`. + */ + service: ("express" | "priority" | "standard") + /** + * The delivery status of the card. + */ + status?: ("canceled" | "delivered" | "failure" | "pending" | "returned" | "shipped" | null) + /** + * A tracking number for a card shipment. + */ + tracking_number?: (string | null) + /** + * A link to the shipping carrier's site where you can view detailed information about a card shipment. + */ + tracking_url?: (string | null) + /** + * Packaging options. + */ + type: ("bulk" | "individual") +} +export interface IssuingCardShippingCustoms { + /** + * A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. + */ + eori_number?: (string | null) +} +export interface IssuingCardAuthorizationControls { + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + */ + allowed_categories?: (("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" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "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_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" | "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")[] | null) + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + */ + blocked_categories?: (("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" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "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_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" | "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")[] | null) + /** + * Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + */ + spending_limits?: (IssuingCardSpendingLimit[] | null) + /** + * Currency of the amounts within `spending_limits`. Always the same as the currency of the card. + */ + spending_limits_currency?: (string | null) +} +export interface IssuingCardSpendingLimit { + /** + * Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount: number + /** + * Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + */ + categories?: (("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" | "electrical_parts_and_equipment" | "electrical_services" | "electronics_repair_shops" | "electronics_stores" | "elementary_secondary_schools" | "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_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" | "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")[] | null) + /** + * Interval (or event) to which the amount applies. + */ + interval: ("all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly") +} +export interface IssuingCardWallets { + apple_pay: IssuingCardApplePay + google_pay: IssuingCardGooglePay + /** + * Unique identifier for a card used with digital wallets + */ + primary_account_identifier?: (string | null) +} +export interface IssuingCardApplePay { + /** + * Apple Pay Eligibility + */ + eligible: boolean + /** + * Reason the card is ineligible for Apple Pay + */ + ineligible_reason?: ("missing_agreement" | "missing_cardholder_contact" | "unsupported_region" | null) +} +export interface IssuingCardGooglePay { + /** + * Google Pay Eligibility + */ + eligible: boolean + /** + * Reason the card is ineligible for Google Pay + */ + ineligible_reason?: ("missing_agreement" | "missing_cardholder_contact" | "unsupported_region" | null) +} +export interface IssuingAuthorizationMerchantData { + /** + * A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + */ + category: string + /** + * The merchant category code for the seller’s business + */ + category_code: string + /** + * City where the seller is located + */ + city?: (string | null) + /** + * Country where the seller is located + */ + country?: (string | null) + /** + * Name of the seller + */ + name?: (string | null) + /** + * Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + */ + network_id: string + /** + * Postal code where the seller is located + */ + postal_code?: (string | null) + /** + * State where the seller is located + */ + state?: (string | null) +} +export interface IssuingAuthorizationNetworkData { + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. + */ + acquiring_institution_id?: (string | null) +} +export interface IssuingAuthorizationPendingRequest { + /** + * The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount: number + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount_details?: (IssuingAuthorizationAmountDetails | null) + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + */ + is_amount_controllable: boolean + /** + * The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + merchant_amount: number + /** + * The local currency the merchant is requesting to authorize. + */ + merchant_currency: string +} +export interface IssuingAuthorizationRequest { + /** + * The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. + */ + amount: number + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount_details?: (IssuingAuthorizationAmountDetails | null) + /** + * Whether this request was approved. + */ + approved: boolean + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + merchant_amount: number + /** + * The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + merchant_currency: string + /** + * When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. + */ + reason: ("account_disabled" | "card_active" | "card_inactive" | "cardholder_inactive" | "cardholder_verification_required" | "insufficient_funds" | "not_allowed" | "spending_controls" | "suspected_fraud" | "verification_failed" | "webhook_approved" | "webhook_declined" | "webhook_error" | "webhook_timeout") + /** + * If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field. + */ + reason_message?: (string | null) +} +/** + * Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + * your Stripe account, such as a completed purchase or refund, is represented by an Issuing + * `Transaction` object. + * + * Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions). + */ +export interface IssuingTransaction { + /** + * The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount: number + /** + * Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount_details?: (IssuingTransactionAmountDetails | null) + /** + * The `Authorization` object that led to this transaction. + */ + authorization?: (string | IssuingAuthorization | null) + /** + * ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * The card used to make this transaction. + */ + card: (string | IssuingCard) + /** + * The cardholder to whom this transaction belongs. + */ + cardholder?: (string | IssuingCardholder | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * If you've disputed the transaction, the ID of the dispute. + */ + dispute?: (string | IssuingDispute | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + */ + merchant_amount: number + /** + * The currency with which the merchant is taking payment. + */ + merchant_currency: string + merchant_data: IssuingAuthorizationMerchantData + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "issuing.transaction" + /** + * Additional purchase information that is optionally provided by the merchant. + */ + purchase_details?: (IssuingTransactionPurchaseDetails | null) + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ + treasury?: (IssuingTransactionTreasury | null) + /** + * The nature of the transaction. + */ + type: ("capture" | "refund") + /** + * The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + */ + wallet?: ("apple_pay" | "google_pay" | "samsung_pay" | null) +} +export interface IssuingTransactionAmountDetails { + /** + * The fee charged by the ATM for the cash withdrawal. + */ + atm_fee?: (number | null) +} +/** + * As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) + */ +export interface IssuingDispute { + /** + * Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + */ + amount: number + /** + * List of balance transactions associated with the dispute. + */ + balance_transactions?: (BalanceTransaction[] | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The currency the `transaction` was made in. + */ + currency: string + evidence: IssuingDisputeEvidence + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "issuing.dispute" + /** + * Current status of the dispute. + */ + status: ("expired" | "lost" | "submitted" | "unsubmitted" | "won") + /** + * The transaction being disputed. + */ + transaction: (string | IssuingTransaction) + /** + * [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + */ + treasury?: (IssuingDisputeTreasury | null) +} +export interface IssuingDisputeEvidence { + canceled?: IssuingDisputeCanceledEvidence + duplicate?: IssuingDisputeDuplicateEvidence + fraudulent?: IssuingDisputeFraudulentEvidence + merchandise_not_as_described?: IssuingDisputeMerchandiseNotAsDescribedEvidence + not_received?: IssuingDisputeNotReceivedEvidence + other?: IssuingDisputeOtherEvidence + /** + * The reason for filing the dispute. Its value will match the field containing the evidence. + */ + reason: ("canceled" | "duplicate" | "fraudulent" | "merchandise_not_as_described" | "not_received" | "other" | "service_not_as_described") + service_not_as_described?: IssuingDisputeServiceNotAsDescribedEvidence +} +export interface IssuingDisputeCanceledEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * Date when order was canceled. + */ + canceled_at?: (number | null) + /** + * Whether the cardholder was provided with a cancellation policy. + */ + cancellation_policy_provided?: (boolean | null) + /** + * Reason for canceling the order. + */ + cancellation_reason?: (string | null) + /** + * Date when the cardholder expected to receive the product. + */ + expected_at?: (number | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) + /** + * Description of the merchandise or service that was purchased. + */ + product_description?: (string | null) + /** + * Whether the product was a merchandise or service. + */ + product_type?: ("merchandise" | "service" | null) + /** + * Result of cardholder's attempt to return the product. + */ + return_status?: ("merchant_rejected" | "successful" | null) + /** + * Date when the product was returned or attempted to be returned. + */ + returned_at?: (number | null) +} +export interface IssuingDisputeDuplicateEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + */ + card_statement?: (string | File | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + */ + cash_receipt?: (string | File | null) + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + */ + check_image?: (string | File | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) + /** + * Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + */ + original_transaction?: (string | null) +} +export interface IssuingDisputeFraudulentEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) +} +export interface IssuingDisputeMerchandiseNotAsDescribedEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) + /** + * Date when the product was received. + */ + received_at?: (number | null) + /** + * Description of the cardholder's attempt to return the product. + */ + return_description?: (string | null) + /** + * Result of cardholder's attempt to return the product. + */ + return_status?: ("merchant_rejected" | "successful" | null) + /** + * Date when the product was returned or attempted to be returned. + */ + returned_at?: (number | null) +} +export interface IssuingDisputeNotReceivedEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * Date when the cardholder expected to receive the product. + */ + expected_at?: (number | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) + /** + * Description of the merchandise or service that was purchased. + */ + product_description?: (string | null) + /** + * Whether the product was a merchandise or service. + */ + product_type?: ("merchandise" | "service" | null) +} +export interface IssuingDisputeOtherEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) + /** + * Description of the merchandise or service that was purchased. + */ + product_description?: (string | null) + /** + * Whether the product was a merchandise or service. + */ + product_type?: ("merchandise" | "service" | null) +} +export interface IssuingDisputeServiceNotAsDescribedEvidence { + /** + * (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + */ + additional_documentation?: (string | File | null) + /** + * Date when order was canceled. + */ + canceled_at?: (number | null) + /** + * Reason for canceling the order. + */ + cancellation_reason?: (string | null) + /** + * Explanation of why the cardholder is disputing this transaction. + */ + explanation?: (string | null) + /** + * Date when the product was received. + */ + received_at?: (number | null) +} +export interface IssuingDisputeTreasury { + /** + * The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute + */ + debit_reversal?: (string | null) + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. + */ + received_debit: string +} +export interface IssuingTransactionPurchaseDetails { + /** + * Information about the flight that was purchased with this transaction. + */ + flight?: (IssuingTransactionFlightData | null) + /** + * Information about fuel that was purchased with this transaction. + */ + fuel?: (IssuingTransactionFuelData | null) + /** + * Information about lodging that was purchased with this transaction. + */ + lodging?: (IssuingTransactionLodgingData | null) + /** + * The line items in the purchase. + */ + receipt?: (IssuingTransactionReceiptData[] | null) + /** + * A merchant-specific order number. + */ + reference?: (string | null) +} +export interface IssuingTransactionFlightData { + /** + * The time that the flight departed. + */ + departure_at?: (number | null) + /** + * The name of the passenger. + */ + passenger_name?: (string | null) + /** + * Whether the ticket is refundable. + */ + refundable?: (boolean | null) + /** + * The legs of the trip. + */ + segments?: (IssuingTransactionFlightDataLeg[] | null) + /** + * The travel agency that issued the ticket. + */ + travel_agency?: (string | null) +} +export interface IssuingTransactionFlightDataLeg { + /** + * The three-letter IATA airport code of the flight's destination. + */ + arrival_airport_code?: (string | null) + /** + * The airline carrier code. + */ + carrier?: (string | null) + /** + * The three-letter IATA airport code that the flight departed from. + */ + departure_airport_code?: (string | null) + /** + * The flight number. + */ + flight_number?: (string | null) + /** + * The flight's service class. + */ + service_class?: (string | null) + /** + * Whether a stopover is allowed on this flight. + */ + stopover_allowed?: (boolean | null) +} +export interface IssuingTransactionFuelData { + /** + * The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + */ + type: string + /** + * The units for `volume_decimal`. One of `us_gallon` or `liter`. + */ + unit: string + /** + * The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ + unit_cost_decimal: string + /** + * The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. + */ + volume_decimal?: (string | null) +} +export interface IssuingTransactionLodgingData { + /** + * The time of checking into the lodging. + */ + check_in_at?: (number | null) + /** + * The number of nights stayed at the lodging. + */ + nights?: (number | null) +} +export interface IssuingTransactionReceiptData { + /** + * The description of the item. The maximum length of this field is 26 characters. + */ + description?: (string | null) + /** + * The quantity of the item. + */ + quantity?: (number | null) + /** + * The total for this line item in cents. + */ + total?: (number | null) + /** + * The unit cost of the item in cents. + */ + unit_cost?: (number | null) +} +export interface IssuingTransactionTreasury { + /** + * The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund + */ + received_credit?: (string | null) + /** + * The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture + */ + received_debit?: (string | null) +} +export interface IssuingAuthorizationTreasury { + /** + * The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization + */ + received_credits: string[] + /** + * The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization + */ + received_debits: string[] + /** + * The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization + */ + transaction?: (string | null) +} +export interface IssuingAuthorizationVerificationData { + /** + * Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + */ + address_line1_check: ("match" | "mismatch" | "not_provided") + /** + * Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + */ + address_postal_code_check: ("match" | "mismatch" | "not_provided") + /** + * Whether the cardholder provided a CVC and if it matched Stripe’s record. + */ + cvc_check: ("match" | "mismatch" | "not_provided") + /** + * Whether the cardholder provided an expiry date and if it matched Stripe’s record. + */ + expiry_check: ("match" | "mismatch" | "not_provided") +} +/** + * A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * as well as list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). + */ +export interface Payout { + /** + * Amount (in %s) to be transferred to your bank account or debit card. + */ + amount: number + /** + * Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. + */ + arrival_date: number + /** + * Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). + */ + automatic: boolean + /** + * ID of the balance transaction that describes the impact of this payout on your account balance. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * ID of the bank account or card the payout was sent to. + */ + destination?: (string | BankAccount | Card | DeletedBankAccount | DeletedCard | null) + /** + * If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. + */ + failure_balance_transaction?: (string | BalanceTransaction | null) + /** + * Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. + */ + failure_code?: (string | null) + /** + * Message to user further explaining reason for payout failure if available. + */ + failure_message?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) + */ + method: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "payout" + /** + * If the payout reverses another, this is the ID of the original payout. + */ + original_payout?: (string | Payout | null) + /** + * If the payout was reversed, this is the ID of the payout that reverses this payout. + */ + reversed_by?: (string | Payout | null) + /** + * The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. + */ + source_type: string + /** + * Extra information about a payout to be displayed on the user's bank statement. + */ + statement_descriptor?: (string | null) + /** + * Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`. + */ + status: string + /** + * Can be `bank_account` or `card`. + */ + type: ("bank_account" | "card") +} +export interface DeletedBankAccount { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ + currency?: (string | null) + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "bank_account" +} +export interface DeletedCard { + /** + * Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + */ + currency?: (string | null) + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "card" +} +export interface PlatformTax { + /** + * The Connected account that incurred this charge. + */ + account: string + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "platform_tax_fee" + /** + * The payment object that caused this tax to be inflicted. + */ + source_transaction: string + /** + * The type of tax (VAT). + */ + type: string +} +/** + * `Refund` objects allow you to refund a charge that has previously been created + * but not yet refunded. Funds will be refunded to the credit or debit card that + * was originally charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds). + */ +export interface Refund { + /** + * Amount, in %s. + */ + amount: number + /** + * Balance transaction that describes the impact on your account balance. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * ID of the charge that was refunded. + */ + charge?: (string | Charge | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) + */ + description?: string + /** + * If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + */ + failure_balance_transaction?: (string | BalanceTransaction) + /** + * If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request` or `unknown`. + */ + failure_reason?: string + /** + * Unique identifier for the object. + */ + id: string + /** + * Email to which refund instructions, if required, are sent to. + */ + instructions_email?: string + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + next_action?: RefundNextAction + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "refund" + /** + * ID of the PaymentIntent that was refunded. + */ + payment_intent?: (string | PaymentIntent | null) + /** + * Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + */ + reason?: ("duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | null) + /** + * This is the transaction number that appears on email receipts sent for this refund. + */ + receipt_number?: (string | null) + /** + * The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. + */ + source_transfer_reversal?: (string | TransferReversal | null) + /** + * Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. + */ + status?: (string | null) + /** + * If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. + */ + transfer_reversal?: (string | TransferReversal | null) +} +export interface RefundNextAction { + /** + * Contains the refund details. + */ + display_details?: (RefundNextActionDisplayDetails | null) + /** + * Type of the next action to perform. + */ + type: string +} +export interface RefundNextActionDisplayDetails { + email_sent: EmailSent + /** + * The expiry timestamp. + */ + expires_at: number +} +export interface EmailSent { + /** + * The timestamp when the email was sent. + */ + email_sent_at: number + /** + * The recipient's email address. + */ + email_sent_to: string +} +/** + * [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). + */ +export interface TransferReversal { + /** + * Amount, in %s. + */ + amount: number + /** + * Balance transaction that describes the impact on your account balance. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Linked payment refund for the transfer reversal. + */ + destination_payment_refund?: (string | Refund | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "transfer_reversal" + /** + * ID of the refund responsible for the transfer reversal. + */ + source_refund?: (string | Refund | null) + /** + * ID of the transfer that was reversed. + */ + transfer: (string | Transfer) +} +/** + * A `Transfer` object is created when you move funds between Stripe accounts as + * part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a + * Stripe account to a card or bank account. This behavior has since been split + * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + * information, read about the + * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + * + * Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). + */ +export interface Transfer { + /** + * Amount in %s to be transferred. + */ + amount: number + /** + * Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + */ + amount_reversed: number + /** + * Balance transaction that describes the impact of this transfer on your account balance. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * Time that this record of the transfer was first created. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * ID of the Stripe account the transfer was sent to. + */ + destination?: (string | Account | null) + /** + * If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + */ + destination_payment?: (string | Charge) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "transfer" + reversals: TransferReversalList + /** + * Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + */ + reversed: boolean + /** + * ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + */ + source_transaction?: (string | Charge | null) + /** + * The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + */ + source_type?: string + /** + * A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. + */ + transfer_group?: (string | null) +} +/** + * A list of reversals that have been applied to the transfer. + */ +export interface TransferReversalList { + /** + * Details about each object. + */ + data: TransferReversal[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface ReserveTransaction { + amount: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "reserve_transaction" +} +export interface TaxDeductedAtSource { + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "tax_deducted_at_source" + /** + * The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ + period_end: number + /** + * The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ + period_start: number + /** + * The TAN that was supplied to Stripe when TDS was assessed + */ + tax_deduction_account_number: string +} +/** + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). + */ +export interface Topup { + /** + * Amount transferred. + */ + amount: number + /** + * ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + */ + balance_transaction?: (string | BalanceTransaction | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + */ + expected_availability_date?: (number | null) + /** + * Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + */ + failure_code?: (string | null) + /** + * Message to user further explaining reason for top-up failure if available. + */ + failure_message?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "topup" + /** + * For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. + */ + source?: (Source | null) + /** + * Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + */ + statement_descriptor?: (string | null) + /** + * The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + */ + status: ("canceled" | "failed" | "pending" | "reversed" | "succeeded") + /** + * A string that identifies this top-up as part of a group. + */ + transfer_group?: (string | null) +} +/** + * A list of refunds that have been applied to the fee. + */ +export interface FeeRefundList { + /** + * Details about each object. + */ + data: FeeRefund[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface ChargeFraudDetails { + /** + * Assessments from Stripe. If set, the value is `fraudulent`. + */ + stripe_report?: string + /** + * Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. + */ + user_report?: string +} +export interface ChargeOutcome { + /** + * Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. + */ + network_status?: (string | null) + /** + * An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. + */ + reason?: (string | null) + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. + */ + risk_level?: string + /** + * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. + */ + risk_score?: number + /** + * The ID of the Radar rule that matched the payment, if applicable. + */ + rule?: (string | RadarRule) + /** + * A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. + */ + seller_message?: (string | null) + /** + * Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. + */ + type: string +} +export interface RadarRule { + /** + * The action taken on the payment. + */ + action: string + /** + * Unique identifier for the object. + */ + id: string + /** + * The predicate to evaluate the payment against. + */ + predicate: string +} +export interface PaymentMethodDetails { + ach_credit_transfer?: PaymentMethodDetailsAchCreditTransfer + ach_debit?: PaymentMethodDetailsAchDebit + acss_debit?: PaymentMethodDetailsAcssDebit + affirm?: PaymentMethodDetailsAffirm + afterpay_clearpay?: PaymentMethodDetailsAfterpayClearpay + alipay?: PaymentFlowsPrivatePaymentMethodsAlipayDetails + au_becs_debit?: PaymentMethodDetailsAuBecsDebit + bacs_debit?: PaymentMethodDetailsBacsDebit + bancontact?: PaymentMethodDetailsBancontact + blik?: PaymentMethodDetailsBlik + boleto?: PaymentMethodDetailsBoleto + card?: PaymentMethodDetailsCard + card_present?: PaymentMethodDetailsCardPresent + customer_balance?: PaymentMethodDetailsCustomerBalance + eps?: PaymentMethodDetailsEps + fpx?: PaymentMethodDetailsFpx + giropay?: PaymentMethodDetailsGiropay + grabpay?: PaymentMethodDetailsGrabpay + ideal?: PaymentMethodDetailsIdeal + interac_present?: PaymentMethodDetailsInteracPresent + klarna?: PaymentMethodDetailsKlarna + konbini?: PaymentMethodDetailsKonbini + link?: PaymentMethodDetailsLink + multibanco?: PaymentMethodDetailsMultibanco + oxxo?: PaymentMethodDetailsOxxo + p24?: PaymentMethodDetailsP24 + paynow?: PaymentMethodDetailsPaynow + pix?: PaymentMethodDetailsPix + promptpay?: PaymentMethodDetailsPromptpay + sepa_debit?: PaymentMethodDetailsSepaDebit + sofort?: PaymentMethodDetailsSofort + stripe_account?: PaymentMethodDetailsStripeAccount + /** + * The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ + type: string + us_bank_account?: PaymentMethodDetailsUsBankAccount + wechat?: PaymentMethodDetailsWechat + wechat_pay?: PaymentMethodDetailsWechatPay +} +export interface PaymentMethodDetailsAchCreditTransfer { + /** + * Account number to transfer funds to. + */ + account_number?: (string | null) + /** + * Name of the bank associated with the routing number. + */ + bank_name?: (string | null) + /** + * Routing transit number for the bank account to transfer funds to. + */ + routing_number?: (string | null) + /** + * SWIFT code of the bank associated with the routing number. + */ + swift_code?: (string | null) +} +export interface PaymentMethodDetailsAchDebit { + /** + * Type of entity that holds the account. This can be either `individual` or `company`. + */ + account_holder_type?: ("company" | "individual" | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * Routing transit number of the bank account. + */ + routing_number?: (string | null) +} +export interface PaymentMethodDetailsAcssDebit { + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Institution number of the bank account + */ + institution_number?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * ID of the mandate used to make this payment. + */ + mandate?: string + /** + * Transit number of the bank account. + */ + transit_number?: (string | null) +} +export interface PaymentMethodDetailsAffirm { + +} +export interface PaymentMethodDetailsAfterpayClearpay { + /** + * Order identifier shown to the merchant in Afterpay’s online portal. + */ + reference?: (string | null) +} +export interface PaymentFlowsPrivatePaymentMethodsAlipayDetails { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ + buyer_id?: string + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ + fingerprint?: (string | null) + /** + * Transaction ID of this particular Alipay transaction. + */ + transaction_id?: (string | null) +} +export interface PaymentMethodDetailsAuBecsDebit { + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * ID of the mandate used to make this payment. + */ + mandate?: string +} +export interface PaymentMethodDetailsBacsDebit { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * ID of the mandate used to make this payment. + */ + mandate?: (string | null) + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code?: (string | null) +} +export interface PaymentMethodDetailsBancontact { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic?: (string | null) + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit?: (string | PaymentMethod | null) + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate?: (string | Mandate | null) + /** + * Last four characters of the IBAN. + */ + iban_last4?: (string | null) + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language?: ("de" | "en" | "fr" | "nl" | null) + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) +} +export interface PaymentMethodDetailsBlik { + +} +export interface PaymentMethodDetailsBoleto { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) + */ + tax_id: string +} +export interface PaymentMethodDetailsCard { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand?: (string | null) + /** + * Check results by Card networks on Card address and CVC at time of payment. + */ + checks?: (PaymentMethodDetailsCardChecks | null) + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country?: (string | null) + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: (string | null) + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding?: (string | null) + /** + * Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments?: (PaymentMethodDetailsCardInstallments | null) + /** + * The last four digits of the card. + */ + last4?: (string | null) + /** + * ID of the mandate used to make this payment or created by it. + */ + mandate?: (string | null) + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network?: (string | null) + /** + * Populated if this transaction used 3D Secure authentication. + */ + three_d_secure?: (ThreeDSecureDetails | null) + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ + wallet?: (PaymentMethodDetailsCardWallet | null) +} +export interface PaymentMethodDetailsCardChecks { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_line1_check?: (string | null) + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_postal_code_check?: (string | null) + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + cvc_check?: (string | null) +} +export interface PaymentMethodDetailsCardInstallments { + /** + * Installment plan selected for the payment. + */ + plan?: (PaymentMethodDetailsCardInstallmentsPlan | null) +} +export interface PaymentMethodDetailsCardInstallmentsPlan { + /** + * For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + */ + count?: (number | null) + /** + * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + */ + interval?: ("month" | null) + /** + * Type of installment plan, one of `fixed_count`. + */ + type: "fixed_count" +} +export interface PaymentMethodDetailsCardWallet { + amex_express_checkout?: PaymentMethodDetailsCardWalletAmexExpressCheckout + apple_pay?: PaymentMethodDetailsCardWalletApplePay + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ + dynamic_last4?: (string | null) + google_pay?: PaymentMethodDetailsCardWalletGooglePay + masterpass?: PaymentMethodDetailsCardWalletMasterpass + samsung_pay?: PaymentMethodDetailsCardWalletSamsungPay + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ + type: ("amex_express_checkout" | "apple_pay" | "google_pay" | "masterpass" | "samsung_pay" | "visa_checkout") + visa_checkout?: PaymentMethodDetailsCardWalletVisaCheckout +} +export interface PaymentMethodDetailsCardWalletAmexExpressCheckout { + +} +export interface PaymentMethodDetailsCardWalletApplePay { + +} +export interface PaymentMethodDetailsCardWalletGooglePay { + +} +export interface PaymentMethodDetailsCardWalletMasterpass { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + billing_address?: (Address | null) + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + email?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + name?: (string | null) + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + shipping_address?: (Address | null) +} +export interface PaymentMethodDetailsCardWalletSamsungPay { + +} +export interface PaymentMethodDetailsCardWalletVisaCheckout { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + billing_address?: (Address | null) + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + email?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + name?: (string | null) + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + shipping_address?: (Address | null) +} +export interface PaymentMethodDetailsCustomerBalance { + +} +export interface PaymentMethodDetailsEps { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ + bank?: ("arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau" | null) + /** + * Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: (string | null) +} +export interface PaymentMethodDetailsFpx { + /** + * The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ + bank: ("affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob") + /** + * Unique transaction id generated by FPX for every request from the merchant + */ + transaction_id?: (string | null) +} +export interface PaymentMethodDetailsGiropay { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: (string | null) +} +export interface PaymentMethodDetailsGrabpay { + /** + * Unique transaction id generated by GrabPay + */ + transaction_id?: (string | null) +} +export interface PaymentMethodDetailsIdeal { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ + bank?: ("abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot" | "yoursafe" | null) + /** + * The Bank Identifier Code of the customer's bank. + */ + bic?: ("ABNANL2A" | "ASNBNL21" | "BITSNL2A" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U" | null) + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit?: (string | PaymentMethod | null) + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate?: (string | Mandate | null) + /** + * Last four characters of the IBAN. + */ + iban_last4?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) +} +export interface PaymentMethodDetailsInteracPresent { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ + brand?: (string | null) + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name?: (string | null) + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country?: (string | null) + /** + * Authorization response cryptogram. + */ + emv_auth_data?: (string | null) + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: (string | null) + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding?: (string | null) + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ + generated_card?: (string | null) + /** + * The last four digits of the card. + */ + last4?: (string | null) + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network?: (string | null) + /** + * EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + */ + preferred_locales?: (string[] | null) + /** + * How card details were read in this transaction. + */ + read_method?: ("contact_emv" | "contactless_emv" | "contactless_magstripe_mode" | "magnetic_stripe_fallback" | "magnetic_stripe_track2" | null) + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt?: (PaymentMethodDetailsInteracPresentReceipt | null) +} +export interface PaymentMethodDetailsInteracPresentReceipt { + /** + * The type of account being debited or credited + */ + account_type?: ("checking" | "savings" | "unknown") + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram?: (string | null) + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name?: (string | null) + /** + * Identifier for this transaction. + */ + authorization_code?: (string | null) + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code?: (string | null) + /** + * How the cardholder verified ownership of the card. + */ + cardholder_verification_method?: (string | null) + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name?: (string | null) + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results?: (string | null) + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information?: (string | null) +} +export interface PaymentMethodDetailsKlarna { + /** + * The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ + payment_method_category?: (string | null) + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + */ + preferred_locale?: (string | null) +} +export interface PaymentMethodDetailsKonbini { + /** + * If the payment succeeded, this contains the details of the convenience store where the payment was completed. + */ + store?: (PaymentMethodDetailsKonbiniStore | null) +} +export interface PaymentMethodDetailsKonbiniStore { + /** + * The name of the convenience store chain where the payment was completed. + */ + chain?: ("familymart" | "lawson" | "ministop" | "seicomart" | null) +} +export interface PaymentMethodDetailsLink { + +} +export interface PaymentMethodDetailsMultibanco { + /** + * Entity number associated with this Multibanco payment. + */ + entity?: (string | null) + /** + * Reference number associated with this Multibanco payment. + */ + reference?: (string | null) +} +export interface PaymentMethodDetailsOxxo { + /** + * OXXO reference number + */ + number?: (string | null) +} +export interface PaymentMethodDetailsP24 { + /** + * 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`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + */ + bank?: ("alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank" | null) + /** + * Unique reference for this Przelewy24 payment. + */ + reference?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + verified_name?: (string | null) +} +export interface PaymentMethodDetailsPaynow { + /** + * Reference number associated with this PayNow payment + */ + reference?: (string | null) +} +export interface PaymentMethodDetailsPix { + /** + * Unique transaction id generated by BCB + */ + bank_transaction_id?: (string | null) +} +export interface PaymentMethodDetailsPromptpay { + /** + * Bill reference generated by PromptPay + */ + reference?: (string | null) +} +export interface PaymentMethodDetailsSepaDebit { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Branch code of bank associated with the bank account. + */ + branch_code?: (string | null) + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four characters of the IBAN. + */ + last4?: (string | null) + /** + * ID of the mandate used to make this payment. + */ + mandate?: (string | null) +} +export interface PaymentMethodDetailsSofort { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic?: (string | null) + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country?: (string | null) + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit?: (string | PaymentMethod | null) + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate?: (string | Mandate | null) + /** + * Last four characters of the IBAN. + */ + iban_last4?: (string | null) + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ + preferred_language?: ("de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null) + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: (string | null) +} +export interface PaymentMethodDetailsStripeAccount { + +} +export interface PaymentMethodDetailsUsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type?: ("company" | "individual" | null) + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type?: ("checking" | "savings" | null) + /** + * Name of the bank associated with the bank account. + */ + bank_name?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * Routing number of the bank account. + */ + routing_number?: (string | null) +} +export interface PaymentMethodDetailsWechat { + +} +export interface PaymentMethodDetailsWechatPay { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + */ + fingerprint?: (string | null) + /** + * Transaction ID of this particular WeChat Pay transaction. + */ + transaction_id?: (string | null) +} +/** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ +export interface RadarRadarOptions { + /** + * A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + */ + session?: string +} +/** + * Reviews can be used to supplement automated fraud detection with human expertise. + * + * Learn more about [Radar](/radar) and reviewing payments + * [here](https://stripe.com/docs/radar/reviews). + */ +export interface RadarReview { + /** + * The ZIP or postal code of the card used, if applicable. + */ + billing_zip?: (string | null) + /** + * The charge associated with this review. + */ + charge?: (string | Charge | null) + /** + * The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + */ + closed_reason?: ("approved" | "disputed" | "redacted" | "refunded" | "refunded_as_fraud" | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Unique identifier for the object. + */ + id: string + /** + * The IP address where the payment originated. + */ + ip_address?: (string | null) + /** + * Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + */ + ip_address_location?: (RadarReviewResourceLocation | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "review" + /** + * If `true`, the review needs action. + */ + open: boolean + /** + * The reason the review was opened. One of `rule` or `manual`. + */ + opened_reason: ("manual" | "rule") + /** + * The PaymentIntent ID associated with this review, if one exists. + */ + payment_intent?: (string | PaymentIntent) + /** + * The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + */ + reason: string + /** + * Information related to the browsing session of the user who initiated the payment. + */ + session?: (RadarReviewResourceSession | null) +} +export interface RadarReviewResourceLocation { + /** + * The city where the payment originated. + */ + city?: (string | null) + /** + * Two-letter ISO code representing the country where the payment originated. + */ + country?: (string | null) + /** + * The geographic latitude where the payment originated. + */ + latitude?: (number | null) + /** + * The geographic longitude where the payment originated. + */ + longitude?: (number | null) + /** + * The state/county/province/region where the payment originated. + */ + region?: (string | null) +} +export interface RadarReviewResourceSession { + /** + * The browser used in this browser session (e.g., `Chrome`). + */ + browser?: (string | null) + /** + * Information about the device used for the browser session (e.g., `Samsung SM-G930T`). + */ + device?: (string | null) + /** + * The platform for the browser session (e.g., `Macintosh`). + */ + platform?: (string | null) + /** + * The version for the browser session (e.g., `61.0.3163.100`). + */ + version?: (string | null) +} +export interface ChargeTransferData { + /** + * The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + */ + amount?: (number | null) + /** + * ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. + */ + destination: (string | Account) +} +export interface InvoicesResourceInvoiceTaxID { + /** + * The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown` + */ + type: ("ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "unknown" | "us_ein" | "za_vat") + /** + * The value of the tax ID. + */ + value?: (string | null) +} +/** + * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * + * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). + */ +export interface TaxRate { + /** + * Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + */ + active: boolean + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: (string | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + */ + description?: (string | null) + /** + * The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + */ + display_name: string + /** + * Unique identifier for the object. + */ + id: string + /** + * This specifies if the tax rate is inclusive or exclusive. + */ + inclusive: boolean + /** + * The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + */ + jurisdiction?: (string | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "tax_rate" + /** + * This represents the tax rate percent out of 100. + */ + percentage: number + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + */ + state?: (string | null) + /** + * The high-level tax type, such as `vat` or `sales_tax`. + */ + tax_type?: ("gst" | "hst" | "igst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat" | null) +} +export interface DeletedDiscount { + /** + * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + */ + checkout_session?: (string | null) + coupon: Coupon + /** + * The ID of the customer associated with this discount. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * Always true for a deleted object + */ + deleted: true + /** + * The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + */ + id: string + /** + * The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + */ + invoice?: (string | null) + /** + * The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + */ + invoice_item?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "discount" + /** + * The promotion code applied to create this discount. + */ + promotion_code?: (string | PromotionCode | null) + /** + * Date that the coupon was applied. + */ + start: number + /** + * The subscription that this coupon is applied to, if it is applied to a particular subscription. + */ + subscription?: (string | null) +} +export interface InvoicesFromInvoice { + /** + * The relation between this invoice and the cloned invoice + */ + action: string + /** + * The invoice that was cloned. + */ + invoice: (string | Invoice) +} +/** + * 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. + */ +export interface InvoiceLinesList { + /** + * Details about each object. + */ + data: InvoiceLineItem[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface InvoiceLineItem { + /** + * The amount, in %s. + */ + amount: number + /** + * The integer amount in %s representing the amount for this line item, excluding all tax and discounts. + */ + amount_excluding_tax?: (number | null) + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * The amount of discount calculated per discount for this line item. + */ + discount_amounts?: (DiscountsResourceDiscountAmount[] | null) + /** + * If true, discounts will apply to this line item. Always false for prorations. + */ + discountable: boolean + /** + * The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + */ + discounts?: ((string | Discount)[] | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. + */ + invoice_item?: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "line_item" + period: InvoiceLineItemPeriod + /** + * The price of the line item. + */ + price?: (Price | null) + /** + * Whether this is a proration. + */ + proration: boolean + /** + * Additional details for proration line items + */ + proration_details?: (InvoicesLineItemsProrationDetails | null) + /** + * The quantity of the subscription, if the line item is a subscription or a proration. + */ + quantity?: (number | null) + /** + * The subscription that the invoice item pertains to, if any. + */ + subscription?: (string | null) + /** + * The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + */ + subscription_item?: string + /** + * The amount of tax calculated per tax rate for this line item + */ + tax_amounts?: InvoiceTaxAmount[] + /** + * The tax rates which apply to the line item. + */ + tax_rates?: TaxRate[] + /** + * A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + */ + type: ("invoiceitem" | "subscription") + /** + * The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: (string | null) +} +export interface DiscountsResourceDiscountAmount { + /** + * The amount, in %s, of the discount. + */ + amount: number + /** + * The discount that was applied to get this discount amount. + */ + discount: (string | Discount | DeletedDiscount) +} +export interface InvoiceLineItemPeriod { + /** + * The end of the period, which must be greater than or equal to the start. This value is inclusive. + */ + end: number + /** + * The start of the period. This value is inclusive. + */ + start: number +} +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ +export interface Price { + /** + * Whether the price can be used for new purchases. + */ + active: boolean + /** + * Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + */ + billing_scheme: ("per_unit" | "tiered") + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ + currency_options?: { + [k: string]: CurrencyOption + } + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ + custom_unit_amount?: (CustomUnitAmount | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + */ + lookup_key?: (string | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * A brief description of the price, hidden from customers. + */ + nickname?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "price" + /** + * The ID of the product this price is associated with. + */ + product: (string | Product | DeletedProduct) + /** + * The recurring components of a price such as `interval` and `usage_type`. + */ + recurring?: (Recurring | null) + /** + * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: ("exclusive" | "inclusive" | "unspecified" | null) + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ + tiers?: PriceTier[] + /** + * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + */ + tiers_mode?: ("graduated" | "volume" | null) + /** + * Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + */ + transform_quantity?: (TransformQuantity | null) + /** + * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + */ + type: ("one_time" | "recurring") + /** + * The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ + unit_amount?: (number | null) + /** + * The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: (string | null) +} +export interface CurrencyOption { + /** + * When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ + custom_unit_amount?: (CustomUnitAmount | null) + /** + * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: ("exclusive" | "inclusive" | "unspecified" | null) + /** + * Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + */ + tiers?: PriceTier[] + /** + * The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + */ + unit_amount?: (number | null) + /** + * The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: (string | null) +} +export interface CustomUnitAmount { + /** + * The maximum unit amount the customer can specify for this item. + */ + maximum?: (number | null) + /** + * The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + */ + minimum?: (number | null) + /** + * The starting unit amount which can be updated by the customer. + */ + preset?: (number | null) +} +export interface PriceTier { + /** + * Price for the entire tier. + */ + flat_amount?: (number | null) + /** + * Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ + flat_amount_decimal?: (string | null) + /** + * Per unit price for units relevant to the tier. + */ + unit_amount?: (number | null) + /** + * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ + unit_amount_decimal?: (string | null) + /** + * Up to and including to this quantity will be contained in the tier. + */ + up_to?: (number | null) +} +/** + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ +export interface Product { + /** + * Whether the product is currently available for purchase. + */ + active: boolean + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + */ + default_price?: (string | Price | null) + /** + * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + */ + description?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + */ + images: string[] + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * The product's name, meant to be displayable to the customer. + */ + name: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "product" + /** + * The dimensions of this product for shipping purposes. + */ + package_dimensions?: (PackageDimensions | null) + /** + * Whether this product is shipped (i.e., physical goods). + */ + shippable?: (boolean | null) + /** + * 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. + */ + statement_descriptor?: (string | null) + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: (string | TaxProductResourceTaxCode | null) + /** + * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + */ + unit_label?: (string | null) + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated: number + /** + * A URL of a publicly-accessible webpage for this product. + */ + url?: (string | null) +} +export interface PackageDimensions { + /** + * Height, in inches. + */ + height: number + /** + * Length, in inches. + */ + length: number + /** + * Weight, in ounces. + */ + weight: number + /** + * Width, in inches. + */ + width: number +} +/** + * [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + */ +export interface TaxProductResourceTaxCode { + /** + * A detailed description of which types of products the tax code represents. + */ + description: string + /** + * Unique identifier for the object. + */ + id: string + /** + * A short name for the tax code. + */ + name: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "tax_code" +} +export interface DeletedProduct { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "product" +} +export interface Recurring { + /** + * Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + */ + aggregate_usage?: ("last_during_period" | "last_ever" | "max" | "sum" | null) + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ + interval: ("day" | "month" | "week" | "year") + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ + interval_count: number + /** + * Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + */ + usage_type: ("licensed" | "metered") +} +export interface TransformQuantity { + /** + * Divide usage by this number. + */ + divide_by: number + /** + * After division, either round the result `up` or `down`. + */ + round: ("down" | "up") +} +export interface InvoicesLineItemsProrationDetails { + /** + * For a credit proration `line_item`, the original debit line_items to which the credit proration applies. + */ + credited_items?: (InvoicesLineItemsCreditedItems | null) +} +export interface InvoicesLineItemsCreditedItems { + /** + * Invoice containing the credited invoice line items + */ + invoice: string + /** + * Credited invoice line items + */ + invoice_line_items: string[] +} +export interface InvoiceTaxAmount { + /** + * The amount, in %s, of the tax. + */ + amount: number + /** + * Whether this tax amount is inclusive or exclusive. + */ + inclusive: boolean + /** + * The tax rate that was applied to get this tax amount. + */ + tax_rate: (string | TaxRate) +} +export interface InvoicesPaymentSettings { + /** + * ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + */ + default_mandate?: (string | null) + /** + * Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + */ + payment_method_options?: (InvoicesPaymentMethodOptions | null) + /** + * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ + payment_method_types?: (("ach_credit_transfer" | "ach_debit" | "acss_debit" | "au_becs_debit" | "bacs_debit" | "bancontact" | "boleto" | "card" | "customer_balance" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" | "paynow" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[] | null) +} +export interface InvoicesPaymentMethodOptions { + /** + * If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + */ + acss_debit?: (InvoicePaymentMethodOptionsAcssDebit | null) + /** + * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + */ + bancontact?: (InvoicePaymentMethodOptionsBancontact | null) + /** + * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + */ + card?: (InvoicePaymentMethodOptionsCard | null) + /** + * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + customer_balance?: (InvoicePaymentMethodOptionsCustomerBalance | null) + /** + * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + */ + konbini?: (InvoicePaymentMethodOptionsKonbini | null) + /** + * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + */ + us_bank_account?: (InvoicePaymentMethodOptionsUsBankAccount | null) +} +export interface InvoicePaymentMethodOptionsAcssDebit { + mandate_options?: InvoicePaymentMethodOptionsAcssDebitMandateOptions + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface InvoicePaymentMethodOptionsAcssDebitMandateOptions { + /** + * Transaction type of the mandate. + */ + transaction_type?: ("business" | "personal" | null) +} +export interface InvoicePaymentMethodOptionsBancontact { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ + preferred_language: ("de" | "en" | "fr" | "nl") +} +export interface InvoicePaymentMethodOptionsCard { + installments?: InvoiceInstallmentsCard + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ + request_three_d_secure?: ("any" | "automatic" | null) +} +export interface InvoiceInstallmentsCard { + /** + * Whether Installments are enabled for this Invoice. + */ + enabled?: (boolean | null) +} +export interface InvoicePaymentMethodOptionsCustomerBalance { + bank_transfer?: InvoicePaymentMethodOptionsCustomerBalanceBankTransfer + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: ("bank_transfer" | null) +} +export interface InvoicePaymentMethodOptionsCustomerBalanceBankTransfer { + eu_bank_transfer?: InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer + /** + * The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + */ + type?: (string | null) +} +export interface InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ + country: ("BE" | "DE" | "ES" | "FR" | "IE" | "NL") +} +export interface InvoicePaymentMethodOptionsKonbini { + +} +export interface InvoicePaymentMethodOptionsUsBankAccount { + financial_connections?: InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions { + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ + permissions?: ("balances" | "payment_method" | "transactions")[] +} +/** + * A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ +export interface Quote { + /** + * Total before any discounts or taxes are applied. + */ + amount_subtotal: number + /** + * Total after discounts and taxes are applied. + */ + amount_total: number + /** + * ID of the Connect Application that created the quote. + */ + application?: (string | Application | DeletedApplication | null) + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + */ + application_fee_amount?: (number | null) + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + */ + application_fee_percent?: (number | null) + automatic_tax: QuotesResourceAutomaticTax + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + */ + collection_method: ("charge_automatically" | "send_invoice") + computed: QuotesResourceComputed + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency?: (string | null) + /** + * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * The tax rates applied to this quote. + */ + default_tax_rates?: (string | TaxRate)[] + /** + * A description that will be displayed on the quote PDF. + */ + description?: (string | null) + /** + * The discounts applied to this quote. + */ + discounts: (string | Discount)[] + /** + * The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at: number + /** + * A footer that will be displayed on the quote PDF. + */ + footer?: (string | null) + /** + * Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + */ + from_quote?: (QuotesResourceFromQuote | null) + /** + * A header that will be displayed on the quote PDF. + */ + header?: (string | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * The invoice that was created from this quote. + */ + invoice?: (string | Invoice | DeletedInvoice | null) + /** + * All invoices will be billed using the specified settings. + */ + invoice_settings?: (InvoiceSettingQuoteSetting | null) + line_items?: QuotesResourceListLineItems1 + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + */ + number?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "quote" + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ + on_behalf_of?: (string | Account | null) + /** + * The status of the quote. + */ + status: ("accepted" | "canceled" | "draft" | "open") + status_transitions: QuotesResourceStatusTransitions + /** + * The subscription that was created or updated from this quote. + */ + subscription?: (string | Subscription | null) + subscription_data: QuotesResourceSubscriptionDataSubscriptionData + /** + * The subscription schedule that was created or updated from this quote. + */ + subscription_schedule?: (string | SubscriptionSchedule | null) + /** + * ID of the test clock this quote belongs to. + */ + test_clock?: (string | TestClock | null) + total_details: QuotesResourceTotalDetails + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + */ + transfer_data?: (QuotesResourceTransferData | null) +} +export interface QuotesResourceAutomaticTax { + /** + * Automatically calculate taxes + */ + enabled: boolean + /** + * The status of the most recent automated tax calculation for this quote. + */ + status?: ("complete" | "failed" | "requires_location_inputs" | null) +} +export interface QuotesResourceComputed { + /** + * The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. + */ + recurring?: (QuotesResourceRecurring | null) + upfront: QuotesResourceUpfront +} +export interface QuotesResourceRecurring { + /** + * Total before any discounts or taxes are applied. + */ + amount_subtotal: number + /** + * Total after discounts and taxes are applied. + */ + amount_total: number + /** + * The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + */ + interval: ("day" | "month" | "week" | "year") + /** + * The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + */ + interval_count: number + total_details: QuotesResourceTotalDetails +} +export interface QuotesResourceTotalDetails { + /** + * This is the sum of all the discounts. + */ + amount_discount: number + /** + * This is the sum of all the shipping amounts. + */ + amount_shipping?: (number | null) + /** + * This is the sum of all the tax amounts. + */ + amount_tax: number + breakdown?: QuotesResourceTotalDetailsResourceBreakdown +} +export interface QuotesResourceTotalDetailsResourceBreakdown { + /** + * The aggregated discounts. + */ + discounts: LineItemsDiscountAmount[] + /** + * The aggregated tax amounts by rate. + */ + taxes: LineItemsTaxAmount[] +} +export interface LineItemsDiscountAmount { + /** + * The amount discounted. + */ + amount: number + discount: Discount +} +export interface LineItemsTaxAmount { + /** + * Amount of tax applied for this rate. + */ + amount: number + rate: TaxRate +} +export interface QuotesResourceUpfront { + /** + * Total before any discounts or taxes are applied. + */ + amount_subtotal: number + /** + * Total after discounts and taxes are applied. + */ + amount_total: number + line_items?: QuotesResourceListLineItems + total_details: QuotesResourceTotalDetails +} +/** + * The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + */ +export interface QuotesResourceListLineItems { + /** + * Details about each object. + */ + data: LineItem[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +/** + * A line item. + */ +export interface LineItem { + /** + * Total discount amount applied. If no discounts were applied, defaults to 0. + */ + amount_discount: number + /** + * Total before any discounts or taxes are applied. + */ + amount_subtotal: number + /** + * Total tax amount applied. If no tax was applied, defaults to 0. + */ + amount_tax: number + /** + * Total after discounts and taxes. + */ + amount_total: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + */ + description: string + /** + * The discounts applied to the line item. + */ + discounts?: LineItemsDiscountAmount[] + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "item" + /** + * The price used to generate the line item. + */ + price?: (Price | null) + /** + * The quantity of products being purchased. + */ + quantity?: (number | null) + /** + * The taxes applied to the line item. + */ + taxes?: LineItemsTaxAmount[] +} +export interface QuotesResourceFromQuote { + /** + * Whether this quote is a revision of a different quote. + */ + is_revision: boolean + /** + * The quote that was cloned. + */ + quote: (string | Quote) +} +export interface DeletedInvoice { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "invoice" +} +export interface InvoiceSettingQuoteSetting { + /** + * Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + */ + days_until_due?: (number | null) +} +/** + * A list of items the customer is being quoted for. + */ +export interface QuotesResourceListLineItems1 { + /** + * Details about each object. + */ + data: LineItem[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface QuotesResourceStatusTransitions { + /** + * The time that the quote was accepted. Measured in seconds since Unix epoch. + */ + accepted_at?: (number | null) + /** + * The time that the quote was canceled. Measured in seconds since Unix epoch. + */ + canceled_at?: (number | null) + /** + * The time that the quote was finalized. Measured in seconds since Unix epoch. + */ + finalized_at?: (number | null) +} +/** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). + */ +export interface Subscription { + /** + * ID of the Connect Application that created the subscription. + */ + application?: (string | Application | DeletedApplication | null) + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + */ + application_fee_percent?: (number | null) + automatic_tax: SubscriptionAutomaticTax + /** + * Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + billing_cycle_anchor: number + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ + billing_thresholds?: (SubscriptionBillingThresholds | null) + /** + * A date in the future at which the subscription will automatically get canceled + */ + cancel_at?: (number | null) + /** + * If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. + */ + cancel_at_period_end: boolean + /** + * If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + */ + canceled_at?: (number | null) + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ + collection_method: ("charge_automatically" | "send_invoice") + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + */ + current_period_end: number + /** + * Start of the current period that the subscription has been invoiced for. + */ + current_period_start: number + /** + * ID of the customer who owns the subscription. + */ + customer: (string | Customer | DeletedCustomer) + /** + * Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + */ + days_until_due?: (number | null) + /** + * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ + default_payment_method?: (string | PaymentMethod | null) + /** + * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + */ + default_source?: (string | BankAccount | Card | Source | null) + /** + * The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + */ + default_tax_rates?: (TaxRate[] | null) + /** + * 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. + */ + description?: (string | null) + /** + * Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. + */ + discount?: (Discount | null) + /** + * If the subscription has ended, the date the subscription ended. + */ + ended_at?: (number | null) + /** + * Unique identifier for the object. + */ + id: string + items: SubscriptionItemList + /** + * The most recent invoice this subscription has generated. + */ + latest_invoice?: (string | Invoice | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + */ + next_pending_invoice_item_invoice?: (number | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "subscription" + /** + * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + */ + on_behalf_of?: (string | Account | null) + /** + * If specified, payment collection for this subscription will be paused. + */ + pause_collection?: (SubscriptionsResourcePauseCollection | null) + /** + * Payment settings passed on to invoices created by the subscription. + */ + payment_settings?: (SubscriptionsResourcePaymentSettings | null) + /** + * Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + */ + pending_invoice_item_interval?: (SubscriptionPendingInvoiceItemInterval | null) + /** + * You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + */ + pending_setup_intent?: (string | SetupIntent | null) + /** + * If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + */ + pending_update?: (SubscriptionsResourcePendingUpdate | null) + /** + * The schedule attached to the subscription + */ + schedule?: (string | SubscriptionSchedule | null) + /** + * Date when the subscription was first created. The date might differ from the `created` date due to backdating. + */ + start_date: number + /** + * Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + * + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. + * + * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + * + * If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. + * + * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + */ + status: ("active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid") + /** + * ID of the test clock this subscription belongs to. + */ + test_clock?: (string | TestClock | null) + /** + * The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ + transfer_data?: (SubscriptionTransferData | null) + /** + * If the subscription has a trial, the end of that trial. + */ + trial_end?: (number | null) + /** + * Settings related to subscription trials. + */ + trial_settings?: (SubscriptionsTrialsResourceTrialSettings | null) + /** + * If the subscription has a trial, the beginning of that trial. + */ + trial_start?: (number | null) + minItems?: 0 +} +export interface SubscriptionAutomaticTax { + /** + * Whether Stripe automatically computes tax on this subscription. + */ + enabled: boolean +} +export interface SubscriptionBillingThresholds { + /** + * Monetary threshold that triggers the subscription to create an invoice + */ + amount_gte?: (number | null) + /** + * Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + */ + reset_billing_cycle_anchor?: (boolean | null) +} +/** + * List of subscription items, each with an attached price. + */ +export interface SubscriptionItemList { + /** + * Details about each object. + */ + data: SubscriptionItem[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +/** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ +export interface SubscriptionItem { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ + billing_thresholds?: (SubscriptionItemBillingThresholds | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Unique identifier for the object. + */ + id: string + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "subscription_item" + price: Price + /** + * The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + */ + quantity?: number + /** + * The `subscription` this `subscription_item` belongs to. + */ + subscription: string + /** + * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + */ + tax_rates?: (TaxRate[] | null) +} +export interface SubscriptionItemBillingThresholds { + /** + * Usage threshold that triggers the subscription to create an invoice + */ + usage_gte?: (number | null) +} +/** + * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ +export interface SubscriptionsResourcePauseCollection { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ + behavior: ("keep_as_draft" | "mark_uncollectible" | "void") + /** + * The time after which the subscription will resume collecting payments. + */ + resumes_at?: (number | null) +} +export interface SubscriptionsResourcePaymentSettings { + /** + * Payment-method-specific configuration to provide to invoices created by the subscription. + */ + payment_method_options?: (SubscriptionsResourcePaymentMethodOptions | null) + /** + * The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + */ + payment_method_types?: (("ach_credit_transfer" | "ach_debit" | "acss_debit" | "au_becs_debit" | "bacs_debit" | "bancontact" | "boleto" | "card" | "customer_balance" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" | "paynow" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[] | null) + /** + * Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + */ + save_default_payment_method?: ("off" | "on_subscription" | null) +} +export interface SubscriptionsResourcePaymentMethodOptions { + /** + * This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. + */ + acss_debit?: (InvoicePaymentMethodOptionsAcssDebit | null) + /** + * This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. + */ + bancontact?: (InvoicePaymentMethodOptionsBancontact | null) + /** + * This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. + */ + card?: (SubscriptionPaymentMethodOptionsCard | null) + /** + * This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. + */ + customer_balance?: (InvoicePaymentMethodOptionsCustomerBalance | null) + /** + * This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. + */ + konbini?: (InvoicePaymentMethodOptionsKonbini | null) + /** + * This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. + */ + us_bank_account?: (InvoicePaymentMethodOptionsUsBankAccount | null) +} +export interface SubscriptionPaymentMethodOptionsCard { + mandate_options?: InvoiceMandateOptionsCard + /** + * Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + */ + network?: ("amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa" | null) + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ + request_three_d_secure?: ("any" | "automatic" | null) +} +export interface InvoiceMandateOptionsCard { + /** + * Amount to be charged for future payments. + */ + amount?: (number | null) + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ + amount_type?: ("fixed" | "maximum" | null) + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ + description?: (string | null) +} +export interface SubscriptionPendingInvoiceItemInterval { + /** + * Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + */ + interval: ("day" | "month" | "week" | "year") + /** + * The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + */ + interval_count: number +} +/** + * A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + * + * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. + * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. + * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in [certain regions](/guides/strong-customer-authentication) may need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection + * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, + * it will automatically attach the resulting payment method to that Customer. + * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * + * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, + * even as regulations change over time. + * + * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). + */ +export interface SetupIntent { + /** + * ID of the Connect application that created the SetupIntent. + */ + application?: (string | Application | null) + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** + * Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + */ + cancellation_reason?: ("abandoned" | "duplicate" | "requested_by_customer" | null) + /** + * The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ + client_secret?: (string | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: (string | Customer | DeletedCustomer | null) + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: (("inbound" | "outbound")[] | null) + /** + * Unique identifier for the object. + */ + id: string + /** + * The error encountered in the previous SetupIntent confirmation. + */ + last_setup_error?: (APIErrors | null) + /** + * The most recent SetupAttempt for this SetupIntent. + */ + latest_attempt?: (string | PaymentFlowsSetupIntentSetupAttempt | null) + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * ID of the multi use Mandate generated by the SetupIntent. + */ + mandate?: (string | Mandate | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + */ + next_action?: (SetupIntentNextAction | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "setup_intent" + /** + * The account (if any) for which the setup is intended. + */ + on_behalf_of?: (string | Account | null) + /** + * ID of the payment method used with this SetupIntent. + */ + payment_method?: (string | PaymentMethod | null) + /** + * Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: (SetupIntentPaymentMethodOptions | null) + /** + * The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + */ + payment_method_types: string[] + /** + * ID of the single_use Mandate generated by the SetupIntent. + */ + single_use_mandate?: (string | Mandate | null) + /** + * [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + */ + status: ("canceled" | "processing" | "requires_action" | "requires_confirmation" | "requires_payment_method" | "succeeded") + /** + * Indicates how the payment method is intended to be used in the future. + * + * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + */ + usage: string +} +export interface SetupIntentNextAction { + redirect_to_url?: SetupIntentNextActionRedirectToUrl + /** + * Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ + type: string + /** + * When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ + use_stripe_sdk?: { + + } + verify_with_microdeposits?: SetupIntentNextActionVerifyWithMicrodeposits +} +export interface SetupIntentNextActionRedirectToUrl { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ + return_url?: (string | null) + /** + * The URL you must redirect your customer to in order to authenticate. + */ + url?: (string | null) +} +export interface SetupIntentNextActionVerifyWithMicrodeposits { + /** + * The timestamp when the microdeposits are expected to land. + */ + arrival_date: number + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ + hosted_verification_url: string + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ + microdeposit_type?: ("amounts" | "descriptor_code" | null) +} +export interface SetupIntentPaymentMethodOptions { + acss_debit?: (SetupIntentPaymentMethodOptionsAcssDebit | SetupIntentTypeSpecificPaymentMethodOptionsClient) + blik?: (SetupIntentPaymentMethodOptionsBlik | SetupIntentTypeSpecificPaymentMethodOptionsClient) + card?: SetupIntentPaymentMethodOptionsCard + link?: (SetupIntentPaymentMethodOptionsLink | SetupIntentTypeSpecificPaymentMethodOptionsClient) + sepa_debit?: (SetupIntentPaymentMethodOptionsSepaDebit | SetupIntentTypeSpecificPaymentMethodOptionsClient) + us_bank_account?: (SetupIntentPaymentMethodOptionsUsBankAccount | SetupIntentTypeSpecificPaymentMethodOptionsClient) +} +export interface SetupIntentPaymentMethodOptionsAcssDebit { + /** + * Currency supported by the bank account + */ + currency?: ("cad" | "usd" | null) + mandate_options?: SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit { + /** + * A URL for custom mandate text + */ + custom_mandate_url?: string + /** + * List of Stripe products where this mandate can be selected automatically. + */ + default_for?: ("invoice" | "subscription")[] + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ + interval_description?: (string | null) + /** + * Payment schedule for the mandate. + */ + payment_schedule?: ("combined" | "interval" | "sporadic" | null) + /** + * Transaction type of the mandate. + */ + transaction_type?: ("business" | "personal" | null) +} +export interface SetupIntentTypeSpecificPaymentMethodOptionsClient { + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface SetupIntentPaymentMethodOptionsBlik { + mandate_options?: SetupIntentPaymentMethodOptionsMandateOptionsBlik +} +export interface SetupIntentPaymentMethodOptionsMandateOptionsBlik { + /** + * Date at which the mandate expires. + */ + expires_after?: (number | null) + off_session?: MandateOptionsOffSessionDetailsBlik + /** + * Type of the mandate. + */ + type?: ("off_session" | "on_session" | null) +} +export interface SetupIntentPaymentMethodOptionsCard { + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ + mandate_options?: (SetupIntentPaymentMethodOptionsCardMandateOptions | null) + /** + * Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + */ + network?: ("amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa" | null) + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ + request_three_d_secure?: ("any" | "automatic" | "challenge_only" | null) +} +export interface SetupIntentPaymentMethodOptionsCardMandateOptions { + /** + * Amount to be charged for future payments. + */ + amount: number + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ + amount_type: ("fixed" | "maximum") + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ + description?: (string | null) + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: (number | null) + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ + interval: ("day" | "month" | "sporadic" | "week" | "year") + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ + interval_count?: (number | null) + /** + * Unique identifier for the mandate or subscription. + */ + reference: string + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ + supported_types?: (("india")[] | null) +} +export interface SetupIntentPaymentMethodOptionsLink { + /** + * Token used for persistent Link logins. + */ + persistent_token?: (string | null) +} +export interface SetupIntentPaymentMethodOptionsSepaDebit { + mandate_options?: SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit +} +export interface SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit { + +} +export interface SetupIntentPaymentMethodOptionsUsBankAccount { + financial_connections?: LinkedAccountOptionsUsBankAccount + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface LinkedAccountOptionsUsBankAccount { + /** + * The list of permissions to request. The `payment_method` permission must be included. + */ + permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[] + /** + * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ + return_url?: string +} +/** + * Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ +export interface SubscriptionsResourcePendingUpdate { + /** + * If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + billing_cycle_anchor?: (number | null) + /** + * The point after which the changes reflected by this update will be discarded and no longer applied. + */ + expires_at: number + /** + * List of subscription items, each with an attached plan, that will be set if the update is applied. + */ + subscription_items?: (SubscriptionItem[] | null) + /** + * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + */ + trial_end?: (number | null) + /** + * Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + */ + trial_from_plan?: (boolean | null) +} +/** + * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + * + * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ +export interface SubscriptionSchedule { + /** + * ID of the Connect Application that created the schedule. + */ + application?: (string | Application | DeletedApplication | null) + /** + * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + */ + canceled_at?: (number | null) + /** + * Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + */ + completed_at?: (number | null) + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + */ + current_phase?: (SubscriptionScheduleCurrentPhase | null) + /** + * ID of the customer who owns the subscription schedule. + */ + customer: (string | Customer | DeletedCustomer) + default_settings: SubscriptionSchedulesResourceDefaultSettings + /** + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + */ + end_behavior: ("cancel" | "none" | "release" | "renew") + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "subscription_schedule" + /** + * Configuration for the subscription schedule's phases. + */ + phases: SubscriptionSchedulePhaseConfiguration[] + /** + * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + */ + released_at?: (number | null) + /** + * ID of the subscription once managed by the subscription schedule (if it is released). + */ + released_subscription?: (string | null) + /** + * The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ + status: ("active" | "canceled" | "completed" | "not_started" | "released") + /** + * ID of the subscription managed by the subscription schedule. + */ + subscription?: (string | Subscription | null) + /** + * ID of the test clock this subscription schedule belongs to. + */ + test_clock?: (string | TestClock | null) +} +export interface SubscriptionScheduleCurrentPhase { + /** + * The end of this phase of the subscription schedule. + */ + end_date: number + /** + * The start of this phase of the subscription schedule. + */ + start_date: number +} +export interface SubscriptionSchedulesResourceDefaultSettings { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ + application_fee_percent?: (number | null) + automatic_tax?: SubscriptionSchedulesResourceDefaultSettingsAutomaticTax + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ + billing_cycle_anchor: ("automatic" | "phase_start") + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ + billing_thresholds?: (SubscriptionBillingThresholds | null) + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ + collection_method?: ("charge_automatically" | "send_invoice" | null) + /** + * ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ + default_payment_method?: (string | PaymentMethod | null) + /** + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + */ + description?: (string | null) + /** + * The subscription schedule's default invoice settings. + */ + invoice_settings?: (InvoiceSettingSubscriptionScheduleSetting | null) + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ + on_behalf_of?: (string | Account | null) + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ + transfer_data?: (SubscriptionTransferData | null) +} +export interface SubscriptionSchedulesResourceDefaultSettingsAutomaticTax { + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ + enabled: boolean +} +export interface InvoiceSettingSubscriptionScheduleSetting { + /** + * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + */ + days_until_due?: (number | null) +} +export interface SubscriptionTransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: (number | null) + /** + * The account where funds from the payment will be transferred to upon payment success. + */ + destination: (string | Account) +} +/** + * A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ +export interface SubscriptionSchedulePhaseConfiguration { + /** + * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + */ + add_invoice_items: SubscriptionScheduleAddInvoiceItem[] + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. + */ + application_fee_percent?: (number | null) + automatic_tax?: SchedulesPhaseAutomaticTax + /** + * Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + */ + billing_cycle_anchor?: ("automatic" | "phase_start" | null) + /** + * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + */ + billing_thresholds?: (SubscriptionBillingThresholds | null) + /** + * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + */ + collection_method?: ("charge_automatically" | "send_invoice" | null) + /** + * ID of the coupon to use during this phase of the subscription schedule. + */ + coupon?: (string | Coupon | DeletedCoupon | null) + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + */ + default_payment_method?: (string | PaymentMethod | null) + /** + * The default tax rates to apply to the subscription during this phase of the subscription schedule. + */ + default_tax_rates?: (TaxRate[] | null) + /** + * Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + */ + description?: (string | null) + /** + * The end of this phase of the subscription schedule. + */ + end_date: number + /** + * The invoice settings applicable during this phase. + */ + invoice_settings?: (InvoiceSettingSubscriptionScheduleSetting | null) + /** + * Subscription items to configure the subscription to during this phase of the subscription schedule. + */ + items: SubscriptionScheduleConfigurationItem[] + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ + on_behalf_of?: (string | Account | null) + /** + * If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. + */ + proration_behavior: ("always_invoice" | "create_prorations" | "none") + /** + * The start of this phase of the subscription schedule. + */ + start_date: number + /** + * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + */ + transfer_data?: (SubscriptionTransferData | null) + /** + * When the trial ends within the phase. + */ + trial_end?: (number | null) + minItems?: 0 +} +/** + * An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ +export interface SubscriptionScheduleAddInvoiceItem { + /** + * ID of the price used to generate the invoice item. + */ + price: (string | Price | DeletedPrice) + /** + * The quantity of the invoice item. + */ + quantity?: (number | null) + /** + * The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + */ + tax_rates?: (TaxRate[] | null) +} +export interface DeletedPrice { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "price" +} +export interface SchedulesPhaseAutomaticTax { + /** + * Whether Stripe automatically computes tax on invoices created during this phase. + */ + enabled: boolean +} +export interface DeletedCoupon { + /** + * Always true for a deleted object + */ + deleted: true + /** + * Unique identifier for the object. + */ + id: string + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "coupon" +} +/** + * A phase item describes the price and quantity of a phase. + */ +export interface SubscriptionScheduleConfigurationItem { + /** + * Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + */ + billing_thresholds?: (SubscriptionItemBillingThresholds | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * ID of the price to which the customer should be subscribed. + */ + price: (string | Price | DeletedPrice) + /** + * Quantity of the plan to which the customer should be subscribed. + */ + quantity?: number + /** + * The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + */ + tax_rates?: (TaxRate[] | null) +} +/** + * A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ +export interface TestClock { + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Time at which this clock is scheduled to auto delete. + */ + deletes_after: number + /** + * Time at which all objects belonging to this clock are frozen. + */ + frozen_time: number + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * The custom name supplied at creation. + */ + name?: (string | null) + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "test_helpers.test_clock" + /** + * The status of the Test Clock. + */ + status: ("advancing" | "internal_failure" | "ready") +} +/** + * Configures how this subscription behaves during the trial period. + */ +export interface SubscriptionsTrialsResourceTrialSettings { + end_behavior: SubscriptionsTrialsResourceEndBehavior +} +/** + * Defines how a subscription behaves when a free trial ends. + */ +export interface SubscriptionsTrialsResourceEndBehavior { + /** + * Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + */ + missing_payment_method: ("cancel" | "create_invoice" | "pause") +} +export interface QuotesResourceSubscriptionDataSubscriptionData { + /** + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + */ + description?: (string | null) + /** + * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + */ + effective_date?: (number | null) + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ + trial_period_days?: (number | null) +} +export interface QuotesResourceTransferData { + /** + * The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + */ + amount?: (number | null) + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. + */ + amount_percent?: (number | null) + /** + * The account where funds from the payment will be transferred to upon payment success. + */ + destination: (string | Account) +} +export interface InvoiceSettingRenderingOptions { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ + amount_tax_display?: (string | null) +} +export interface InvoicesShippingCost { + /** + * Total shipping cost before any taxes are applied. + */ + amount_subtotal: number + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ + amount_tax: number + /** + * Total shipping cost after taxes are applied. + */ + amount_total: number + /** + * The ID of the ShippingRate for this invoice. + */ + shipping_rate?: (string | ShippingRate | null) + /** + * The taxes applied to the shipping rate. + */ + taxes?: LineItemsTaxAmount[] +} +/** + * Shipping rates describe the price of shipping presented to your customers and can be + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. + */ +export interface ShippingRate { + /** + * Whether the shipping rate can be used for new purchases. Defaults to `true`. + */ + active: boolean + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: (ShippingRateDeliveryEstimate | null) + /** + * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + display_name?: (string | null) + fixed_amount?: ShippingRateFixedAmount + /** + * Unique identifier for the object. + */ + id: string + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "shipping_rate" + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ + tax_behavior?: ("exclusive" | "inclusive" | "unspecified" | null) + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + */ + tax_code?: (string | TaxProductResourceTaxCode | null) + /** + * The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + */ + type: "fixed_amount" +} +export interface ShippingRateDeliveryEstimate { + /** + * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + */ + maximum?: (ShippingRateDeliveryEstimateBound | null) + /** + * The lower bound of the estimated range. If empty, represents no lower bound. + */ + minimum?: (ShippingRateDeliveryEstimateBound | null) +} +export interface ShippingRateDeliveryEstimateBound { + /** + * A unit of time. + */ + unit: ("business_day" | "day" | "hour" | "month" | "week") + /** + * Must be greater than 0. + */ + value: number +} +export interface ShippingRateFixedAmount { + /** + * A non-negative integer in cents representing how much to charge. + */ + amount: number + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + */ + currency_options?: { + [k: string]: ShippingRateCurrencyOption + } +} +export interface ShippingRateCurrencyOption { + /** + * A non-negative integer in cents representing how much to charge. + */ + amount: number + /** + * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + */ + tax_behavior: ("exclusive" | "inclusive" | "unspecified") +} +export interface InvoicesStatusTransitions { + /** + * The time that the invoice draft was finalized. + */ + finalized_at?: (number | null) + /** + * The time that the invoice was marked uncollectible. + */ + marked_uncollectible_at?: (number | null) + /** + * The time that the invoice was paid. + */ + paid_at?: (number | null) + /** + * The time that the invoice was voided. + */ + voided_at?: (number | null) +} +export interface InvoiceThresholdReason { + /** + * The total invoice amount threshold boundary if it triggered the threshold invoice. + */ + amount_gte?: (number | null) + /** + * Indicates which line items triggered a threshold invoice. + */ + item_reasons: InvoiceItemThresholdReason[] +} +export interface InvoiceItemThresholdReason { + /** + * The IDs of the line items that triggered the threshold invoice. + */ + line_item_ids: string[] + /** + * The quantity threshold boundary that applied to the given line item. + */ + usage_gte: number +} +export interface InvoiceTransferData { + /** + * The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + */ + amount?: (number | null) + /** + * The account where funds from the payment will be transferred to upon payment success. + */ + destination: (string | Account) +} +export interface PaymentIntentNextAction { + alipay_handle_redirect?: PaymentIntentNextActionAlipayHandleRedirect + boleto_display_details?: PaymentIntentNextActionBoleto + card_await_notification?: PaymentIntentNextActionCardAwaitNotification + display_bank_transfer_instructions?: PaymentIntentNextActionDisplayBankTransferInstructions + konbini_display_details?: PaymentIntentNextActionKonbini + oxxo_display_details?: PaymentIntentNextActionDisplayOxxoDetails + paynow_display_qr_code?: PaymentIntentNextActionPaynowDisplayQrCode + pix_display_qr_code?: PaymentIntentNextActionPixDisplayQrCode + promptpay_display_qr_code?: PaymentIntentNextActionPromptpayDisplayQrCode + redirect_to_url?: PaymentIntentNextActionRedirectToUrl + /** + * Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + */ + type: string + /** + * When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + */ + use_stripe_sdk?: { + + } + verify_with_microdeposits?: PaymentIntentNextActionVerifyWithMicrodeposits + wechat_pay_display_qr_code?: PaymentIntentNextActionWechatPayDisplayQrCode + wechat_pay_redirect_to_android_app?: PaymentIntentNextActionWechatPayRedirectToAndroidApp + wechat_pay_redirect_to_ios_app?: PaymentIntentNextActionWechatPayRedirectToIOSApp +} +export interface PaymentIntentNextActionAlipayHandleRedirect { + /** + * The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. + */ + native_data?: (string | null) + /** + * The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. + */ + native_url?: (string | null) + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ + return_url?: (string | null) + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ + url?: (string | null) +} +export interface PaymentIntentNextActionBoleto { + /** + * The timestamp after which the boleto expires. + */ + expires_at?: (number | null) + /** + * The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. + */ + hosted_voucher_url?: (string | null) + /** + * The boleto number. + */ + number?: (string | null) + /** + * The URL to the downloadable boleto voucher PDF. + */ + pdf?: (string | null) +} +export interface PaymentIntentNextActionCardAwaitNotification { + /** + * The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + charge_attempt_at?: (number | null) + /** + * For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. + */ + customer_approval_required?: (boolean | null) +} +export interface PaymentIntentNextActionDisplayBankTransferInstructions { + /** + * The remaining amount that needs to be transferred to complete the payment. + */ + amount_remaining?: (number | null) + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency?: (string | null) + /** + * A list of financial addresses that can be used to fund the customer balance + */ + financial_addresses?: FundingInstructionsBankTransferFinancialAddress[] + /** + * A link to a hosted page that guides your customer through completing the transfer. + */ + hosted_instructions_url?: (string | null) + /** + * A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + */ + reference?: (string | null) + /** + * Type of bank transfer + */ + type: ("eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer") +} +/** + * FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ +export interface FundingInstructionsBankTransferFinancialAddress { + iban?: FundingInstructionsBankTransferIbanRecord + sort_code?: FundingInstructionsBankTransferSortCodeRecord + spei?: FundingInstructionsBankTransferSpeiRecord + /** + * The payment networks supported by this FinancialAddress + */ + supported_networks?: ("bacs" | "fps" | "sepa" | "spei" | "zengin")[] + /** + * The type of financial address + */ + type: ("iban" | "sort_code" | "spei" | "zengin") + zengin?: FundingInstructionsBankTransferZenginRecord +} +/** + * Iban Records contain E.U. bank account details per the SEPA format. + */ +export interface FundingInstructionsBankTransferIbanRecord { + /** + * The name of the person or business that owns the bank account + */ + account_holder_name: string + /** + * The BIC/SWIFT code of the account. + */ + bic: string + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country: string + /** + * The IBAN of the account. + */ + iban: string +} +/** + * Sort Code Records contain U.K. bank account details per the sort code format. + */ +export interface FundingInstructionsBankTransferSortCodeRecord { + /** + * The name of the person or business that owns the bank account + */ + account_holder_name: string + /** + * The account number + */ + account_number: string + /** + * The six-digit sort code + */ + sort_code: string +} +/** + * SPEI Records contain Mexico bank account details per the SPEI format. + */ +export interface FundingInstructionsBankTransferSpeiRecord { + /** + * The three-digit bank code + */ + bank_code: string + /** + * The short banking institution name + */ + bank_name: string + /** + * The CLABE number + */ + clabe: string +} +/** + * Zengin Records contain Japan bank account details per the Zengin format. + */ +export interface FundingInstructionsBankTransferZenginRecord { + /** + * The account holder name + */ + account_holder_name?: (string | null) + /** + * The account number + */ + account_number?: (string | null) + /** + * The bank account type. In Japan, this can only be `futsu` or `toza`. + */ + account_type?: (string | null) + /** + * The bank code of the account + */ + bank_code?: (string | null) + /** + * The bank name of the account + */ + bank_name?: (string | null) + /** + * The branch code of the account + */ + branch_code?: (string | null) + /** + * The branch name of the account + */ + branch_name?: (string | null) +} +export interface PaymentIntentNextActionKonbini { + /** + * The timestamp at which the pending Konbini payment expires. + */ + expires_at: number + /** + * The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. + */ + hosted_voucher_url?: (string | null) + stores: PaymentIntentNextActionKonbiniStores +} +export interface PaymentIntentNextActionKonbiniStores { + /** + * FamilyMart instruction details. + */ + familymart?: (PaymentIntentNextActionKonbiniFamilymart | null) + /** + * Lawson instruction details. + */ + lawson?: (PaymentIntentNextActionKonbiniLawson | null) + /** + * Ministop instruction details. + */ + ministop?: (PaymentIntentNextActionKonbiniMinistop | null) + /** + * Seicomart instruction details. + */ + seicomart?: (PaymentIntentNextActionKonbiniSeicomart | null) +} +export interface PaymentIntentNextActionKonbiniFamilymart { + /** + * The confirmation number. + */ + confirmation_number?: string + /** + * The payment code. + */ + payment_code: string +} +export interface PaymentIntentNextActionKonbiniLawson { + /** + * The confirmation number. + */ + confirmation_number?: string + /** + * The payment code. + */ + payment_code: string +} +export interface PaymentIntentNextActionKonbiniMinistop { + /** + * The confirmation number. + */ + confirmation_number?: string + /** + * The payment code. + */ + payment_code: string +} +export interface PaymentIntentNextActionKonbiniSeicomart { + /** + * The confirmation number. + */ + confirmation_number?: string + /** + * The payment code. + */ + payment_code: string +} +export interface PaymentIntentNextActionDisplayOxxoDetails { + /** + * The timestamp after which the OXXO voucher expires. + */ + expires_after?: (number | null) + /** + * The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. + */ + hosted_voucher_url?: (string | null) + /** + * OXXO reference number. + */ + number?: (string | null) +} +export interface PaymentIntentNextActionPaynowDisplayQrCode { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ + data: string + /** + * The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. + */ + hosted_instructions_url?: (string | null) + /** + * The image_url_png string used to render QR code + */ + image_url_png: string + /** + * The image_url_svg string used to render QR code + */ + image_url_svg: string +} +export interface PaymentIntentNextActionPixDisplayQrCode { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ + data?: string + /** + * The date (unix timestamp) when the PIX expires. + */ + expires_at?: number + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + */ + hosted_instructions_url?: string + /** + * The image_url_png string used to render png QR code + */ + image_url_png?: string + /** + * The image_url_svg string used to render svg QR code + */ + image_url_svg?: string +} +export interface PaymentIntentNextActionPromptpayDisplayQrCode { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ + data: string + /** + * The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + */ + hosted_instructions_url: string + /** + * The PNG path used to render the QR code, can be used as the source in an HTML img tag + */ + image_url_png: string + /** + * The SVG path used to render the QR code, can be used as the source in an HTML img tag + */ + image_url_svg: string +} +export interface PaymentIntentNextActionRedirectToUrl { + /** + * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + */ + return_url?: (string | null) + /** + * The URL you must redirect your customer to in order to authenticate the payment. + */ + url?: (string | null) +} +export interface PaymentIntentNextActionVerifyWithMicrodeposits { + /** + * The timestamp when the microdeposits are expected to land. + */ + arrival_date: number + /** + * The URL for the hosted verification page, which allows customers to verify their bank account. + */ + hosted_verification_url: string + /** + * The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + */ + microdeposit_type?: ("amounts" | "descriptor_code" | null) +} +export interface PaymentIntentNextActionWechatPayDisplayQrCode { + /** + * The data being used to generate QR code + */ + data: string + /** + * The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. + */ + hosted_instructions_url: string + /** + * The base64 image data for a pre-generated QR code + */ + image_data_url: string + /** + * The image_url_png string used to render QR code + */ + image_url_png: string + /** + * The image_url_svg string used to render QR code + */ + image_url_svg: string +} +export interface PaymentIntentNextActionWechatPayRedirectToAndroidApp { + /** + * app_id is the APP ID registered on WeChat open platform + */ + app_id: string + /** + * nonce_str is a random string + */ + nonce_str: string + /** + * package is static value + */ + package: string + /** + * an unique merchant ID assigned by WeChat Pay + */ + partner_id: string + /** + * an unique trading ID assigned by WeChat Pay + */ + prepay_id: string + /** + * A signature + */ + sign: string + /** + * Specifies the current time in epoch format + */ + timestamp: string +} +export interface PaymentIntentNextActionWechatPayRedirectToIOSApp { + /** + * An universal link that redirect to WeChat Pay app + */ + native_url: string +} +export interface PaymentIntentPaymentMethodOptions { + acss_debit?: (PaymentIntentPaymentMethodOptionsAcssDebit | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + affirm?: (PaymentMethodOptionsAffirm | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + afterpay_clearpay?: (PaymentMethodOptionsAfterpayClearpay | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + alipay?: (PaymentMethodOptionsAlipay | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + au_becs_debit?: (PaymentIntentPaymentMethodOptionsAuBecsDebit | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + bacs_debit?: (PaymentMethodOptionsBacsDebit | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + bancontact?: (PaymentMethodOptionsBancontact | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + blik?: (PaymentIntentPaymentMethodOptionsBlik | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + boleto?: (PaymentMethodOptionsBoleto | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + card?: (PaymentIntentPaymentMethodOptionsCard | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + card_present?: (PaymentMethodOptionsCardPresent | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + customer_balance?: (PaymentMethodOptionsCustomerBalance | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + eps?: (PaymentIntentPaymentMethodOptionsEps | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + fpx?: (PaymentMethodOptionsFpx | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + giropay?: (PaymentMethodOptionsGiropay | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + grabpay?: (PaymentMethodOptionsGrabpay | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + ideal?: (PaymentMethodOptionsIdeal | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + interac_present?: (PaymentMethodOptionsInteracPresent | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + klarna?: (PaymentMethodOptionsKlarna | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + konbini?: (PaymentMethodOptionsKonbini | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + link?: (PaymentIntentPaymentMethodOptionsLink | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + oxxo?: (PaymentMethodOptionsOxxo | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + p24?: (PaymentMethodOptionsP24 | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + paynow?: (PaymentMethodOptionsPaynow | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + pix?: (PaymentMethodOptionsPix | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + promptpay?: (PaymentMethodOptionsPromptpay | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + sepa_debit?: (PaymentIntentPaymentMethodOptionsSepaDebit | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + sofort?: (PaymentMethodOptionsSofort | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + us_bank_account?: (PaymentIntentPaymentMethodOptionsUsBankAccount | PaymentIntentTypeSpecificPaymentMethodOptionsClient) + wechat_pay?: (PaymentMethodOptionsWechatPay | PaymentIntentTypeSpecificPaymentMethodOptionsClient) +} +export interface PaymentIntentPaymentMethodOptionsAcssDebit { + mandate_options?: PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit { + /** + * A URL for custom mandate text + */ + custom_mandate_url?: string + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ + interval_description?: (string | null) + /** + * Payment schedule for the mandate. + */ + payment_schedule?: ("combined" | "interval" | "sporadic" | null) + /** + * Transaction type of the mandate. + */ + transaction_type?: ("business" | "personal" | null) +} +export interface PaymentIntentTypeSpecificPaymentMethodOptionsClient { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: ("manual" | "manual_preferred") + installments?: PaymentFlowsInstallmentOptions + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface PaymentFlowsInstallmentOptions { + enabled: boolean + plan?: PaymentMethodDetailsCardInstallmentsPlan +} +export interface PaymentMethodOptionsAffirm { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: "manual" + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsAfterpayClearpay { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: "manual" + /** + * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + */ + reference?: (string | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsAlipay { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session") +} +export interface PaymentIntentPaymentMethodOptionsAuBecsDebit { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface PaymentMethodOptionsBacsDebit { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface PaymentMethodOptionsBancontact { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ + preferred_language: ("de" | "en" | "fr" | "nl") + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session") +} +export interface PaymentIntentPaymentMethodOptionsBlik { + +} +export interface PaymentMethodOptionsBoleto { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + expires_after_days: number + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface PaymentIntentPaymentMethodOptionsCard { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: "manual" + /** + * Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments?: (PaymentMethodOptionsCardInstallments | null) + /** + * Configuration options for setting up an eMandate for cards issued in India. + */ + mandate_options?: (PaymentMethodOptionsCardMandateOptions | null) + /** + * Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + */ + network?: ("amex" | "cartes_bancaires" | "diners" | "discover" | "interac" | "jcb" | "mastercard" | "unionpay" | "unknown" | "visa" | null) + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ + request_three_d_secure?: ("any" | "automatic" | "challenge_only" | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ + statement_descriptor_suffix_kana?: string + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ + statement_descriptor_suffix_kanji?: string +} +export interface PaymentMethodOptionsCardInstallments { + /** + * Installment plans that may be selected for this PaymentIntent. + */ + available_plans?: (PaymentMethodDetailsCardInstallmentsPlan[] | null) + /** + * Whether Installments are enabled for this PaymentIntent. + */ + enabled: boolean + /** + * Installment plan selected for this PaymentIntent. + */ + plan?: (PaymentMethodDetailsCardInstallmentsPlan | null) +} +export interface PaymentMethodOptionsCardMandateOptions { + /** + * Amount to be charged for future payments. + */ + amount: number + /** + * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + */ + amount_type: ("fixed" | "maximum") + /** + * A description of the mandate or subscription that is meant to be displayed to the customer. + */ + description?: (string | null) + /** + * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: (number | null) + /** + * Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + */ + interval: ("day" | "month" | "sporadic" | "week" | "year") + /** + * The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + */ + interval_count?: (number | null) + /** + * Unique identifier for the mandate or subscription. + */ + reference: string + /** + * Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** + * Specifies the type of mandates supported. Possible values are `india`. + */ + supported_types?: (("india")[] | null) +} +export interface PaymentMethodOptionsCardPresent { + /** + * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + */ + request_extended_authorization?: (boolean | null) + /** + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + */ + request_incremental_authorization_support?: (boolean | null) +} +export interface PaymentMethodOptionsCustomerBalance { + bank_transfer?: PaymentMethodOptionsCustomerBalanceBankTransfer + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: ("bank_transfer" | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsCustomerBalanceBankTransfer { + eu_bank_transfer?: PaymentMethodOptionsCustomerBalanceEuBankAccount + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[] + /** + * 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`, or `mx_bank_transfer`. + */ + type?: ("eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer" | null) +} +export interface PaymentMethodOptionsCustomerBalanceEuBankAccount { + /** + * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + */ + country: ("BE" | "DE" | "ES" | "FR" | "IE" | "NL") +} +export interface PaymentIntentPaymentMethodOptionsEps { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsFpx { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsGiropay { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsGrabpay { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsIdeal { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session") +} +export interface PaymentMethodOptionsInteracPresent { + +} +export interface PaymentMethodOptionsKlarna { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: "manual" + /** + * Preferred locale of the Klarna checkout page that the customer is redirected to. + */ + preferred_locale?: (string | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsKonbini { + /** + * An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. + */ + confirmation_number?: (string | null) + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ + expires_after_days?: (number | null) + /** + * The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + expires_at?: (number | null) + /** + * A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + */ + product_description?: (string | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentIntentPaymentMethodOptionsLink { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: "manual" + /** + * Token used for persistent Link logins. + */ + persistent_token?: (string | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session") +} +export interface PaymentMethodOptionsOxxo { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ + expires_after_days: number + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsP24 { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsPaynow { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsPix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + */ + expires_after_seconds?: (number | null) + /** + * The timestamp at which the Pix expires. + */ + expires_at?: (number | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentMethodOptionsPromptpay { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentIntentPaymentMethodOptionsSepaDebit { + mandate_options?: PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit { + +} +export interface PaymentMethodOptionsSofort { + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + */ + preferred_language?: ("de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session") +} +export interface PaymentIntentPaymentMethodOptionsUsBankAccount { + financial_connections?: LinkedAccountOptionsUsBankAccount + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface PaymentMethodOptionsWechatPay { + /** + * The app ID registered with WeChat Pay. Only required when client is ios or android. + */ + app_id?: (string | null) + /** + * The client type that the end customer will pay from + */ + client?: ("android" | "ios" | "web" | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface PaymentIntentProcessing { + card?: PaymentIntentCardProcessing + /** + * Type of the payment method for which payment is in `processing` state, one of `card`. + */ + type: "card" +} +export interface PaymentIntentCardProcessing { + customer_notification?: PaymentIntentProcessingCustomerNotification +} +export interface PaymentIntentProcessingCustomerNotification { + /** + * Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. + */ + approval_requested?: (boolean | null) + /** + * If customer approval is required, they need to provide approval before this time. + */ + completes_at?: (number | null) +} +export interface TransferData { + /** + * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + */ + amount?: number + /** + * The account (if any) the payment will be attributed to for tax + * reporting, and where funds from the payment will be transferred to upon + * payment success. + */ + destination: (string | Account) +} +export interface Networks { + /** + * All available networks for the card. + */ + available: string[] + /** + * The preferred network for the card. + */ + preferred?: (string | null) +} +export interface ThreeDSecureUsage { + /** + * Whether 3D Secure is supported on this card. + */ + supported: boolean +} +export interface PaymentMethodCardWallet { + amex_express_checkout?: PaymentMethodCardWalletAmexExpressCheckout + apple_pay?: PaymentMethodCardWalletApplePay + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ + dynamic_last4?: (string | null) + google_pay?: PaymentMethodCardWalletGooglePay + masterpass?: PaymentMethodCardWalletMasterpass + samsung_pay?: PaymentMethodCardWalletSamsungPay + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ + type: ("amex_express_checkout" | "apple_pay" | "google_pay" | "masterpass" | "samsung_pay" | "visa_checkout") + visa_checkout?: PaymentMethodCardWalletVisaCheckout +} +export interface PaymentMethodCardWalletAmexExpressCheckout { + +} +export interface PaymentMethodCardWalletApplePay { + +} +export interface PaymentMethodCardWalletGooglePay { + +} +export interface PaymentMethodCardWalletMasterpass { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + billing_address?: (Address | null) + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + email?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + name?: (string | null) + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + shipping_address?: (Address | null) +} +export interface PaymentMethodCardWalletSamsungPay { + +} +export interface PaymentMethodCardWalletVisaCheckout { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + billing_address?: (Address | null) + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + email?: (string | null) + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + name?: (string | null) + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + shipping_address?: (Address | null) +} +export interface PaymentMethodCardPresent { + +} +export interface PaymentMethodCustomerBalance { + +} +export interface PaymentMethodEps { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ + bank?: ("arzte_und_apotheker_bank" | "austrian_anadi_bank_ag" | "bank_austria" | "bankhaus_carl_spangler" | "bankhaus_schelhammer_und_schattera_ag" | "bawag_psk_ag" | "bks_bank_ag" | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" | "hypo_alpeadriabank_international_ag" | "hypo_bank_burgenland_aktiengesellschaft" | "hypo_noe_lb_fur_niederosterreich_u_wien" | "hypo_oberosterreich_salzburg_steiermark" | "hypo_tirol_bank_ag" | "hypo_vorarlberg_bank_ag" | "marchfelder_bank" | "oberbank_ag" | "raiffeisen_bankengruppe_osterreich" | "schoellerbank_ag" | "sparda_bank_wien" | "volksbank_gruppe" | "volkskreditbank_ag" | "vr_bank_braunau" | null) +} +export interface PaymentMethodFpx { + /** + * The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ + bank: ("affin_bank" | "agrobank" | "alliance_bank" | "ambank" | "bank_islam" | "bank_muamalat" | "bank_of_china" | "bank_rakyat" | "bsn" | "cimb" | "deutsche_bank" | "hong_leong_bank" | "hsbc" | "kfh" | "maybank2e" | "maybank2u" | "ocbc" | "pb_enterprise" | "public_bank" | "rhb" | "standard_chartered" | "uob") +} +export interface PaymentMethodGiropay { + +} +export interface PaymentMethodGrabpay { + +} +export interface PaymentMethodIdeal { + /** + * The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ + bank?: ("abn_amro" | "asn_bank" | "bunq" | "handelsbanken" | "ing" | "knab" | "moneyou" | "rabobank" | "regiobank" | "revolut" | "sns_bank" | "triodos_bank" | "van_lanschot" | "yoursafe" | null) + /** + * The Bank Identifier Code of the customer's bank, if the bank was provided. + */ + bic?: ("ABNANL2A" | "ASNBNL21" | "BITSNL2A" | "BUNQNL2A" | "FVLBNL22" | "HANDNL2A" | "INGBNL2A" | "KNABNL2H" | "MOYONL21" | "RABONL2U" | "RBRBNL21" | "REVOLT21" | "SNSBNL2A" | "TRIONL2U" | null) +} +export interface PaymentMethodInteracPresent { + +} +export interface PaymentMethodKlarna { + /** + * The customer's date of birth, if provided. + */ + dob?: (PaymentFlowsPrivatePaymentMethodsKlarnaDOB | null) +} +export interface PaymentFlowsPrivatePaymentMethodsKlarnaDOB { + /** + * The day of birth, between 1 and 31. + */ + day?: (number | null) + /** + * The month of birth, between 1 and 12. + */ + month?: (number | null) + /** + * The four-digit year of birth. + */ + year?: (number | null) +} +export interface PaymentMethodKonbini { + +} +export interface PaymentMethodLink { + /** + * Account owner's email address. + */ + email?: (string | null) + /** + * Token used for persistent Link logins. + */ + persistent_token?: string +} +export interface PaymentMethodOxxo { + +} +export interface PaymentMethodP24 { + /** + * The customer's bank, if provided. + */ + bank?: ("alior_bank" | "bank_millennium" | "bank_nowy_bfg_sa" | "bank_pekao_sa" | "banki_spbdzielcze" | "blik" | "bnp_paribas" | "boz" | "citi_handlowy" | "credit_agricole" | "envelobank" | "etransfer_pocztowy24" | "getin_bank" | "ideabank" | "ing" | "inteligo" | "mbank_mtransfer" | "nest_przelew" | "noble_pay" | "pbac_z_ipko" | "plus_bank" | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" | "volkswagen_bank" | null) +} +export interface PaymentMethodPaynow { + +} +export interface PaymentMethodPix { + +} +export interface PaymentMethodPromptpay { + +} +export interface PaymentMethodSepaDebit { + /** + * Bank code of bank associated with the bank account. + */ + bank_code?: (string | null) + /** + * Branch code of bank associated with the bank account. + */ + branch_code?: (string | null) + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Information about the object that generated this PaymentMethod. + */ + generated_from?: (SepaDebitGeneratedFrom | null) + /** + * Last four characters of the IBAN. + */ + last4?: (string | null) +} +export interface SepaDebitGeneratedFrom { + /** + * The ID of the Charge that generated this PaymentMethod, if any. + */ + charge?: (string | Charge | null) + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ + setup_attempt?: (string | PaymentFlowsSetupIntentSetupAttempt | null) +} +export interface PaymentMethodSofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country?: (string | null) +} +export interface PaymentMethodUsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type?: ("company" | "individual" | null) + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type?: ("checking" | "savings" | null) + /** + * The name of the bank. + */ + bank_name?: (string | null) + /** + * The ID of the Financial Connections Account used to create the payment method. + */ + financial_connections_account?: (string | null) + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint?: (string | null) + /** + * Last four digits of the bank account number. + */ + last4?: (string | null) + /** + * Contains information about US bank account networks that can be used. + */ + networks?: (UsBankAccountNetworks | null) + /** + * Routing number of the bank account. + */ + routing_number?: (string | null) +} +export interface UsBankAccountNetworks { + /** + * The preferred network. + */ + preferred?: (string | null) + /** + * All supported networks. + */ + supported: ("ach" | "us_domestic_wire")[] +} +export interface PaymentMethodWechatPay { + +} +/** + * The customer's payment sources, if any. + */ +export interface ApmsSourcesSourceList { + /** + * Details about each object. + */ + data: Polymorphic1[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +/** + * The customer's current subscriptions, if any. + */ +export interface SubscriptionList { + /** + * Details about each object. + */ + data: Subscription[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface CustomerTax { + /** + * Surfaces if automatic tax computation is possible given the current customer location information. + */ + automatic_tax: ("failed" | "not_collecting" | "supported" | "unrecognized_location") + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + ip_address?: (string | null) + /** + * The customer's location as identified by Stripe Tax. + */ + location?: (CustomerTaxLocation | null) +} +export interface CustomerTaxLocation { + /** + * The customer's country as identified by Stripe Tax. + */ + country: string + /** + * The data source used to infer the customer's location. + */ + source: ("billing_address" | "ip_address" | "payment_method" | "shipping_destination") + /** + * The customer's state, county, province, or region as identified by Stripe Tax. + */ + state?: (string | null) +} +/** + * The customer's tax IDs. + */ +export interface TaxIDsList { + /** + * Details about each object. + */ + data: TaxId[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface PaymentPagesCheckoutSessionCustomerDetails { + /** + * The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ + address?: (Address | null) + /** + * The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + */ + email?: (string | null) + /** + * The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + */ + name?: (string | null) + /** + * The customer's phone number after a completed Checkout Session. + */ + phone?: (string | null) + /** + * The customer’s tax exempt status after a completed Checkout Session. + */ + tax_exempt?: ("exempt" | "none" | "reverse" | null) + /** + * The customer’s tax IDs after a completed Checkout Session. + */ + tax_ids?: (PaymentPagesCheckoutSessionTaxID[] | null) +} +export interface PaymentPagesCheckoutSessionTaxID { + /** + * The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown` + */ + type: ("ae_trn" | "au_abn" | "au_arn" | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" | "ca_gst_hst" | "ca_pst_bc" | "ca_pst_mb" | "ca_pst_sk" | "ca_qst" | "ch_vat" | "cl_tin" | "eg_tin" | "es_cif" | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" | "is_vat" | "jp_cn" | "jp_rn" | "jp_trn" | "ke_pin" | "kr_brn" | "li_uid" | "mx_rfc" | "my_frp" | "my_itn" | "my_sst" | "no_vat" | "nz_gst" | "ph_tin" | "ru_inn" | "ru_kpp" | "sa_vat" | "sg_gst" | "sg_uen" | "si_tin" | "th_vat" | "tr_tin" | "tw_vat" | "ua_vat" | "unknown" | "us_ein" | "za_vat") + /** + * The value of the tax ID. + */ + value?: (string | null) +} +export interface PaymentPagesCheckoutSessionInvoiceCreation { + /** + * Indicates whether invoice creation is enabled for the Checkout Session. + */ + enabled: boolean + invoice_data: PaymentPagesCheckoutSessionInvoiceSettings +} +export interface PaymentPagesCheckoutSessionInvoiceSettings { + /** + * The account tax IDs associated with the invoice. + */ + account_tax_ids?: ((string | TaxId | DeletedTaxId)[] | null) + /** + * Custom fields displayed on the invoice. + */ + custom_fields?: (InvoiceSettingCustomField[] | null) + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Footer displayed on the invoice. + */ + footer?: (string | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * Options for invoice PDF rendering. + */ + rendering_options?: (InvoiceSettingRenderingOptions | null) +} +/** + * The line items purchased by the customer. + */ +export interface PaymentPagesCheckoutSessionListLineItems { + /** + * Details about each object. + */ + data: LineItem[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +/** + * A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api) + */ +export interface PaymentLink { + /** + * Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + */ + active: boolean + after_completion: PaymentLinksResourceAfterCompletion + /** + * Whether user redeemable promotion codes are enabled. + */ + allow_promotion_codes: boolean + /** + * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + */ + application_fee_amount?: (number | null) + /** + * This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + */ + application_fee_percent?: (number | null) + automatic_tax: PaymentLinksResourceAutomaticTax + /** + * Configuration for collecting the customer's billing address. + */ + billing_address_collection: ("auto" | "required") + /** + * When set, provides configuration to gather active consent from customers. + */ + consent_collection?: (PaymentLinksResourceConsentCollection | null) + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields: PaymentLinksResourceCustomFields[] + custom_text: PaymentLinksResourceCustomText + /** + * Configuration for Customer creation during checkout. + */ + customer_creation: ("always" | "if_required") + /** + * Unique identifier for the object. + */ + id: string + /** + * Configuration for creating invoice for payment mode payment links. + */ + invoice_creation?: (PaymentLinksResourceInvoiceCreation | null) + line_items?: PaymentLinksResourceListLineItems + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: { + [k: string]: string + } + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: "payment_link" + /** + * The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + */ + on_behalf_of?: (string | Account | null) + /** + * Indicates the parameters to be passed to PaymentIntent creation during checkout. + */ + payment_intent_data?: (PaymentLinksResourcePaymentIntentData | null) + /** + * Configuration for collecting a payment method during checkout. + */ + payment_method_collection: ("always" | "if_required") + /** + * The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + */ + payment_method_types?: (("affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" | "blik" | "boleto" | "card" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" | "konbini" | "oxxo" | "p24" | "paynow" | "pix" | "promptpay" | "sepa_debit" | "sofort" | "us_bank_account" | "wechat_pay")[] | null) + phone_number_collection: PaymentLinksResourcePhoneNumberCollection + /** + * Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: (PaymentLinksResourceShippingAddressCollection | null) + /** + * The shipping rate options applied to the session. + */ + shipping_options: PaymentLinksResourceShippingOption[] + /** + * Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + */ + submit_type: ("auto" | "book" | "donate" | "pay") + /** + * When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: (PaymentLinksResourceSubscriptionData | null) + tax_id_collection: PaymentLinksResourceTaxIdCollection + /** + * The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: (PaymentLinksResourceTransferData | null) + /** + * The public URL that can be shared with customers. + */ + url: string +} +export interface PaymentLinksResourceAfterCompletion { + hosted_confirmation?: PaymentLinksResourceCompletionBehaviorConfirmationPage + redirect?: PaymentLinksResourceCompletionBehaviorRedirect + /** + * The specified behavior after the purchase is complete. + */ + type: ("hosted_confirmation" | "redirect") +} +export interface PaymentLinksResourceCompletionBehaviorConfirmationPage { + /** + * The custom message that is displayed to the customer after the purchase is complete. + */ + custom_message?: (string | null) +} +export interface PaymentLinksResourceCompletionBehaviorRedirect { + /** + * The URL the customer will be redirected to after the purchase is complete. + */ + url: string +} +export interface PaymentLinksResourceAutomaticTax { + /** + * If `true`, tax will be calculated automatically using the customer's location. + */ + enabled: boolean +} +export interface PaymentLinksResourceConsentCollection { + /** + * If set to `auto`, enables the collection of customer consent for promotional communications. + */ + promotions?: ("auto" | "none" | null) + /** + * If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + */ + terms_of_service?: ("none" | "required" | null) +} +export interface PaymentLinksResourceCustomFields { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown?: (PaymentLinksResourceCustomFieldsDropdown | null) + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string + label: PaymentLinksResourceCustomFieldsLabel + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional: boolean + /** + * The type of the field. + */ + type: ("dropdown" | "numeric" | "text") +} +export interface PaymentLinksResourceCustomFieldsDropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: PaymentLinksResourceCustomFieldsDropdownOption[] +} +export interface PaymentLinksResourceCustomFieldsDropdownOption { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string +} +export interface PaymentLinksResourceCustomFieldsLabel { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom?: (string | null) + /** + * The type of the label. + */ + type: "custom" +} +export interface PaymentLinksResourceCustomText { + /** + * Custom text that should be displayed alongside shipping address collection. + */ + shipping_address?: (PaymentLinksResourceCustomTextPosition | null) + /** + * Custom text that should be displayed alongside the payment confirmation button. + */ + submit?: (PaymentLinksResourceCustomTextPosition | null) +} +export interface PaymentLinksResourceCustomTextPosition { + /** + * Text may be up to 1000 characters in length. + */ + message: string +} +export interface PaymentLinksResourceInvoiceCreation { + /** + * Enable creating an invoice on successful payment. + */ + enabled: boolean + /** + * Configuration for the invoice. Default invoice values will be used if unspecified. + */ + invoice_data?: (PaymentLinksResourceInvoiceSettings | null) +} +export interface PaymentLinksResourceInvoiceSettings { + /** + * The account tax IDs associated with the invoice. + */ + account_tax_ids?: ((string | TaxId | DeletedTaxId)[] | null) + /** + * A list of up to 4 custom fields to be displayed on the invoice. + */ + custom_fields?: (InvoiceSettingCustomField[] | null) + /** + * An arbitrary string attached to the object. Often useful for displaying to users. + */ + description?: (string | null) + /** + * Footer to be displayed on the invoice. + */ + footer?: (string | null) + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: ({ + [k: string]: string + } | null) + /** + * Options for invoice PDF rendering. + */ + rendering_options?: (InvoiceSettingRenderingOptions | null) +} +/** + * The line items representing what is being sold. + */ +export interface PaymentLinksResourceListLineItems { + /** + * Details about each object. + */ + data: LineItem[] + /** + * True if this list has another page of items after this one that can be fetched. + */ + has_more: boolean + /** + * String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + */ + object: "list" + /** + * The URL where this list can be accessed. + */ + url: string +} +export interface PaymentLinksResourcePaymentIntentData { + /** + * Indicates when the funds will be captured from the customer's account. + */ + capture_method?: ("automatic" | "manual" | null) + /** + * Indicates that you intend to make future payments with the payment method collected during checkout. + */ + setup_future_usage?: ("off_session" | "on_session" | null) +} +export interface PaymentLinksResourcePhoneNumberCollection { + /** + * If `true`, a phone number will be collected during checkout. + */ + enabled: boolean +} +export interface PaymentLinksResourceShippingAddressCollection { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ + allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[] +} +export interface PaymentLinksResourceShippingOption { + /** + * A non-negative integer in cents representing how much to charge. + */ + shipping_amount: number + /** + * The ID of the Shipping Rate to use for this shipping option. + */ + shipping_rate: (string | ShippingRate) +} +export interface PaymentLinksResourceSubscriptionData { + /** + * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + */ + description?: (string | null) + /** + * Integer representing the number of trial period days before the customer is charged for the first time. + */ + trial_period_days?: (number | null) +} +export interface PaymentLinksResourceTaxIdCollection { + /** + * Indicates whether tax ID collection is enabled for the session. + */ + enabled: boolean +} +export interface PaymentLinksResourceTransferData { + /** + * The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount?: (number | null) + /** + * The connected account receiving the transfer. + */ + destination: (string | Account) +} +export interface CheckoutSessionPaymentMethodOptions { + acss_debit?: CheckoutAcssDebitPaymentMethodOptions + affirm?: CheckoutAffirmPaymentMethodOptions + afterpay_clearpay?: CheckoutAfterpayClearpayPaymentMethodOptions + alipay?: CheckoutAlipayPaymentMethodOptions + au_becs_debit?: CheckoutAuBecsDebitPaymentMethodOptions + bacs_debit?: CheckoutBacsDebitPaymentMethodOptions + bancontact?: CheckoutBancontactPaymentMethodOptions + boleto?: CheckoutBoletoPaymentMethodOptions + card?: CheckoutCardPaymentMethodOptions + customer_balance?: CheckoutCustomerBalancePaymentMethodOptions + eps?: CheckoutEpsPaymentMethodOptions + fpx?: CheckoutFpxPaymentMethodOptions + giropay?: CheckoutGiropayPaymentMethodOptions + grabpay?: CheckoutGrabPayPaymentMethodOptions + ideal?: CheckoutIdealPaymentMethodOptions + klarna?: CheckoutKlarnaPaymentMethodOptions + konbini?: CheckoutKonbiniPaymentMethodOptions + oxxo?: CheckoutOxxoPaymentMethodOptions + p24?: CheckoutP24PaymentMethodOptions + paynow?: CheckoutPaynowPaymentMethodOptions + pix?: CheckoutPixPaymentMethodOptions + sepa_debit?: CheckoutSepaDebitPaymentMethodOptions + sofort?: CheckoutSofortPaymentMethodOptions + us_bank_account?: CheckoutUsBankAccountPaymentMethodOptions +} +export interface CheckoutAcssDebitPaymentMethodOptions { + /** + * Currency supported by the bank account. Returned when the Session is in `setup` mode. + */ + currency?: ("cad" | "usd") + mandate_options?: CheckoutAcssDebitMandateOptions + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant" | "microdeposits") +} +export interface CheckoutAcssDebitMandateOptions { + /** + * A URL for custom mandate text + */ + custom_mandate_url?: string + /** + * List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. + */ + default_for?: ("invoice" | "subscription")[] + /** + * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + */ + interval_description?: (string | null) + /** + * Payment schedule for the mandate. + */ + payment_schedule?: ("combined" | "interval" | "sporadic" | null) + /** + * Transaction type of the mandate. + */ + transaction_type?: ("business" | "personal" | null) +} +export interface CheckoutAffirmPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutAfterpayClearpayPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutAlipayPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutAuBecsDebitPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutBacsDebitPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface CheckoutBancontactPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutBoletoPaymentMethodOptions { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + expires_after_days: number + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface CheckoutCardPaymentMethodOptions { + installments?: CheckoutCardInstallmentsOptions + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + */ + statement_descriptor_suffix_kana?: string + /** + * Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + */ + statement_descriptor_suffix_kanji?: string +} +export interface CheckoutCardInstallmentsOptions { + /** + * Indicates if installments are enabled + */ + enabled?: boolean +} +export interface CheckoutCustomerBalancePaymentMethodOptions { + bank_transfer?: CheckoutCustomerBalanceBankTransferPaymentMethodOptions + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: ("bank_transfer" | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutCustomerBalanceBankTransferPaymentMethodOptions { + eu_bank_transfer?: PaymentMethodOptionsCustomerBalanceEuBankAccount + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ("iban" | "sepa" | "sort_code" | "spei" | "zengin")[] + /** + * 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`, or `mx_bank_transfer`. + */ + type?: ("eu_bank_transfer" | "gb_bank_transfer" | "jp_bank_transfer" | "mx_bank_transfer" | null) +} +export interface CheckoutEpsPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutFpxPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutGiropayPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutGrabPayPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutIdealPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutKlarnaPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface CheckoutKonbiniPaymentMethodOptions { + /** + * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + */ + expires_after_days?: (number | null) + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutOxxoPaymentMethodOptions { + /** + * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + */ + expires_after_days: number + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutP24PaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutPaynowPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutPixPaymentMethodOptions { + /** + * The number of seconds after which Pix payment will expire. + */ + expires_after_seconds?: (number | null) +} +export interface CheckoutSepaDebitPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") +} +export interface CheckoutSofortPaymentMethodOptions { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: "none" +} +export interface CheckoutUsBankAccountPaymentMethodOptions { + financial_connections?: LinkedAccountOptionsUsBankAccount + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: ("none" | "off_session" | "on_session") + /** + * Bank account verification method. + */ + verification_method?: ("automatic" | "instant") +} +export interface PaymentPagesCheckoutSessionPhoneNumberCollection { + /** + * Indicates whether phone number collection is enabled for the session + */ + enabled: boolean +} +export interface PaymentPagesCheckoutSessionShippingAddressCollection { + /** + * An array of two-letter ISO country codes representing which countries Checkout should provide as options for + * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ + allowed_countries: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CV" | "CW" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ")[] +} +export interface PaymentPagesCheckoutSessionShippingCost { + /** + * Total shipping cost before any discounts or taxes are applied. + */ + amount_subtotal: number + /** + * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + */ + amount_tax: number + /** + * Total shipping cost after discounts and taxes are applied. + */ + amount_total: number + /** + * The ID of the ShippingRate for this order. + */ + shipping_rate?: (string | ShippingRate | null) + /** + * The taxes applied to the shipping rate. + */ + taxes?: LineItemsTaxAmount[] +} +export interface PaymentPagesCheckoutSessionShippingOption { + /** + * A non-negative integer in cents representing how much to charge. + */ + shipping_amount: number + /** + * The shipping rate. + */ + shipping_rate: (string | ShippingRate) +} +export interface PaymentPagesCheckoutSessionTaxIDCollection { + /** + * Indicates whether tax ID collection is enabled for the session + */ + enabled: boolean +} +export interface PaymentPagesCheckoutSessionTotalDetails { + /** + * This is the sum of all the discounts. + */ + amount_discount: number + /** + * This is the sum of all the shipping amounts. + */ + amount_shipping?: (number | null) + /** + * This is the sum of all the tax amounts. + */ + amount_tax: number + breakdown?: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown +} +export interface PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { + /** + * The aggregated discounts. + */ + discounts: LineItemsDiscountAmount[] + /** + * The aggregated tax amounts by rate. + */ + taxes: LineItemsTaxAmount[] +} + +export type Prettify = { + [K in keyof T]: T[K]; +} & {}; diff --git a/generated-integrations/stripe/tsconfig.json b/generated-integrations/stripe/tsconfig.json new file mode 100644 index 00000000000..bb3e70788c7 --- /dev/null +++ b/generated-integrations/stripe/tsconfig.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 16", + "include": ["./src/**/*.ts", "tsup.config.ts"], + "compilerOptions": { + "module": "commonjs", + "target": "ES2021", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "lib": ["DOM", "DOM.Iterable", "ES2019"], + "paths": { + "@trigger.dev/sdk/*": ["../../packages/trigger-sdk/src/*"], + "@trigger.dev/sdk": ["../../packages/trigger-sdk/src/index"] + } + }, + "exclude": ["node_modules"] +} diff --git a/generated-integrations/stripe/tsup.config.ts b/generated-integrations/stripe/tsup.config.ts new file mode 100644 index 00000000000..5fcec5da2b5 --- /dev/null +++ b/generated-integrations/stripe/tsup.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from "tsup"; + +export default defineConfig([ + { + name: "main", + entry: ["./src/index.ts"], + outDir: "./dist", + platform: "node", + format: ["cjs"], + legacyOutput: true, + sourcemap: true, + clean: true, + bundle: true, + splitting: false, + dts: true, + treeshake: { + preset: "smallest", + }, + external: ["http", "https", "util", "events", "tty", "os", "timers"], + esbuildPlugins: [], + }, +]); From 5290be7f3b761f3e6f35d7aef7d274e80de3a961 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 23:09:26 +0000 Subject: [PATCH 099/113] =?UTF-8?q?Verifying=20Stripe=20webhooks=20is=20wo?= =?UTF-8?q?rking=20and=20they=E2=80=99re=20coming=20through?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/integrations/package.json | 1 + .../integrations/stripe/webhooks/webhooks.ts | 25 +++++----- config-packages/tsconfig/examples.json | 6 ++- examples/stripe/package.json | 19 ++++++++ examples/stripe/src/index.ts | 14 ++++++ examples/stripe/tsconfig.json | 5 ++ pnpm-lock.yaml | 46 +++++++++++++++++++ 7 files changed, 102 insertions(+), 14 deletions(-) create mode 100644 examples/stripe/package.json create mode 100644 examples/stripe/src/index.ts create mode 100644 examples/stripe/tsconfig.json diff --git a/apps/integrations/package.json b/apps/integrations/package.json index b1258989772..672bb58a231 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -36,6 +36,7 @@ "node-fetch": "^3.3.0", "node-object-hash": "^2.3.10", "qs": "^6.11.0", + "stripe": "^11.13.0", "zod": "^3.20.2" }, "devDependencies": { diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index b8bc5dc2f20..805dffe9252 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -1,6 +1,6 @@ import { makeWebhook } from "core/webhook"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; -import crypto from "node:crypto"; +import Stripe from "stripe"; import { authentication } from "../authentication"; import { checkoutCompletedSuccess } from "./examples"; import { checkoutSessionCompletedSchema } from "./schemas"; @@ -23,7 +23,7 @@ export const checkoutCompleted: WebhookEvent = { displayProperties: (data) => ({ title: `New Stripe checkout`, }), - matches: (data) => data.request.body.object === "checkout.session", + matches: (data) => data.request.body.type === "checkout.session.completed", process: async (data: WebhookReceiveRequest) => [ { event: "checkout.session.completed", @@ -77,18 +77,17 @@ const webhook = makeWebhook({ }, preProcess: async (data) => { if (data.secret) { - //https://stripe.com/docs/webhooks/signatures#verify-manually const signatureHeader = data.request.headers["stripe-signature"]; - const elements = signatureHeader.split(","); - const timestamp = elements[0].split("=")[1]; - const signature = elements[1].split("=")[1]; - const contentToEncode = `${timestamp}.${data.request.rawBody}`; - const hash = crypto - .createHmac("sha256", data.secret) - .update(contentToEncode) - .digest("base64"); - - if (signature !== `sha256=${hash}`) { + try { + const client = new Stripe(data.secret, { + apiVersion: "2022-11-15", + }); + const event = client.webhooks.constructEvent( + data.request.rawBody, + signatureHeader, + data.secret + ); + } catch (e) { return { success: false, processEvents: false, diff --git a/config-packages/tsconfig/examples.json b/config-packages/tsconfig/examples.json index 1e44b46a45f..4937f1c99f6 100644 --- a/config-packages/tsconfig/examples.json +++ b/config-packages/tsconfig/examples.json @@ -57,7 +57,11 @@ "@trigger.dev/typeform": [ "../../generated-integrations/typeform/src/index" ], - "@trigger.dev/typeform/*": ["../../generated-integrations/typeform/src/*"] + "@trigger.dev/typeform/*": ["../../generated-integrations/typeform/src/*"], + "@trigger.dev/stripe": [ + "../../generated-integrations/stripe/src/index" + ], + "@trigger.dev/stripe/*": ["../../generated-integrations/stripe/src/*"] } } } \ No newline at end of file diff --git a/examples/stripe/package.json b/examples/stripe/package.json new file mode 100644 index 00000000000..63ffda33b68 --- /dev/null +++ b/examples/stripe/package.json @@ -0,0 +1,19 @@ +{ + "private": true, + "name": "@examples/strip", + "version": "0.0.1", + "description": "Example trigger.dev workflow that uses the Stripe integration", + "dependencies": { + "@trigger.dev/stripe": "workspace:*", + "@trigger.dev/sdk": "workspace:*", + "zod": "^3.20.2" + }, + "devDependencies": { + "@trigger.dev/tsconfig": "workspace:*", + "@types/node": "16", + "tsx": "^3.12.0" + }, + "scripts": { + "dev": "tsx src/index.ts" + } +} diff --git a/examples/stripe/src/index.ts b/examples/stripe/src/index.ts new file mode 100644 index 00000000000..a9e64560702 --- /dev/null +++ b/examples/stripe/src/index.ts @@ -0,0 +1,14 @@ +import { Trigger } from "@trigger.dev/sdk"; +import { events } from "@trigger.dev/stripe"; + +new Trigger({ + id: "stripe-checout.session.completed", + name: "Stripe checkout session completed", + apiKey: "trigger_dev_zC25mKNn6c0q", + endpoint: "ws://localhost:8889/ws", + logLevel: "debug", + on: events.checkoutSessionCompletedEvent(), + run: async (event, ctx) => { + return {}; + }, +}).listen(); diff --git a/examples/stripe/tsconfig.json b/examples/stripe/tsconfig.json new file mode 100644 index 00000000000..00ad22f1a85 --- /dev/null +++ b/examples/stripe/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@trigger.dev/tsconfig/examples.json", + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "**/*.test.*"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 259a3fe0416..ef39a323a82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,6 +77,7 @@ importers: prisma: ^4.3.0 qs: ^6.11.0 rimraf: ^4.1.2 + stripe: ^11.13.0 tiny-invariant: ^1.2.0 ts-json-schema-generator: ^1.2.0 ts-morph: ^17.0.1 @@ -105,6 +106,7 @@ importers: node-fetch: 3.3.0 node-object-hash: 2.3.10 qs: 6.11.0 + stripe: 11.13.0 zod: 3.20.2 devDependencies: '@apidevtools/json-schema-ref-parser': 10.1.0 @@ -782,6 +784,23 @@ importers: '@types/node': 16.18.11 tsx: 3.12.2 + examples/stripe: + specifiers: + '@trigger.dev/sdk': workspace:* + '@trigger.dev/stripe': workspace:* + '@trigger.dev/tsconfig': workspace:* + '@types/node': '16' + tsx: ^3.12.0 + zod: ^3.20.2 + dependencies: + '@trigger.dev/sdk': link:../../packages/trigger-sdk + '@trigger.dev/stripe': link:../../generated-integrations/stripe + zod: 3.20.2 + devDependencies: + '@trigger.dev/tsconfig': link:../../config-packages/tsconfig + '@types/node': 16.18.11 + tsx: 3.12.3 + examples/typeform: specifiers: '@trigger.dev/sdk': workspace:* @@ -871,6 +890,25 @@ importers: rimraf: 3.0.2 tsup: 6.5.0 + generated-integrations/stripe: + specifiers: + '@trigger.dev/sdk': workspace:* + '@types/debug': ^4.1.7 + '@types/node': '16' + debug: ^4.3.4 + rimraf: ^3.0.2 + tsup: ^6.5.0 + zod: ^3.20.2 + dependencies: + debug: 4.3.4 + zod: 3.20.2 + devDependencies: + '@trigger.dev/sdk': link:../../packages/trigger-sdk + '@types/debug': 4.1.7 + '@types/node': 16.18.11 + rimraf: 3.0.2 + tsup: 6.6.3 + generated-integrations/typeform: specifiers: '@trigger.dev/sdk': workspace:* @@ -16940,6 +16978,14 @@ packages: acorn: 8.8.2 dev: true + /stripe/11.13.0: + resolution: {integrity: sha512-Jx0nDbdvRsTtDSX5OFQ+4rLmYIftoiOE9HAXWIgyhAz1QjRFI3UIiJ/kCyhkdJBoHu019O5Ya6EmQ5Zf635XDw==} + engines: {node: '>=12.*'} + dependencies: + '@types/node': 18.14.0 + qs: 6.11.0 + dev: false + /striptags/2.2.1: resolution: {integrity: sha512-vZTvmFP0IYu/zn8MXV6PrLb6VKbd9WGSEnlm4D5RNXS/+zYYlHrSfJgoBw1w56D6RJCr515er3BittRGQqihLA==} dev: false From a20f5ecaea3065af5322877402ec902a58579bc4 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 8 Mar 2023 23:21:13 +0000 Subject: [PATCH 100/113] Stripe event for checkout.session.completed is working --- .../integrations/stripe/webhooks/schemas.ts | 78 +- .../integrations/stripe/webhooks/webhooks.ts | 1 + .../docs/checkout-session-completed-event.mdx | 13 + .../stripe/schema-optimized.json | 1227 +++++++++-------- generated-integrations/stripe/src/index.ts | 2 +- generated-integrations/stripe/src/types.ts | 18 +- 6 files changed, 754 insertions(+), 585 deletions(-) diff --git a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts index 0b984b13c96..9eb52874e61 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/schemas.ts @@ -2,7 +2,77 @@ import { schemaFromRef } from "core/schemas/makeSchema"; import { JSONSchema } from "core/schemas/types"; import { spec } from "../schemas/spec"; -export const checkoutSessionCompletedSchema: JSONSchema = schemaFromRef( - "#/components/schemas/checkout.session", - spec -); +export const checkoutSessionCompletedSchema: JSONSchema = + wrapEventWithWebhookData( + "Checkout session completed", + schemaFromRef("#/components/schemas/checkout.session", spec) + ); + +function wrapEventWithWebhookData( + name: string, + eventSchema: JSONSchema +): JSONSchema { + const { components, ...schema } = eventSchema; + return { + $schema: "http://json-schema.org/draft-07/schema#", + title: name, + type: "object", + properties: { + id: { + type: "string", + }, + data: { + type: "object", + properties: { + object: { + ...schema, + }, + }, + required: ["object"], + }, + type: { + type: "string", + }, + object: { + type: "string", + const: "event", + }, + created: { + type: "number", + }, + request: { + type: "object", + properties: { + id: { + type: ["string", "null"], + }, + idempotency_key: { + type: ["string", "null"], + }, + }, + required: ["id", "idempotency_key"], + }, + livemode: { + type: "boolean", + }, + api_version: { + type: "string", + }, + pending_webhooks: { + type: "number", + }, + }, + required: [ + "id", + "data", + "type", + "object", + "created", + "request", + "livemode", + "api_version", + "pending_webhooks", + ], + components, + }; +} diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index 805dffe9252..9018f7771d5 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -1,5 +1,6 @@ import { makeWebhook } from "core/webhook"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; +import { JSONSchema } from "json-schema-to-typescript"; import Stripe from "stripe"; import { authentication } from "../authentication"; import { checkoutCompletedSuccess } from "./examples"; diff --git a/generated-integrations/stripe/docs/checkout-session-completed-event.mdx b/generated-integrations/stripe/docs/checkout-session-completed-event.mdx index d25dc5cfc8d..8ac344c54c8 100644 --- a/generated-integrations/stripe/docs/checkout-session-completed-event.mdx +++ b/generated-integrations/stripe/docs/checkout-session-completed-event.mdx @@ -14,6 +14,10 @@ description: A form response was submitted ## Response + Checkout Session Completed Output + + + A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a @@ -220,4 +224,13 @@ in `subscription` or `setup` mode. The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` This value is only present when the session is active. + + + + + + + + + \ No newline at end of file diff --git a/generated-integrations/stripe/schema-optimized.json b/generated-integrations/stripe/schema-optimized.json index 003f6669e9a..7603569e88f 100644 --- a/generated-integrations/stripe/schema-optimized.json +++ b/generated-integrations/stripe/schema-optimized.json @@ -2,616 +2,685 @@ "title": "StripeTypes", "anyOf": [ { - "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CheckoutSessionCompletedOutput", + "type": "object", "properties": { - "after_expiration": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration" - }, - { - "type": "null" - } - ], - "description": "When set, provides configuration for actions to take if this Checkout Session expires." - }, - "allow_promotion_codes": { - "description": "Enables user redeemable promotion codes.", - "type": [ - "boolean", - "null" - ] - }, - "amount_subtotal": { - "description": "Total of all items before discounts or taxes are applied.", - "type": [ - "integer", - "null" - ] - }, - "amount_total": { - "description": "Total of all items after discounts and taxes are applied.", - "type": [ - "integer", - "null" - ] - }, - "automatic_tax": { - "$ref": "#/components/schemas/payment_pages_checkout_session_automatic_tax" - }, - "billing_address_collection": { - "description": "Describes whether Checkout should collect the customer's billing address.", - "enum": [ - "auto", - "required", - null - ], - "type": [ - "string", - "null" - ] - }, - "cancel_url": { - "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", - "maxLength": 5000, - "type": [ - "string", - "null" - ] - }, - "client_reference_id": { - "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", - "maxLength": 5000, - "type": [ - "string", - "null" - ] - }, - "consent": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_consent" - }, - { - "type": "null" - } - ], - "description": "Results of `consent_collection` for this session." - }, - "consent_collection": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_consent_collection" - }, - { - "type": "null" - } - ], - "description": "When set, provides configuration for the Checkout Session to gather active consent from customers." - }, - "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).", - "type": [ - "string", - "null" - ] - }, - "custom_fields": { - "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", - "items": { - "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields" - }, - "type": "array" - }, - "custom_text": { - "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text" - }, - "customer": { - "anyOf": [ - { - "maxLength": 5000, - "type": "string" - }, - { - "$ref": "#/components/schemas/customer" - }, - { - "$ref": "#/components/schemas/deleted_customer" - }, - { - "type": "null" - } - ], - "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", - "x-expansionResources": { - "oneOf": [ - { - "$ref": "#/components/schemas/customer" - }, - { - "$ref": "#/components/schemas/deleted_customer" - } - ] - } - }, - "customer_creation": { - "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", - "enum": [ - "always", - "if_required", - null - ], - "type": [ - "string", - "null" - ] - }, - "customer_details": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" - }, - { - "type": "null" - } - ], - "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode." - }, - "customer_email": { - "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", - "maxLength": 5000, - "type": [ - "string", - "null" - ] - }, - "expires_at": { - "description": "The timestamp at which the Checkout Session will expire.", - "format": "unix-time", - "type": "integer" - }, "id": { - "description": "Unique identifier for the object.", - "maxLength": 5000, "type": "string" }, - "invoice": { - "anyOf": [ - { - "maxLength": 5000, - "type": "string" - }, - { - "$ref": "#/components/schemas/invoice" - }, - { - "type": "null" - } - ], - "description": "ID of the invoice created by the Checkout Session, if it exists.", - "x-expansionResources": { - "oneOf": [ - { - "$ref": "#/components/schemas/invoice" - } - ] - } - }, - "invoice_creation": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_creation" - }, - { - "type": "null" - } - ], - "description": "Details on the state of invoice creation for the Checkout Session." - }, - "line_items": { - "description": "The line items purchased by the customer.", + "data": { + "type": "object", "properties": { - "data": { - "description": "Details about each object.", - "items": { - "$ref": "#/components/schemas/item" - }, - "type": "array" - }, - "has_more": { - "description": "True if this list has another page of items after this one that can be fetched.", - "type": "boolean" - }, "object": { - "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", - "enum": [ - "list" + "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).", + "properties": { + "after_expiration": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for actions to take if this Checkout Session expires." + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": [ + "boolean", + "null" + ] + }, + "amount_subtotal": { + "description": "Total of all items before discounts or taxes are applied.", + "type": [ + "integer", + "null" + ] + }, + "amount_total": { + "description": "Total of all items after discounts and taxes are applied.", + "type": [ + "integer", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_pages_checkout_session_automatic_tax" + }, + "billing_address_collection": { + "description": "Describes whether Checkout should collect the customer's billing address.", + "enum": [ + "auto", + "required", + null + ], + "type": [ + "string", + "null" + ] + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "consent": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent" + }, + { + "type": "null" + } + ], + "description": "Results of `consent_collection` for this session." + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the Checkout Session to gather active consent from customers." + }, + "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).", + "type": [ + "string", + "null" + ] + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", + "enum": [ + "always", + "if_required", + null + ], + "type": [ + "string", + "null" + ] + }, + "customer_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" + }, + { + "type": "null" + } + ], + "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode." + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "expires_at": { + "description": "The timestamp at which the Checkout Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice created by the Checkout Session, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Details on the state of invoice creation for the Checkout Session." + }, + "line_items": { + "description": "The line items purchased by the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "mode": { + "description": "The mode of the Checkout Session.", + "enum": [ + "payment", + "setup", + "subscription" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "checkout.session" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_link": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_link" + }, + { + "type": "null" + } + ], + "description": "The ID of the Payment Link that created this Session.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_link" + } + ] + } + }, + "payment_method_collection": { + "description": "Configure whether a Checkout Session should collect a payment method.", + "enum": [ + "always", + "if_required", + null + ], + "type": [ + "string", + "null" + ] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/checkout_session_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession." + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_status": { + "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", + "enum": [ + "no_payment_required", + "paid", + "unpaid" + ], + "type": "string" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_phone_number_collection" + }, + "recovered_from": { + "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this Checkout Session." + }, + "shipping_options": { + "description": "The shipping rate options applied to this Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" + }, + "type": "array" + }, + "status": { + "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", + "enum": [ + "complete", + "expired", + "open", + null + ], + "type": [ + "string", + "null" + ] + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": [ + "auto", + "book", + "donate", + "pay", + null + ], + "type": [ + "string", + "null" + ] + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "success_url": { + "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id_collection" + }, + "total_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details" + }, + { + "type": "null" + } + ], + "description": "Tax and discount details for the computed total amount." + }, + "url": { + "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "automatic_tax", + "created", + "custom_fields", + "custom_text", + "expires_at", + "id", + "livemode", + "mode", + "object", + "payment_method_types", + "payment_status", + "shipping_options", + "success_url" ], - "type": "string" - }, - "url": { - "description": "The URL where this list can be accessed.", - "maxLength": 5000, - "type": "string" + "title": "Session", + "type": "object", + "x-expandableFields": [ + "after_expiration", + "automatic_tax", + "consent", + "consent_collection", + "custom_fields", + "custom_text", + "customer", + "customer_details", + "invoice", + "invoice_creation", + "line_items", + "payment_intent", + "payment_link", + "payment_method_options", + "phone_number_collection", + "setup_intent", + "shipping_address_collection", + "shipping_cost", + "shipping_details", + "shipping_options", + "subscription", + "tax_id_collection", + "total_details" + ], + "x-resourceId": "checkout.session" } }, "required": [ - "data", - "has_more", - "object", - "url" - ], - "title": "PaymentPagesCheckoutSessionListLineItems", - "type": "object", - "x-expandableFields": [ - "data" - ] - }, - "livemode": { - "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", - "type": "boolean" - }, - "locale": { - "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", - "enum": [ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-GB", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - null - ], - "type": [ - "string", - "null" - ], - "x-stripeBypassValidation": true - }, - "metadata": { - "additionalProperties": { - "maxLength": 500, - "type": "string" - }, - "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", - "type": [ - "object", - "null" + "object" ] }, - "mode": { - "description": "The mode of the Checkout Session.", - "enum": [ - "payment", - "setup", - "subscription" - ], + "type": { "type": "string" }, "object": { - "description": "String representing the object's type. Objects of the same type share the same value.", - "enum": [ - "checkout.session" - ], - "type": "string" + "type": "string", + "const": "event" }, - "payment_intent": { - "anyOf": [ - { - "maxLength": 5000, - "type": "string" - }, - { - "$ref": "#/components/schemas/payment_intent" - }, - { - "type": "null" - } - ], - "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.", - "x-expansionResources": { - "oneOf": [ - { - "$ref": "#/components/schemas/payment_intent" - } - ] - } - }, - "payment_link": { - "anyOf": [ - { - "maxLength": 5000, - "type": "string" - }, - { - "$ref": "#/components/schemas/payment_link" - }, - { - "type": "null" - } - ], - "description": "The ID of the Payment Link that created this Session.", - "x-expansionResources": { - "oneOf": [ - { - "$ref": "#/components/schemas/payment_link" - } - ] - } - }, - "payment_method_collection": { - "description": "Configure whether a Checkout Session should collect a payment method.", - "enum": [ - "always", - "if_required", - null - ], - "type": [ - "string", - "null" - ] + "created": { + "type": "number" }, - "payment_method_options": { - "anyOf": [ - { - "$ref": "#/components/schemas/checkout_session_payment_method_options" + "request": { + "type": "object", + "properties": { + "id": { + "type": [ + "string", + "null" + ] }, - { - "type": "null" + "idempotency_key": { + "type": [ + "string", + "null" + ] } - ], - "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession." - }, - "payment_method_types": { - "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", - "items": { - "maxLength": 5000, - "type": "string" }, - "type": "array" - }, - "payment_status": { - "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", - "enum": [ - "no_payment_required", - "paid", - "unpaid" - ], - "type": "string" - }, - "phone_number_collection": { - "$ref": "#/components/schemas/payment_pages_checkout_session_phone_number_collection" - }, - "recovered_from": { - "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", - "maxLength": 5000, - "type": [ - "string", - "null" - ] - }, - "setup_intent": { - "anyOf": [ - { - "maxLength": 5000, - "type": "string" - }, - { - "$ref": "#/components/schemas/setup_intent" - }, - { - "type": "null" - } - ], - "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.", - "x-expansionResources": { - "oneOf": [ - { - "$ref": "#/components/schemas/setup_intent" - } - ] - } - }, - "shipping_address_collection": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" - }, - { - "type": "null" - } - ], - "description": "When set, provides configuration for Checkout to collect a shipping address from a customer." - }, - "shipping_cost": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" - }, - { - "type": "null" - } - ], - "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate." - }, - "shipping_details": { - "anyOf": [ - { - "$ref": "#/components/schemas/shipping" - }, - { - "type": "null" - } - ], - "description": "Shipping information for this Checkout Session." - }, - "shipping_options": { - "description": "The shipping rate options applied to this Session.", - "items": { - "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" - }, - "type": "array" - }, - "status": { - "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", - "enum": [ - "complete", - "expired", - "open", - null - ], - "type": [ - "string", - "null" - ] - }, - "submit_type": { - "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", - "enum": [ - "auto", - "book", - "donate", - "pay", - null - ], - "type": [ - "string", - "null" + "required": [ + "id", + "idempotency_key" ] }, - "subscription": { - "anyOf": [ - { - "maxLength": 5000, - "type": "string" - }, - { - "$ref": "#/components/schemas/subscription" - }, - { - "type": "null" - } - ], - "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", - "x-expansionResources": { - "oneOf": [ - { - "$ref": "#/components/schemas/subscription" - } - ] - } + "livemode": { + "type": "boolean" }, - "success_url": { - "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", - "maxLength": 5000, + "api_version": { "type": "string" }, - "tax_id_collection": { - "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id_collection" - }, - "total_details": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_total_details" - }, - { - "type": "null" - } - ], - "description": "Tax and discount details for the computed total amount." - }, - "url": { - "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.", - "maxLength": 5000, - "type": [ - "string", - "null" - ] + "pending_webhooks": { + "type": "number" } }, "required": [ - "automatic_tax", - "created", - "custom_fields", - "custom_text", - "expires_at", "id", - "livemode", - "mode", + "data", + "type", "object", - "payment_method_types", - "payment_status", - "shipping_options", - "success_url" - ], - "title": "CheckoutSessionCompletedOutput", - "type": "object", - "x-expandableFields": [ - "after_expiration", - "automatic_tax", - "consent", - "consent_collection", - "custom_fields", - "custom_text", - "customer", - "customer_details", - "invoice", - "invoice_creation", - "line_items", - "payment_intent", - "payment_link", - "payment_method_options", - "phone_number_collection", - "setup_intent", - "shipping_address_collection", - "shipping_cost", - "shipping_details", - "shipping_options", - "subscription", - "tax_id_collection", - "total_details" + "created", + "request", + "livemode", + "api_version", + "pending_webhooks" ], - "x-resourceId": "checkout.session", "components": { "schemas": { "payment_pages_checkout_session_total_details": { diff --git a/generated-integrations/stripe/src/index.ts b/generated-integrations/stripe/src/index.ts index 28592ea050d..f7f8a6f79f3 100644 --- a/generated-integrations/stripe/src/index.ts +++ b/generated-integrations/stripe/src/index.ts @@ -3,7 +3,7 @@ import type { TriggerEvent } from "@trigger.dev/sdk"; import { z } from "zod"; import { CheckoutSessionCompletedOutput, Prettify } from "./types"; -const checkoutSessionCompletedEventSchema = z.object({ "after_expiration": z.union([z.any(), z.null()]).describe("When set, provides configuration for actions to take if this Checkout Session expires.").optional(), "allow_promotion_codes": z.union([z.boolean().describe("Enables user redeemable promotion codes."), z.null().describe("Enables user redeemable promotion codes.")]).describe("Enables user redeemable promotion codes.").optional(), "amount_subtotal": z.union([z.number().int().describe("Total of all items before discounts or taxes are applied."), z.null().describe("Total of all items before discounts or taxes are applied.")]).describe("Total of all items before discounts or taxes are applied.").optional(), "amount_total": z.union([z.number().int().describe("Total of all items after discounts and taxes are applied."), z.null().describe("Total of all items after discounts and taxes are applied.")]).describe("Total of all items after discounts and taxes are applied.").optional(), "automatic_tax": z.any(), "billing_address_collection": z.union([z.literal("auto"), z.literal("required"), z.literal(null)]).describe("Describes whether Checkout should collect the customer's billing address.").optional(), "cancel_url": z.union([z.string().max(5000).describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website."), z.null().describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.")]).describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.").optional(), "client_reference_id": z.union([z.string().max(5000).describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems."), z.null().describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.")]).describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.").optional(), "consent": z.union([z.any(), z.null()]).describe("Results of `consent_collection` for this session.").optional(), "consent_collection": z.union([z.any(), z.null()]).describe("When set, provides configuration for the Checkout Session to gather active consent from customers.").optional(), "created": z.number().int().describe("Time at which the object was created. Measured in seconds since the Unix epoch."), "currency": z.union([z.string().describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies)."), z.null().describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).")]).describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).").optional(), "custom_fields": z.array(z.any()).describe("Collect additional information from your customer using custom fields. Up to 2 fields are supported."), "custom_text": z.any(), "customer": z.union([z.string().max(5000), z.any(), z.any(), z.null()]).describe("The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.").optional(), "customer_creation": z.union([z.literal("always"), z.literal("if_required"), z.literal(null)]).describe("Configure whether a Checkout Session creates a Customer when the Checkout Session completes.").optional(), "customer_details": z.union([z.any(), z.null()]).describe("The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.").optional(), "customer_email": z.union([z.string().max(5000).describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute."), z.null().describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.")]).describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.").optional(), "expires_at": z.number().int().describe("The timestamp at which the Checkout Session will expire."), "id": z.string().max(5000).describe("Unique identifier for the object."), "invoice": z.union([z.string().max(5000), z.any(), z.null()]).describe("ID of the invoice created by the Checkout Session, if it exists.").optional(), "invoice_creation": z.union([z.any(), z.null()]).describe("Details on the state of invoice creation for the Checkout Session.").optional(), "line_items": z.object({ "data": z.array(z.any()).describe("Details about each object."), "has_more": z.boolean().describe("True if this list has another page of items after this one that can be fetched."), "object": z.enum(["list"]).describe("String representing the object's type. Objects of the same type share the same value. Always has the value `list`."), "url": z.string().max(5000).describe("The URL where this list can be accessed.") }).describe("The line items purchased by the customer.").optional(), "livemode": z.boolean().describe("Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode."), "locale": z.union([z.literal("auto"), z.literal("bg"), z.literal("cs"), z.literal("da"), z.literal("de"), z.literal("el"), z.literal("en"), z.literal("en-GB"), z.literal("es"), z.literal("es-419"), z.literal("et"), z.literal("fi"), z.literal("fil"), z.literal("fr"), z.literal("fr-CA"), z.literal("hr"), z.literal("hu"), z.literal("id"), z.literal("it"), z.literal("ja"), z.literal("ko"), z.literal("lt"), z.literal("lv"), z.literal("ms"), z.literal("mt"), z.literal("nb"), z.literal("nl"), z.literal("pl"), z.literal("pt"), z.literal("pt-BR"), z.literal("ro"), z.literal("ru"), z.literal("sk"), z.literal("sl"), z.literal("sv"), z.literal("th"), z.literal("tr"), z.literal("vi"), z.literal("zh"), z.literal("zh-HK"), z.literal("zh-TW"), z.literal(null)]).describe("The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.").optional(), "metadata": z.union([z.record(z.string().max(500)).describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format."), z.null().describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.")]).describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.").optional(), "mode": z.enum(["payment", "setup", "subscription"]).describe("The mode of the Checkout Session."), "object": z.enum(["checkout.session"]).describe("String representing the object's type. Objects of the same type share the same value."), "payment_intent": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the PaymentIntent for Checkout Sessions in `payment` mode.").optional(), "payment_link": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the Payment Link that created this Session.").optional(), "payment_method_collection": z.union([z.literal("always"), z.literal("if_required"), z.literal(null)]).describe("Configure whether a Checkout Session should collect a payment method.").optional(), "payment_method_options": z.union([z.any(), z.null()]).describe("Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.").optional(), "payment_method_types": z.array(z.string().max(5000)).describe("A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept."), "payment_status": z.enum(["no_payment_required", "paid", "unpaid"]).describe("The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order."), "phone_number_collection": z.any().optional(), "recovered_from": z.union([z.string().max(5000).describe("The ID of the original expired Checkout Session that triggered the recovery flow."), z.null().describe("The ID of the original expired Checkout Session that triggered the recovery flow.")]).describe("The ID of the original expired Checkout Session that triggered the recovery flow.").optional(), "setup_intent": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the SetupIntent for Checkout Sessions in `setup` mode.").optional(), "shipping_address_collection": z.union([z.any(), z.null()]).describe("When set, provides configuration for Checkout to collect a shipping address from a customer.").optional(), "shipping_cost": z.union([z.any(), z.null()]).describe("The details of the customer cost of shipping, including the customer chosen ShippingRate.").optional(), "shipping_details": z.union([z.any(), z.null()]).describe("Shipping information for this Checkout Session.").optional(), "shipping_options": z.array(z.any()).describe("The shipping rate options applied to this Session."), "status": z.union([z.literal("complete"), z.literal("expired"), z.literal("open"), z.literal(null)]).describe("The status of the Checkout Session, one of `open`, `complete`, or `expired`.").optional(), "submit_type": z.union([z.literal("auto"), z.literal("book"), z.literal("donate"), z.literal("pay"), z.literal(null)]).describe("Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.").optional(), "subscription": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the subscription for Checkout Sessions in `subscription` mode.").optional(), "success_url": z.string().max(5000).describe("The URL the customer will be directed to after the payment or\nsubscription creation is successful."), "tax_id_collection": z.any().optional(), "total_details": z.union([z.any(), z.null()]).describe("Tax and discount details for the computed total amount.").optional(), "url": z.union([z.string().max(5000).describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active."), z.null().describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.")]).describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.").optional() }).describe("A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).") +const checkoutSessionCompletedEventSchema = z.object({ "id": z.string(), "data": z.object({ "object": z.object({ "after_expiration": z.union([z.any(), z.null()]).describe("When set, provides configuration for actions to take if this Checkout Session expires.").optional(), "allow_promotion_codes": z.union([z.boolean().describe("Enables user redeemable promotion codes."), z.null().describe("Enables user redeemable promotion codes.")]).describe("Enables user redeemable promotion codes.").optional(), "amount_subtotal": z.union([z.number().int().describe("Total of all items before discounts or taxes are applied."), z.null().describe("Total of all items before discounts or taxes are applied.")]).describe("Total of all items before discounts or taxes are applied.").optional(), "amount_total": z.union([z.number().int().describe("Total of all items after discounts and taxes are applied."), z.null().describe("Total of all items after discounts and taxes are applied.")]).describe("Total of all items after discounts and taxes are applied.").optional(), "automatic_tax": z.any(), "billing_address_collection": z.union([z.literal("auto"), z.literal("required"), z.literal(null)]).describe("Describes whether Checkout should collect the customer's billing address.").optional(), "cancel_url": z.union([z.string().max(5000).describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website."), z.null().describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.")]).describe("If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.").optional(), "client_reference_id": z.union([z.string().max(5000).describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems."), z.null().describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.")]).describe("A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.").optional(), "consent": z.union([z.any(), z.null()]).describe("Results of `consent_collection` for this session.").optional(), "consent_collection": z.union([z.any(), z.null()]).describe("When set, provides configuration for the Checkout Session to gather active consent from customers.").optional(), "created": z.number().int().describe("Time at which the object was created. Measured in seconds since the Unix epoch."), "currency": z.union([z.string().describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies)."), z.null().describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).")]).describe("Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).").optional(), "custom_fields": z.array(z.any()).describe("Collect additional information from your customer using custom fields. Up to 2 fields are supported."), "custom_text": z.any(), "customer": z.union([z.string().max(5000), z.any(), z.any(), z.null()]).describe("The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.").optional(), "customer_creation": z.union([z.literal("always"), z.literal("if_required"), z.literal(null)]).describe("Configure whether a Checkout Session creates a Customer when the Checkout Session completes.").optional(), "customer_details": z.union([z.any(), z.null()]).describe("The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.").optional(), "customer_email": z.union([z.string().max(5000).describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute."), z.null().describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.")]).describe("If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.").optional(), "expires_at": z.number().int().describe("The timestamp at which the Checkout Session will expire."), "id": z.string().max(5000).describe("Unique identifier for the object."), "invoice": z.union([z.string().max(5000), z.any(), z.null()]).describe("ID of the invoice created by the Checkout Session, if it exists.").optional(), "invoice_creation": z.union([z.any(), z.null()]).describe("Details on the state of invoice creation for the Checkout Session.").optional(), "line_items": z.object({ "data": z.array(z.any()).describe("Details about each object."), "has_more": z.boolean().describe("True if this list has another page of items after this one that can be fetched."), "object": z.enum(["list"]).describe("String representing the object's type. Objects of the same type share the same value. Always has the value `list`."), "url": z.string().max(5000).describe("The URL where this list can be accessed.") }).describe("The line items purchased by the customer.").optional(), "livemode": z.boolean().describe("Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode."), "locale": z.union([z.literal("auto"), z.literal("bg"), z.literal("cs"), z.literal("da"), z.literal("de"), z.literal("el"), z.literal("en"), z.literal("en-GB"), z.literal("es"), z.literal("es-419"), z.literal("et"), z.literal("fi"), z.literal("fil"), z.literal("fr"), z.literal("fr-CA"), z.literal("hr"), z.literal("hu"), z.literal("id"), z.literal("it"), z.literal("ja"), z.literal("ko"), z.literal("lt"), z.literal("lv"), z.literal("ms"), z.literal("mt"), z.literal("nb"), z.literal("nl"), z.literal("pl"), z.literal("pt"), z.literal("pt-BR"), z.literal("ro"), z.literal("ru"), z.literal("sk"), z.literal("sl"), z.literal("sv"), z.literal("th"), z.literal("tr"), z.literal("vi"), z.literal("zh"), z.literal("zh-HK"), z.literal("zh-TW"), z.literal(null)]).describe("The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.").optional(), "metadata": z.union([z.record(z.string().max(500)).describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format."), z.null().describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.")]).describe("Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.").optional(), "mode": z.enum(["payment", "setup", "subscription"]).describe("The mode of the Checkout Session."), "object": z.enum(["checkout.session"]).describe("String representing the object's type. Objects of the same type share the same value."), "payment_intent": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the PaymentIntent for Checkout Sessions in `payment` mode.").optional(), "payment_link": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the Payment Link that created this Session.").optional(), "payment_method_collection": z.union([z.literal("always"), z.literal("if_required"), z.literal(null)]).describe("Configure whether a Checkout Session should collect a payment method.").optional(), "payment_method_options": z.union([z.any(), z.null()]).describe("Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.").optional(), "payment_method_types": z.array(z.string().max(5000)).describe("A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept."), "payment_status": z.enum(["no_payment_required", "paid", "unpaid"]).describe("The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order."), "phone_number_collection": z.any().optional(), "recovered_from": z.union([z.string().max(5000).describe("The ID of the original expired Checkout Session that triggered the recovery flow."), z.null().describe("The ID of the original expired Checkout Session that triggered the recovery flow.")]).describe("The ID of the original expired Checkout Session that triggered the recovery flow.").optional(), "setup_intent": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the SetupIntent for Checkout Sessions in `setup` mode.").optional(), "shipping_address_collection": z.union([z.any(), z.null()]).describe("When set, provides configuration for Checkout to collect a shipping address from a customer.").optional(), "shipping_cost": z.union([z.any(), z.null()]).describe("The details of the customer cost of shipping, including the customer chosen ShippingRate.").optional(), "shipping_details": z.union([z.any(), z.null()]).describe("Shipping information for this Checkout Session.").optional(), "shipping_options": z.array(z.any()).describe("The shipping rate options applied to this Session."), "status": z.union([z.literal("complete"), z.literal("expired"), z.literal("open"), z.literal(null)]).describe("The status of the Checkout Session, one of `open`, `complete`, or `expired`.").optional(), "submit_type": z.union([z.literal("auto"), z.literal("book"), z.literal("donate"), z.literal("pay"), z.literal(null)]).describe("Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.").optional(), "subscription": z.union([z.string().max(5000), z.any(), z.null()]).describe("The ID of the subscription for Checkout Sessions in `subscription` mode.").optional(), "success_url": z.string().max(5000).describe("The URL the customer will be directed to after the payment or\nsubscription creation is successful."), "tax_id_collection": z.any().optional(), "total_details": z.union([z.any(), z.null()]).describe("Tax and discount details for the computed total amount.").optional(), "url": z.union([z.string().max(5000).describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active."), z.null().describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.")]).describe("The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.").optional() }).describe("A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).") }), "type": z.string(), "object": z.literal("event"), "created": z.number(), "request": z.object({ "id": z.union([z.string(), z.null()]), "idempotency_key": z.union([z.string(), z.null()]) }), "livemode": z.boolean(), "api_version": z.string(), "pending_webhooks": z.number() }) /** A form response was submitted */ function checkoutSessionCompletedEvent( diff --git a/generated-integrations/stripe/src/types.ts b/generated-integrations/stripe/src/types.ts index c31887fde59..3dc3408a8a9 100644 --- a/generated-integrations/stripe/src/types.ts +++ b/generated-integrations/stripe/src/types.ts @@ -44,6 +44,22 @@ export type RefundList = ({ } | null) export type Polymorphic1 = (BankAccount | Card | Source) +export interface CheckoutSessionCompletedOutput { + id: string + data: { + object: Session + } + type: string + object: "event" + created: number + request: { + id: (string | null) + idempotency_key: (string | null) + } + livemode: boolean + api_version: string + pending_webhooks: number +} /** * A Checkout Session represents your customer's session as they pay for * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) @@ -60,7 +76,7 @@ export type Polymorphic1 = (BankAccount | Card | Source) * * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ -export interface CheckoutSessionCompletedOutput { +export interface Session { /** * When set, provides configuration for actions to take if this Checkout Session expires. */ From c4d5ec9f7e1b24ac493fbe84c38bc60cffb31858 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 9 Mar 2023 11:02:48 +0000 Subject: [PATCH 101/113] Moved some Stripe folders to keep things tidier as we do more events --- .../src/core/schemas/makeSchema.test.ts | 4 +- .../stripe/tests/webhooks.test.ts | 10 ++-- .../checkoutSession.examples.ts} | 0 .../stripe/webhooks/events/checkoutSession.ts | 48 +++++++++++++++++++ .../{schemas.ts => events/utilities.ts} | 12 ++--- .../integrations/stripe/webhooks/webhooks.ts | 43 +---------------- 6 files changed, 59 insertions(+), 58 deletions(-) rename apps/integrations/src/integrations/stripe/webhooks/{examples.ts => events/checkoutSession.examples.ts} (100%) create mode 100644 apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts rename apps/integrations/src/integrations/stripe/webhooks/{schemas.ts => events/utilities.ts} (80%) diff --git a/apps/integrations/src/core/schemas/makeSchema.test.ts b/apps/integrations/src/core/schemas/makeSchema.test.ts index 32109c3412b..d20afeb5ee5 100644 --- a/apps/integrations/src/core/schemas/makeSchema.test.ts +++ b/apps/integrations/src/core/schemas/makeSchema.test.ts @@ -1,7 +1,7 @@ -import { checkoutSessionCompletedSchema } from "integrations/stripe/webhooks/schemas"; import { describe, expect, test } from "vitest"; import { schemaFromRef } from "./makeSchema"; import { promises as fs } from "fs"; +import { checkoutSessionEventSchema } from "integrations/stripe/webhooks/events/checkoutSession"; describe("make schema", async () => { test("schemaFromRef", async () => { @@ -62,7 +62,7 @@ describe("make schema", async () => { }); test("schemaFromRef", async () => { - const schema = checkoutSessionCompletedSchema; + const schema = checkoutSessionEventSchema; await fs.writeFile( "/Users/Matt/Downloads/schemaFromRef.json", JSON.stringify(schema, null, 2) diff --git a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts index bbcd74efb21..0a0a491131d 100644 --- a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts @@ -1,7 +1,8 @@ import { validate } from "core/schemas/validate"; import { startNock, stopNock } from "testing/nock"; import { describe, expect, test } from "vitest"; -import { webhooks, events } from "../webhooks/webhooks"; +import { checkoutCompleted } from "../webhooks/events/checkoutSession"; +import { webhooks } from "../webhooks/webhooks"; const authToken = () => process.env.STRIPE_API_KEY ?? ""; @@ -179,12 +180,9 @@ describe("stripe.webhooks", async () => { describe("schemas", async () => { test("check 1", async () => { - const data = events.checkoutCompleted.examples[0]; + const data = checkoutCompleted.examples[0]; - const validationResult = await validate( - data, - events.checkoutCompleted.schema - ); + const validationResult = await validate(data, checkoutCompleted.schema); expect(validationResult).toEqual({ success: true, }); diff --git a/apps/integrations/src/integrations/stripe/webhooks/examples.ts b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.examples.ts similarity index 100% rename from apps/integrations/src/integrations/stripe/webhooks/examples.ts rename to apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.examples.ts diff --git a/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts new file mode 100644 index 00000000000..8b6af5bcab5 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts @@ -0,0 +1,48 @@ +import { schemaFromRef } from "core/schemas/makeSchema"; +import { JSONSchema } from "core/schemas/types"; +import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; +import { spec } from "integrations/stripe/schemas/spec"; +import { checkoutCompletedSuccess } from "./checkoutSession.examples"; +import { wrapEventWithWebhookData } from "./utilities"; + +export const checkoutSessionEventSchema: JSONSchema = wrapEventWithWebhookData( + "Checkout session", + schemaFromRef("#/components/schemas/checkout.session", spec) +); + +export const checkoutCompleted: WebhookEvent = { + name: "checkout.session.completed", + metadata: { + title: "Checkout session completed", + description: "A checkout session was completed", + tags: ["checkout"], + }, + schema: checkoutSessionEventSchema, + instructions: (data) => + `Perform a Stripe checkout session or use the [Stripe CLI](https://stripe.com/docs/stripe-cli) to test this webhook.`, + examples: [checkoutCompletedSuccess], + key: "checkout.session.completed", + displayProperties: (data) => ({ + title: `New Stripe checkout`, + }), + matches: (data) => data.request.body.type === "checkout.session.completed", + process: async (data: WebhookReceiveRequest) => [ + { + event: "checkout.session.completed", + displayProperties: { + title: `New Stripe checkout`, + properties: [ + { + key: "amount", + value: data.request.body.amount_total, + }, + { + key: "currency", + value: data.request.body.currency, + }, + ], + }, + payload: data.request.body, + }, + ], +}; diff --git a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts b/apps/integrations/src/integrations/stripe/webhooks/events/utilities.ts similarity index 80% rename from apps/integrations/src/integrations/stripe/webhooks/schemas.ts rename to apps/integrations/src/integrations/stripe/webhooks/events/utilities.ts index 9eb52874e61..c7e7a7261db 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/schemas.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/events/utilities.ts @@ -1,14 +1,10 @@ -import { schemaFromRef } from "core/schemas/makeSchema"; import { JSONSchema } from "core/schemas/types"; -import { spec } from "../schemas/spec"; -export const checkoutSessionCompletedSchema: JSONSchema = - wrapEventWithWebhookData( - "Checkout session completed", - schemaFromRef("#/components/schemas/checkout.session", spec) - ); +export function instructions(eventName: string): string { + return `Perform a Stripe ${eventName} or use the [Stripe CLI](https://stripe.com/docs/stripe-cli) to test this webhook.`; +} -function wrapEventWithWebhookData( +export function wrapEventWithWebhookData( name: string, eventSchema: JSONSchema ): JSONSchema { diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index 9018f7771d5..eb32833d832 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -1,51 +1,11 @@ import { makeWebhook } from "core/webhook"; -import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; -import { JSONSchema } from "json-schema-to-typescript"; import Stripe from "stripe"; import { authentication } from "../authentication"; -import { checkoutCompletedSuccess } from "./examples"; -import { checkoutSessionCompletedSchema } from "./schemas"; +import { checkoutCompleted } from "./events/checkoutSession"; import { webhookSpec } from "./specs"; const baseUrl = "https://api.stripe.com/v1"; -export const checkoutCompleted: WebhookEvent = { - name: "checkout.session.completed", - metadata: { - title: "Checkout session completed", - description: "A form response was submitted", - tags: ["checkout"], - }, - schema: checkoutSessionCompletedSchema, - instructions: (data) => - `Perform a Stripe checkout session or use the [Stripe CLI](https://stripe.com/docs/stripe-cli) to test this webhook.`, - examples: [checkoutCompletedSuccess], - key: "checkout.session.completed", - displayProperties: (data) => ({ - title: `New Stripe checkout`, - }), - matches: (data) => data.request.body.type === "checkout.session.completed", - process: async (data: WebhookReceiveRequest) => [ - { - event: "checkout.session.completed", - displayProperties: { - title: `New Stripe checkout`, - properties: [ - { - key: "amount", - value: data.request.body.amount_total, - }, - { - key: "currency", - value: data.request.body.currency, - }, - ], - }, - payload: data.request.body, - }, - ], -}; - const webhook = makeWebhook({ data: { baseUrl, @@ -113,4 +73,3 @@ const webhook = makeWebhook({ }); export const webhooks = { webhook }; -export const events = { checkoutCompleted }; From fe193bec0f236927681792fb1e7d161289b46d75 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 9 Mar 2023 12:54:52 +0000 Subject: [PATCH 102/113] Removed commented out tests --- .../stripe/tests/webhooks.test.ts | 97 ------------------- 1 file changed, 97 deletions(-) diff --git a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts index 0a0a491131d..40a3420ec48 100644 --- a/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts +++ b/apps/integrations/src/integrations/stripe/tests/webhooks.test.ts @@ -81,103 +81,6 @@ describe("stripe.webhooks", async () => { stopNock(nockDone); }); - // test("receiving (correct signature)", async () => { - // const accessToken = authToken(); - - // //explicitly pass in a payload (this is hardcoded, not from a request) - // try { - // const result = await webhooks.webhook.receive({ - // credentials: { - // type: "api_key", - // name: "apiKey", - // api_key: accessToken, - // scopes: ["webhooks:write"], - // }, - // secret: "123456", - // subscriptionData: { - // id: "01GTH8BG8S4KK1XW38SNDN1SRV", - // form_id: "NclFXN1d", - // tag: "myTag", - // url: "https://example.com", - // enabled: true, - // verify_ssl: true, - // secret: "123456", - // created_at: "2023-03-02T13:32:00.154368Z", - // updated_at: "2023-03-02T15:08:01.697884Z", - // }, - // request: { - // method: "POST", - // searchParams: new URLSearchParams(), - // headers: { - // "content-type": "application/json", - // "typeform-signature": - // "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", - // }, - // body: events.checkoutCompleted.examples[0], - // rawBody: Buffer.from(JSON.stringify(events.checkoutCompleted.examples[0])), - // }, - // }); - - // expect(result).toMatchInlineSnapshot(); - // } catch (e) { - // console.error(e); - // expect(true).toBe(false); - // } - // }); - - // test("receiving (bad signature)", async () => { - // const accessToken = authToken(); - - // //explicitly pass in a payload (this is hardcoded, not from a request) - // try { - // const result = await webhooks.formResponse.receive({ - // credentials: { - // type: "api_key", - // name: "accessToken", - // api_key: accessToken, - // scopes: ["webhooks:write"], - // }, - // secret: "123", - // subscriptionData: { - // id: "01GTH8BG8S4KK1XW38SNDN1SRV", - // form_id: "NclFXN1d", - // tag: "myTag", - // url: "https://example.com", - // enabled: true, - // verify_ssl: true, - // secret: "123456", - // created_at: "2023-03-02T13:32:00.154368Z", - // updated_at: "2023-03-02T15:08:01.697884Z", - // }, - // request: { - // method: "POST", - // searchParams: new URLSearchParams(), - // headers: { - // "content-type": "application/json", - // "typeform-signature": - // "sha256=VsvwNrh0fT5VWF+05H3azXZXJyFkhHTtONMxIVm6PZ4=", - // }, - // body: events.formResponse.examples[0], - // rawBody: Buffer.from(JSON.stringify(events.formResponse.examples[0])), - // }, - // }); - - // expect(result).toMatchInlineSnapshot(` - // { - // "error": "Invalid signature", - // "response": { - // "headers": {}, - // "status": 401, - // }, - // "success": false, - // } - // `); - // } catch (e) { - // console.error(e); - // expect(true).toBe(false); - // } - // }); - describe("schemas", async () => { test("check 1", async () => { const data = checkoutCompleted.examples[0]; From 30fd3088e33d26354ae88d85097ab0977ecfa8a2 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 9 Mar 2023 12:55:10 +0000 Subject: [PATCH 103/113] Added more Stripe events --- .../stripe/webhooks/events/checkoutSession.ts | 120 +++++++++++++++++- .../stripe/webhooks/events/paymentIntent.ts | 48 +++++++ .../integrations/stripe/webhooks/webhooks.ts | 16 ++- 3 files changed, 178 insertions(+), 6 deletions(-) create mode 100644 apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts diff --git a/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts index 8b6af5bcab5..422ad92ee98 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts @@ -3,7 +3,7 @@ import { JSONSchema } from "core/schemas/types"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; import { spec } from "integrations/stripe/schemas/spec"; import { checkoutCompletedSuccess } from "./checkoutSession.examples"; -import { wrapEventWithWebhookData } from "./utilities"; +import { instructions, wrapEventWithWebhookData } from "./utilities"; export const checkoutSessionEventSchema: JSONSchema = wrapEventWithWebhookData( "Checkout session", @@ -18,12 +18,11 @@ export const checkoutCompleted: WebhookEvent = { tags: ["checkout"], }, schema: checkoutSessionEventSchema, - instructions: (data) => - `Perform a Stripe checkout session or use the [Stripe CLI](https://stripe.com/docs/stripe-cli) to test this webhook.`, + instructions: (data) => instructions("checkout session complete"), examples: [checkoutCompletedSuccess], key: "checkout.session.completed", displayProperties: (data) => ({ - title: `New Stripe checkout`, + title: `Stripe checkout completed`, }), matches: (data) => data.request.body.type === "checkout.session.completed", process: async (data: WebhookReceiveRequest) => [ @@ -46,3 +45,116 @@ export const checkoutCompleted: WebhookEvent = { }, ], }; + +export const checkoutExpired: WebhookEvent = { + name: "checkout.session.expired", + metadata: { + title: "Checkout session expired", + description: "A checkout session expired", + tags: ["checkout"], + }, + schema: checkoutSessionEventSchema, + instructions: (data) => instructions("checkout session expired"), + examples: [checkoutCompletedSuccess], + key: "checkout.session.expired", + displayProperties: (data) => ({ + title: `Stripe checkout session expired`, + }), + matches: (data) => data.request.body.type === "checkout.session.expired", + process: async (data: WebhookReceiveRequest) => [ + { + event: "checkout.session.expired", + displayProperties: { + title: `Stripe checkout session expired`, + properties: [ + { + key: "amount", + value: data.request.body.amount_total, + }, + { + key: "currency", + value: data.request.body.currency, + }, + ], + }, + payload: data.request.body, + }, + ], +}; + +export const checkoutAsyncPaymentFailed: WebhookEvent = { + name: "checkout.session.async_payment_failed", + metadata: { + title: "Checkout session payment failed", + description: + "Occurs when a payment intent using a delayed payment method fails.", + tags: ["checkout"], + }, + schema: checkoutSessionEventSchema, + instructions: (data) => instructions("checkout session async payment failed"), + examples: [checkoutCompletedSuccess], + key: "checkout.session.async_payment_failed", + displayProperties: (data) => ({ + title: `Stripe checkout async payment failed`, + }), + matches: (data) => + data.request.body.type === "checkout.session.async_payment_failed", + process: async (data: WebhookReceiveRequest) => [ + { + event: "checkout.session.async_payment_failed", + displayProperties: { + title: `Stripe checkout async payment failed`, + properties: [ + { + key: "amount", + value: data.request.body.amount_total, + }, + { + key: "currency", + value: data.request.body.currency, + }, + ], + }, + payload: data.request.body, + }, + ], +}; + +export const checkoutAsyncPaymentSucceeded: WebhookEvent = { + name: "checkout.session.async_payment_succeeded", + metadata: { + title: "Checkout session async payment succeeded", + description: + "Occurs when a payment intent using a delayed payment method finally succeeds.", + tags: ["checkout"], + }, + schema: checkoutSessionEventSchema, + instructions: (data) => + instructions("checkout session async payment succeeded"), + examples: [checkoutCompletedSuccess], + key: "checkout.session.async_payment_succeeded", + displayProperties: (data) => ({ + title: `Stripe checkout async payment succeeded`, + }), + matches: (data) => + data.request.body.type === "checkout.session.async_payment_succeeded", + process: async (data: WebhookReceiveRequest) => [ + { + event: "checkout.session.async_payment_succeeded", + displayProperties: { + title: `Stripe checkout async payment succeeded`, + properties: [ + { + key: "amount", + value: data.request.body.amount_total, + }, + { + key: "currency", + value: data.request.body.currency, + }, + ], + }, + payload: data.request.body, + }, + ], +}; diff --git a/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts b/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts new file mode 100644 index 00000000000..81b1b8c532c --- /dev/null +++ b/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts @@ -0,0 +1,48 @@ +import { schemaFromRef } from "core/schemas/makeSchema"; +import { JSONSchema } from "core/schemas/types"; +import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; +import { spec } from "integrations/stripe/schemas/spec"; +import { checkoutCompletedSuccess } from "./checkoutSession.examples"; +import { instructions, wrapEventWithWebhookData } from "./utilities"; + +export const paymentIntentEventSchema: JSONSchema = wrapEventWithWebhookData( + "Payment intent", + schemaFromRef("#/components/schemas/payment_intent", spec) +); + +export const paymentIntentSucceeded: WebhookEvent = { + name: "payment_intent.succeeded", + metadata: { + title: "Payment intent succeeded", + description: + "Occurs when a PaymentIntent has successfully completed payment.", + tags: ["payment intent"], + }, + schema: paymentIntentEventSchema, + instructions: (data) => instructions("payment intent succeeded"), + examples: [checkoutCompletedSuccess], + key: "payment_intent.succeeded", + displayProperties: (data) => ({ + title: `Stripe payment intent succeeded`, + }), + matches: (data) => data.request.body.type === "payment_intent.succeeded", + process: async (data: WebhookReceiveRequest) => [ + { + event: "payment_intent.succeeded", + displayProperties: { + title: `Payment intent succeeded`, + properties: [ + { + key: "amount", + value: data.request.body.amount, + }, + { + key: "currency", + value: data.request.body.currency, + }, + ], + }, + payload: data.request.body, + }, + ], +}; diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index eb32833d832..dc200a1064f 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -1,7 +1,13 @@ import { makeWebhook } from "core/webhook"; import Stripe from "stripe"; import { authentication } from "../authentication"; -import { checkoutCompleted } from "./events/checkoutSession"; +import { + checkoutAsyncPaymentFailed, + checkoutAsyncPaymentSucceeded, + checkoutCompleted, + checkoutExpired, +} from "./events/checkoutSession"; +import { paymentIntentSucceeded } from "./events/paymentIntent"; import { webhookSpec } from "./specs"; const baseUrl = "https://api.stripe.com/v1"; @@ -12,7 +18,13 @@ const webhook = makeWebhook({ spec: webhookSpec, authentication, }, - events: [checkoutCompleted], + events: [ + checkoutCompleted, + checkoutExpired, + checkoutAsyncPaymentSucceeded, + checkoutAsyncPaymentFailed, + paymentIntentSucceeded, + ], subscription: { type: "automatic", requiresSecret: true, From b6563984eb977b1096a9847e33265553e0b48545 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 9 Mar 2023 14:16:18 +0000 Subject: [PATCH 104/113] Added more examples of Stripe --- examples/stripe/src/index.ts | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/examples/stripe/src/index.ts b/examples/stripe/src/index.ts index a9e64560702..bf6d3231a58 100644 --- a/examples/stripe/src/index.ts +++ b/examples/stripe/src/index.ts @@ -2,7 +2,7 @@ import { Trigger } from "@trigger.dev/sdk"; import { events } from "@trigger.dev/stripe"; new Trigger({ - id: "stripe-checout.session.completed", + id: "stripe-checkout.session.completed", name: "Stripe checkout session completed", apiKey: "trigger_dev_zC25mKNn6c0q", endpoint: "ws://localhost:8889/ws", @@ -12,3 +12,39 @@ new Trigger({ return {}; }, }).listen(); + +new Trigger({ + id: "stripe-checkout.session.expired", + name: "Stripe checkout session expired", + apiKey: "trigger_dev_zC25mKNn6c0q", + endpoint: "ws://localhost:8889/ws", + logLevel: "debug", + on: events.checkoutSessionExpiredEvent(), + run: async (event, ctx) => { + return {}; + }, +}).listen(); + +new Trigger({ + id: "stripe-checkout.session.asyncpaymentfailed", + name: "Stripe checkout session async payment failed", + apiKey: "trigger_dev_zC25mKNn6c0q", + endpoint: "ws://localhost:8889/ws", + logLevel: "debug", + on: events.checkoutSessionAsyncPaymentFailedEvent(), + run: async (event, ctx) => { + return {}; + }, +}).listen(); + +new Trigger({ + id: "stripe-checkout.session.asyncpaymentsucceeded", + name: "Stripe checkout session async payment succeeded", + apiKey: "trigger_dev_zC25mKNn6c0q", + endpoint: "ws://localhost:8889/ws", + logLevel: "debug", + on: events.checkoutSessionAsyncPaymentSucceededEvent(), + run: async (event, ctx) => { + return {}; + }, +}).listen(); From 771b77c49c996d0cbeab066badd33e69d45b1efb Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 10:56:42 +0000 Subject: [PATCH 105/113] Use refs and a centralized schema for an integration with definitions --- apps/integrations/package.json | 5 +- .../src/core/action/makeAction.ts | 2 +- apps/integrations/src/core/action/types.ts | 4 +- apps/integrations/src/core/common/pointer.ts | 6 +- .../src/core/endpoint/endpoint.ts | 2 +- apps/integrations/src/core/endpoint/types.ts | 9 +- apps/integrations/src/core/request/types.ts | 1 + .../src/core/schemas/integrationSchema.ts | 5 + .../src/core/schemas/makeSchema.test.ts | 72 - .../src/core/schemas/schemaRefWalker.ts | 10 +- apps/integrations/src/core/schemas/types.ts | 12 +- apps/integrations/src/core/service/types.ts | 2 + apps/integrations/src/core/webhook/index.ts | 6 +- apps/integrations/src/core/webhook/types.ts | 6 +- .../src/generators/combineSchemas.test.ts | 149 +- .../src/generators/combineSchemas.ts | 99 +- .../src/integrations/stripe/index.ts | 3 + .../open-api-3.0.0.json} | 0 .../schemas/originals/open-api-3.0.0_3.1.json | 126796 +++++++++++++++ .../src/integrations/stripe/schemas/spec.json | 35849 ++++ .../src/integrations/stripe/schemas/spec.ts | 5 - .../stripe/webhooks/events/checkoutSession.ts | 18 +- .../stripe/webhooks/events/paymentIntent.ts | 12 +- .../src/integrations/stripe/webhooks/specs.ts | 1 - .../integrations/stripe/webhooks/webhooks.ts | 2 +- .../integrations/typeform/webhooks/specs.ts | 1 - .../src/tools/schemas/openapi-3-to-3.1.ts | 30 + .../schemas/typescript-to-json-schema.ts | 1 - .../src/trigger/sdk/generateService.ts | 140 +- apps/integrations/src/trigger/sdk/types.ts | 6 +- ...out-session-async-payment-failed-event.mdx | 12 + ...-session-async-payment-succeeded-event.mdx | 12 + .../docs/checkout-session-expired-event.mdx | 12 + .../docs/payment-intent-succeeded-event.mdx | 12 + pnpm-lock.yaml | 5 +- 35 files changed, 162951 insertions(+), 356 deletions(-) create mode 100644 apps/integrations/src/core/schemas/integrationSchema.ts delete mode 100644 apps/integrations/src/core/schemas/makeSchema.test.ts rename apps/integrations/src/integrations/stripe/schemas/{spec3.json => originals/open-api-3.0.0.json} (100%) create mode 100644 apps/integrations/src/integrations/stripe/schemas/originals/open-api-3.0.0_3.1.json create mode 100644 apps/integrations/src/integrations/stripe/schemas/spec.json delete mode 100644 apps/integrations/src/integrations/stripe/schemas/spec.ts create mode 100644 apps/integrations/src/tools/schemas/openapi-3-to-3.1.ts create mode 100644 generated-integrations/stripe/docs/checkout-session-async-payment-failed-event.mdx create mode 100644 generated-integrations/stripe/docs/checkout-session-async-payment-succeeded-event.mdx create mode 100644 generated-integrations/stripe/docs/checkout-session-expired-event.mdx create mode 100644 generated-integrations/stripe/docs/payment-intent-succeeded-event.mdx diff --git a/apps/integrations/package.json b/apps/integrations/package.json index 672bb58a231..7d66e5089a9 100644 --- a/apps/integrations/package.json +++ b/apps/integrations/package.json @@ -14,7 +14,8 @@ "lint-fix": "eslint --no-error-on-unmatched-pattern --fix src/**", "generate-integrations": "NODE_OPTIONS=--max-old-space-size=16384 tsx src/trigger/sdk/generate.ts generate", "generate": "prisma generate", - "convert": "tsx src/tools/schemas/typescript-to-json-schema.ts convert", + "convert-ts": "tsx src/tools/schemas/typescript-to-json-schema.ts convert", + "convert-3": "tsx src/tools/schemas/openapi-3-to-3.1.ts convert", "db:migrate:deploy": "prisma migrate deploy", "db:migrate:dev": "prisma migrate dev" }, @@ -29,6 +30,7 @@ "express-async-errors": "^3.1.1", "graphile-worker": "^0.13.0", "json-pointer": "^0.6.2", + "json-schema": "^0.4.0", "json-schema-deref-sync": "^0.14.0", "json-schema-to-typescript": "^11.0.3", "loglevel": "^1.8.1", @@ -45,6 +47,7 @@ "@types/eslint": "^8.4.6", "@types/express": "^4.17.13", "@types/json-pointer": "^1.0.31", + "@types/json-schema": "^7.0.11", "@types/morgan": "^1.9.3", "@types/node": "^18.13.0", "@types/qs": "^6.9.7", diff --git a/apps/integrations/src/core/action/makeAction.ts b/apps/integrations/src/core/action/makeAction.ts index 966b2944b2d..140fdfa577e 100644 --- a/apps/integrations/src/core/action/makeAction.ts +++ b/apps/integrations/src/core/action/makeAction.ts @@ -2,7 +2,7 @@ import { CacheService } from "core/cache/types"; import { Endpoint } from "core/endpoint/types"; import { RequestData, RequestResponse } from "core/request/types"; import { getDisplayProperties } from "./getDisplayProperties"; -import { Action, InputSpec, Metadata, OutputSpec } from "./types"; +import { Action, Metadata } from "./types"; import { makeInputSpec, makeOutputSpec } from "./utilities"; /** Create an action where you specify the spec and action */ diff --git a/apps/integrations/src/core/action/types.ts b/apps/integrations/src/core/action/types.ts index c59285365f1..8157d3f89ef 100644 --- a/apps/integrations/src/core/action/types.ts +++ b/apps/integrations/src/core/action/types.ts @@ -1,12 +1,12 @@ import { CacheService } from "core/cache/types"; import { EndpointSpec } from "core/endpoint/types"; import { HTTPMethod, RequestData, RequestResponse } from "core/request/types"; -import { z } from "zod"; +import { SchemaRef } from "core/schemas/types"; export type InputSpec = { security?: EndpointSpec["security"]; parameters?: EndpointSpec["parameters"]; - body?: NonNullable["schema"]; + body?: SchemaRef; }; export type OutputSpec = { diff --git a/apps/integrations/src/core/common/pointer.ts b/apps/integrations/src/core/common/pointer.ts index 5836b1c6250..4b0b54ff4cf 100644 --- a/apps/integrations/src/core/common/pointer.ts +++ b/apps/integrations/src/core/common/pointer.ts @@ -1,7 +1,5 @@ -import JsonPointer from "json-pointer"; - export type JSONPointer = string; -export function createJSONPointer(path: string[]): JSONPointer { - return JsonPointer.compile(path); +export function createJSONPointer(path: string): JSONPointer { + return path.replace(/\//g, "~1").replace(/~/g, "~0").replace(/#/g, ""); } diff --git a/apps/integrations/src/core/endpoint/endpoint.ts b/apps/integrations/src/core/endpoint/endpoint.ts index 6fef44a8253..d00ebf324f1 100644 --- a/apps/integrations/src/core/endpoint/endpoint.ts +++ b/apps/integrations/src/core/endpoint/endpoint.ts @@ -1,6 +1,6 @@ import { IntegrationAuthentication } from "core/authentication/types"; import { requestEndpoint } from "core/request/requestEndpoint"; -import { RequestData, RequestResponse, RequestSpec } from "core/request/types"; +import { RequestData, RequestSpec } from "core/request/types"; import { Endpoint, EndpointSpec } from "./types"; export const makeEndpoint = (spec: RequestSpec) => { diff --git a/apps/integrations/src/core/endpoint/types.ts b/apps/integrations/src/core/endpoint/types.ts index 5899222f75e..4f7bab3489a 100644 --- a/apps/integrations/src/core/endpoint/types.ts +++ b/apps/integrations/src/core/endpoint/types.ts @@ -1,11 +1,10 @@ -import { JSONPointer } from "core/common/pointer"; import { HTTPMethod, RequestData, RequestResponse, RequestSpec, } from "core/request/types"; -import { JSONSchema } from "core/schemas/types"; +import { SchemaRef } from "core/schemas/types"; export type Endpoint = { spec: RequestSpec; @@ -26,7 +25,7 @@ export type EndpointSpecParameter = { name: string; description: string; required?: boolean; - schema: JSONSchema; + schema: SchemaRef; } & (EndpointSpecParameterUrl | EndpointSpecParameterHeader); type EndpointSpecParameterUrl = { @@ -41,7 +40,7 @@ interface EndpointSpecRequest { headers?: Record; body?: { format?: BodyFormat; - schema: JSONSchema; + schema: SchemaRef; }; } @@ -75,7 +74,7 @@ export interface EndpointSpecResponse { success: boolean; name: string; description?: string; - schema?: JSONSchema; + schema?: SchemaRef; } export interface EndpointSpecMetadata { diff --git a/apps/integrations/src/core/request/types.ts b/apps/integrations/src/core/request/types.ts index 8809e80d0f8..ef2bff58b32 100644 --- a/apps/integrations/src/core/request/types.ts +++ b/apps/integrations/src/core/request/types.ts @@ -36,6 +36,7 @@ export interface RequestSpec { endpointSpec: EndpointSpec; authentication: IntegrationAuthentication; } + export interface RequestData { parameters?: Record; body?: any; diff --git a/apps/integrations/src/core/schemas/integrationSchema.ts b/apps/integrations/src/core/schemas/integrationSchema.ts new file mode 100644 index 00000000000..4be1b10f334 --- /dev/null +++ b/apps/integrations/src/core/schemas/integrationSchema.ts @@ -0,0 +1,5 @@ +import { JSONSchema } from "./types"; + +export type IntegrationSchema = { + definitions: Record; +}; diff --git a/apps/integrations/src/core/schemas/makeSchema.test.ts b/apps/integrations/src/core/schemas/makeSchema.test.ts deleted file mode 100644 index d20afeb5ee5..00000000000 --- a/apps/integrations/src/core/schemas/makeSchema.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { schemaFromRef } from "./makeSchema"; -import { promises as fs } from "fs"; -import { checkoutSessionEventSchema } from "integrations/stripe/webhooks/events/checkoutSession"; - -describe("make schema", async () => { - test("schemaFromRef", async () => { - const schema = { - components: { - basic: { - type: "object", - properties: { - something: { - $ref: "#/components/something", - description: "Something", - }, - }, - required: ["something"], - }, - something: { - type: "object", - properties: { - another: { - $ref: "#/components/another", - }, - }, - }, - another: { - type: "number", - }, - }, - }; - - const flatSchema = schemaFromRef("#/components/basic", schema); - expect(flatSchema).toMatchInlineSnapshot(` - { - "components": { - "another": { - "type": "number", - }, - "something": { - "properties": { - "another": { - "$ref": "#/components/another", - }, - }, - "type": "object", - }, - }, - "properties": { - "something": { - "$ref": "#/components/something", - "description": "Something", - }, - }, - "required": [ - "something", - ], - "type": "object", - } - `); - }); - - test("schemaFromRef", async () => { - const schema = checkoutSessionEventSchema; - await fs.writeFile( - "/Users/Matt/Downloads/schemaFromRef.json", - JSON.stringify(schema, null, 2) - ); - expect(true).toBe(true); - }); -}); diff --git a/apps/integrations/src/core/schemas/schemaRefWalker.ts b/apps/integrations/src/core/schemas/schemaRefWalker.ts index cc55756507f..6054345e03f 100644 --- a/apps/integrations/src/core/schemas/schemaRefWalker.ts +++ b/apps/integrations/src/core/schemas/schemaRefWalker.ts @@ -45,11 +45,15 @@ export class SchemaRefWalker { const path = (object.$ref as string).replace("#", ""); if (!this.refsExplored.has(path)) { - const ptr = pointer.get(this.spec, path); - if (ptr === undefined) { - throw new Error(`Invalid reference: ${object.$ref}`); + let ptr: any = undefined; + try { + ptr = pointer.get(this.spec, path); + } catch (e) { + console.log(e); } + if (ptr === undefined) continue; + action({ ref: object.$ref, object, diff --git a/apps/integrations/src/core/schemas/types.ts b/apps/integrations/src/core/schemas/types.ts index cb06f4c29fa..7cf799cdab1 100644 --- a/apps/integrations/src/core/schemas/types.ts +++ b/apps/integrations/src/core/schemas/types.ts @@ -1,6 +1,14 @@ -import { Schema, InstanceType } from "@cfworker/json-schema"; +import { JSONSchema7 } from "json-schema"; +import { InstanceType } from "@cfworker/json-schema"; import { ErrorObject } from "ajv"; -export type JSONSchema = Schema; +export type JSONSchema = JSONSchema7; export type JSONSchemaInstanceType = InstanceType; export type JSONSchemaError = ErrorObject; + +export type IntegrationSchema = { + definitions: Record; +}; + +type DefinitionPath = "#/definitions/"; +export type SchemaRef = `${DefinitionPath}${string}`; diff --git a/apps/integrations/src/core/service/types.ts b/apps/integrations/src/core/service/types.ts index 1efaef80580..c20bef48843 100644 --- a/apps/integrations/src/core/service/types.ts +++ b/apps/integrations/src/core/service/types.ts @@ -1,5 +1,6 @@ import { Action } from "core/action/types"; import { IntegrationAuthentication } from "core/authentication/types"; +import { IntegrationSchema } from "core/schemas/integrationSchema"; import { Webhook } from "core/webhook/types"; export type Service = { @@ -9,6 +10,7 @@ export type Service = { baseUrl: string; live: boolean; authentication: IntegrationAuthentication; + schema: IntegrationSchema; actions?: Record; webhooks?: Record; retryableStatusCodes: number[]; diff --git a/apps/integrations/src/core/webhook/index.ts b/apps/integrations/src/core/webhook/index.ts index 0f730054ecd..c4e1368745f 100644 --- a/apps/integrations/src/core/webhook/index.ts +++ b/apps/integrations/src/core/webhook/index.ts @@ -4,7 +4,7 @@ import { } from "core/authentication/types"; import { requestEndpoint } from "core/request/requestEndpoint"; import { HTTPResponse } from "core/request/types"; -import { JSONSchema } from "core/schemas/types"; +import { JSONSchema, SchemaRef } from "core/schemas/types"; import { Webhook, WebhookEvent, @@ -27,7 +27,7 @@ export function makeWebhook(input: { | { type: "automatic"; requiresSecret: boolean; - inputSchema: JSONSchema | null; + inputSchemaRef?: SchemaRef; /** take the raw data and turn it into the appropriate input for the subscribe request */ preSubscribe: (input: { webhookId: string; @@ -105,7 +105,7 @@ export function makeWebhook(input: { subscription = { type: "automatic", - inputSchema: input.subscription.inputSchema, + inputSchemaRef: input.subscription.inputSchemaRef, requiresSecret: input.subscription.requiresSecret, subscribe: subscribe, }; diff --git a/apps/integrations/src/core/webhook/types.ts b/apps/integrations/src/core/webhook/types.ts index c99d6d0fc79..5094014addb 100644 --- a/apps/integrations/src/core/webhook/types.ts +++ b/apps/integrations/src/core/webhook/types.ts @@ -5,7 +5,7 @@ import { } from "core/authentication/types"; import { EndpointSpec } from "core/endpoint/types"; import { HTTPMethod, HTTPResponse } from "core/request/types"; -import { JSONSchema } from "core/schemas/types"; +import { SchemaRef } from "core/schemas/types"; export type WebhookResultSuccess = { success: true; @@ -37,7 +37,7 @@ export type WebhookSubscription = export type WebhookSubscriptionAutomatic = { type: "automatic"; requiresSecret: boolean; - inputSchema: JSONSchema | null; + inputSchemaRef?: SchemaRef; subscribe: ( data: WebhookSubscriptionRequest ) => Promise; @@ -124,7 +124,7 @@ export type WebhookIncomingRequest = { export type WebhookEvent = { name: string; metadata: WebhookEventMetadata; - schema: JSONSchema; + outputSchemaRef: SchemaRef; instructions: (inputData: Record) => string; examples: any[]; /** This will be used to identify this event, you should use template language but inside a double quoted string */ diff --git a/apps/integrations/src/generators/combineSchemas.test.ts b/apps/integrations/src/generators/combineSchemas.test.ts index 25e7e3dcb18..8d1842a9c53 100644 --- a/apps/integrations/src/generators/combineSchemas.test.ts +++ b/apps/integrations/src/generators/combineSchemas.test.ts @@ -1,119 +1,68 @@ -import { EndpointSpec } from "core/endpoint/types"; import { JSONSchema } from "core/schemas/types"; -import { expect, test } from "vitest"; -import { createInputSchema } from "./combineSchemas"; +import { describe, expect, test } from "vitest"; +import { createMinimalSchema } from "./combineSchemas"; -test("create input schema when only a body schema", async () => { - try { - const schema: JSONSchema = { - type: "object", - required: ["channel"], - properties: { - as_user: { - type: "string", - description: - "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", - }, - attachments: { - type: "string", - description: - "A JSON-based array of structured attachments, presented as a URL-encoded string.", - }, - channel: { - type: "string", - description: - "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", +describe("combine schemas", async () => { + test("create minimal schema", async () => { + const definitions: Record = { + basic: { + type: "object", + properties: { + something: { + $ref: "#/definitions/something", + description: "Something", + }, }, + required: ["something"], }, - }; - - const inputSchema = createInputSchema({ body: schema }); - expect(inputSchema).toEqual({ - allOf: [schema], - }); - } catch (e: any) { - console.error(JSON.stringify(e.errors, null, 2)); - expect(e).toEqual(null); - } -}); - -test("combine input body and parameters into a schema", async () => { - try { - const bodySchema: JSONSchema = { - type: "object", - required: ["channel"], - properties: { - as_user: { - type: "string", - description: - "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", - }, - attachments: { - type: "string", - description: - "A JSON-based array of structured attachments, presented as a URL-encoded string.", - }, - channel: { - type: "string", - description: - "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", + something: { + type: "object", + properties: { + another: { + $ref: "#/definitions/another", + }, }, }, - }; - const parameters: EndpointSpec["parameters"] = [ - { - name: "limit", - description: "The maximum number of items to return.", - in: "path", - required: true, - schema: { - type: "integer", - description: "The maximum number of items to return.", - }, + another: { + type: "number", }, - ]; + extra: { + title: "Extra", + type: "string", + }, + }; + + const minimalSchema = createMinimalSchema( + "#/definitions/basic", + definitions + ); - const inputSchema = createInputSchema({ body: bodySchema, parameters }); - expect(inputSchema).toMatchInlineSnapshot(` + expect(minimalSchema).toMatchInlineSnapshot(` { - "allOf": [ - { - "properties": { - "limit": { - "description": "The maximum number of items to return.", - "type": "integer", - }, - }, - "required": [ - "limit", - ], - "type": "object", + "definitions": { + "another": { + "type": "number", }, - { + "something": { "properties": { - "as_user": { - "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", - "type": "string", - }, - "attachments": { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "type": "string", - }, - "channel": { - "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", - "type": "string", + "another": { + "$ref": "#/definitions/another", }, }, - "required": [ - "channel", - ], "type": "object", }, + }, + "properties": { + "something": { + "$ref": "#/definitions/something", + "description": "Something", + }, + }, + "required": [ + "something", ], + "type": "object", } `); - } catch (e: any) { - console.error(JSON.stringify(e.errors, null, 2)); - expect(e).toEqual(null); - } + }); }); diff --git a/apps/integrations/src/generators/combineSchemas.ts b/apps/integrations/src/generators/combineSchemas.ts index 13abec8f190..b503b15b70b 100644 --- a/apps/integrations/src/generators/combineSchemas.ts +++ b/apps/integrations/src/generators/combineSchemas.ts @@ -1,91 +1,32 @@ -import { Action } from "core/action/types"; import { makeAnyOf } from "core/schemas/makeSchema"; import { SchemaRefWalker } from "core/schemas/schemaRefWalker"; -import { JSONSchema } from "core/schemas/types"; -import nodeObjectHash from "node-object-hash"; +import { JSONSchema, SchemaRef } from "core/schemas/types"; import pointer from "json-pointer"; +import nodeObjectHash from "node-object-hash"; -export function generateInputOutputSchemas( - spec: Action["spec"], - name: string -): { - input: JSONSchema | undefined; - output: JSONSchema | undefined; -} { - const inputSchema = createInputSchema(spec.input); - if (inputSchema) inputSchema.title = `${name}Input`; - - const outputSchema = createSuccessfulOutputSchema(spec.output); - if (outputSchema) outputSchema.title = `${name}Output`; - - return { - input: inputSchema, - output: outputSchema, - }; -} +/** Creates the smallest schema with only the used references */ +export function createMinimalSchema( + ref: SchemaRef, + definitions: Record +): JSONSchema { + const refWalker = new SchemaRefWalker({ definitions }); -export function createInputSchema( - spec: Action["spec"]["input"] -): JSONSchema | undefined { - if ( - (spec.parameters === undefined || spec.parameters.length === 0) && - spec.body === undefined - ) - return undefined; + //we want the schema to have the top-level ref expanded (for the zod generator) + const rootObject = pointer.get({ definitions }, ref.replace("#", "")); - const inputSchema: JSONSchema = { - allOf: [], + const schema = { + ...rootObject, + definitions: {}, }; - if (spec.parameters && spec.parameters.length > 0) { - const paramsSchema: JSONSchema = { - type: "object", - properties: { - ...Object.fromEntries( - spec.parameters.map((p) => [ - p.name, - { ...p.schema, description: p.description }, - ]) - ), - }, - required: [ - ...spec.parameters.filter((p) => p.required).map((p) => p.name), - ], - }; - - inputSchema.allOf?.push(paramsSchema); - } - - if (spec.body) { - inputSchema.allOf?.push(spec.body); - } - - return inputSchema; -} - -export function createSuccessfulOutputSchema( - spec: Action["spec"]["output"] -): JSONSchema | undefined { - if (spec === undefined) return undefined; - - //combine all "success" output schemas into a union - const outputSuccessSchemas = spec.responses.flatMap((r) => - r.success ? r.schema : [] - ); - - return outputSuccessSchemas.length === 1 - ? outputSuccessSchemas[0] - : createDiscriminatedUnionSchema(`Output`, outputSuccessSchemas); -} + refWalker.run(schema, ({ object, key, ref, definition, seenBefore }) => { + if (seenBefore) { + return; + } + pointer.set(schema, ref.replace("#", ""), definition); + }); -function createDiscriminatedUnionSchema( - name: string, - schemas: JSONSchema[] -): JSONSchema { - return { - $id: name, - oneOf: schemas, - }; + return schema; } const hasher = nodeObjectHash({ sort: true }); diff --git a/apps/integrations/src/integrations/stripe/index.ts b/apps/integrations/src/integrations/stripe/index.ts index 33ded0584d5..d5a7c179e16 100644 --- a/apps/integrations/src/integrations/stripe/index.ts +++ b/apps/integrations/src/integrations/stripe/index.ts @@ -1,5 +1,7 @@ +import { IntegrationSchema } from "core/schemas/types"; import { Service } from "core/service/types"; import { authentication } from "./authentication"; +import spec from "./schemas/spec.json"; import { webhooks } from "./webhooks/webhooks"; export const stripe: Service = { @@ -9,6 +11,7 @@ export const stripe: Service = { baseUrl: "https://api.stripe.com/v1", live: true, authentication, + schema: spec as IntegrationSchema, webhooks, retryableStatusCodes: [408, 429, 500, 502, 503, 504], }; diff --git a/apps/integrations/src/integrations/stripe/schemas/spec3.json b/apps/integrations/src/integrations/stripe/schemas/originals/open-api-3.0.0.json similarity index 100% rename from apps/integrations/src/integrations/stripe/schemas/spec3.json rename to apps/integrations/src/integrations/stripe/schemas/originals/open-api-3.0.0.json diff --git a/apps/integrations/src/integrations/stripe/schemas/originals/open-api-3.0.0_3.1.json b/apps/integrations/src/integrations/stripe/schemas/originals/open-api-3.0.0_3.1.json new file mode 100644 index 00000000000..3ef30dc6683 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/schemas/originals/open-api-3.0.0_3.1.json @@ -0,0 +1,126796 @@ +{ + "components": { + "schemas": { + "account": { + "description": "This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that\naccount has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)\nfor a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**\nbelow. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_business_profile" + }, + { + "type": "null" + } + ], + "description": "Business information about the account." + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "capabilities": { + "$ref": "#/components/schemas/account_capabilities" + }, + "charges_enabled": { + "description": "Whether the account can create live charges.", + "type": "boolean" + }, + "company": { + "$ref": "#/components/schemas/legal_entity_company" + }, + "controller": { + "$ref": "#/components/schemas/account_unification_account_controller" + }, + "country": { + "description": "The account's country.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the account was connected. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_currency": { + "description": "Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).", + "maxLength": 5000, + "type": "string" + }, + "details_submitted": { + "description": "Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.", + "type": "boolean" + }, + "email": { + "description": "An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "external_accounts": { + "description": "External accounts (bank accounts and debit cards) currently attached to this account", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "future_requirements": { + "$ref": "#/components/schemas/account_future_requirements" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "$ref": "#/components/schemas/person" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account" + ], + "type": "string" + }, + "payouts_enabled": { + "description": "Whether Stripe can send payouts to this account.", + "type": "boolean" + }, + "requirements": { + "$ref": "#/components/schemas/account_requirements" + }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/account_settings" + }, + { + "type": "null" + } + ], + "description": "Options for customizing how the account functions within Stripe." + }, + "tos_acceptance": { + "$ref": "#/components/schemas/account_tos_acceptance" + }, + "type": { + "description": "The Stripe account type. Can be `standard`, `express`, or `custom`.", + "enum": [ + "custom", + "express", + "standard" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Account", + "type": "object", + "x-expandableFields": [ + "business_profile", + "capabilities", + "company", + "controller", + "external_accounts", + "future_requirements", + "individual", + "requirements", + "settings", + "tos_acceptance" + ], + "x-resourceId": "account" + }, + "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 will appear on the mandate, and as the statement descriptor.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "primary_color": { + "description": "A CSS hex color value representing the primary branding color for this account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "secondary_color": { + "description": "A CSS hex color value representing the secondary branding color for this account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": [ + "icon", + "logo" + ] + }, + "account_business_profile": { + "description": "", + "properties": { + "mcc": { + "description": "[The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The customer-facing business name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "support_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "A publicly available mailing address for sending support issues to." + }, + "support_email": { + "description": "A publicly available email address for sending support issues to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "support_phone": { + "description": "A publicly available phone number to call with support issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "support_url": { + "description": "A publicly available website for handling support issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The business's publicly available website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": [ + "support_address" + ] + }, + "account_capabilities": { + "description": "", + "properties": { + "acss_debit_payments": { + "description": "The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "affirm_payments": { + "description": "The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "afterpay_clearpay_payments": { + "description": "The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "au_becs_debit_payments": { + "description": "The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bacs_debit_payments": { + "description": "The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bancontact_payments": { + "description": "The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "bank_transfer_payments": { + "description": "The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "blik_payments": { + "description": "The status of the blik payments capability of the account, or whether the account can directly process blik charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "boleto_payments": { + "description": "The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_issuing": { + "description": "The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "card_payments": { + "description": "The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "cartes_bancaires_payments": { + "description": "The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "paynow_payments": { + "description": "The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "promptpay_payments": { + "description": "The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + } + }, + "title": "AccountCapabilities", + "type": "object", + "x-expandableFields": [] + }, + "account_capability_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_capability_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "current_deadline": { + "description": "Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.\n\n`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:\n\n- [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses)\n\nIf you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/card_issuing_account_terms_of_service" + } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { + "$ref": "#/components/schemas/account_decline_charge_on" + }, + "statement_descriptor_prefix": { + "description": "The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": [ + "decline_on" + ] + }, + "account_dashboard_settings": { + "description": "", + "properties": { + "display_name": { + "description": "The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_decline_charge_on": { + "description": "", + "properties": { + "avs_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.", + "type": "boolean" + }, + "cvc_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.", + "type": "boolean" + } + }, + "required": [ + "avs_failure", + "cvc_failure" + ], + "title": "AccountDeclineChargeOn", + "type": "object", + "x-expandableFields": [] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with 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", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": [ + "array", + "null" + ] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_link": { + "description": "Account Links are the means by which a Connect platform grants a connected account permission to access\nStripe-hosted applications, such as Connect Onboarding.\n\nRelated guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which this account link will expire.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account_link" + ], + "type": "string" + }, + "url": { + "description": "The URL for the account link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "expires_at", + "object", + "url" + ], + "title": "AccountLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "account_link" + }, + "account_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, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_kana": { + "description": "The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_payout_settings": { + "description": "", + "properties": { + "debit_negative_balances": { + "description": "A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.", + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/transfer_schedule" + }, + "statement_descriptor": { + "description": "The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "debit_negative_balances", + "schedule" + ], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": [ + "schedule" + ] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "disabled_reason": { + "description": "If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": [ + "array", + "null" + ] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to satisfy all fields in `original_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "alternative_fields_due", + "original_fields_due" + ], + "title": "AccountRequirementsAlternative", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "invalid_address_city_state_postal_code", + "invalid_dob_age_under_18", + "invalid_representative_country", + "invalid_street_address", + "invalid_tos_acceptance", + "invalid_value_other", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "An informative message that indicates the error type and provides additional details about the error.", + "maxLength": 5000, + "type": "string" + }, + "requirement": { + "description": "The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "code", + "reason", + "requirement" + ], + "title": "AccountRequirementsError", + "type": "object", + "x-expandableFields": [] + }, + "account_sepa_debit_payments_settings": { + "description": "", + "properties": { + "creditor_id": { + "description": "SEPA creditor identifier that identifies the company making the payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountSepaDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { + "$ref": "#/components/schemas/account_bacs_debit_payments_settings" + }, + "branding": { + "$ref": "#/components/schemas/account_branding_settings" + }, + "card_issuing": { + "$ref": "#/components/schemas/account_card_issuing_settings" + }, + "card_payments": { + "$ref": "#/components/schemas/account_card_payments_settings" + }, + "dashboard": { + "$ref": "#/components/schemas/account_dashboard_settings" + }, + "payments": { + "$ref": "#/components/schemas/account_payments_settings" + }, + "payouts": { + "$ref": "#/components/schemas/account_payout_settings" + }, + "sepa_debit_payments": { + "$ref": "#/components/schemas/account_sepa_debit_payments_settings" + }, + "treasury": { + "$ref": "#/components/schemas/account_treasury_settings" + } + }, + "required": [ + "branding", + "card_payments", + "dashboard", + "payments" + ], + "title": "AccountSettings", + "type": "object", + "x-expandableFields": [ + "bacs_debit_payments", + "branding", + "card_issuing", + "card_payments", + "dashboard", + "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.", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted their service agreement", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted their service agreement", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "AccountTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "account_treasury_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/components/schemas/account_terms_of_service" + } + }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": [ + "tos_acceptance" + ] + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "is_controller": { + "description": "`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.", + "type": "boolean" + }, + "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": [] + }, + "address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + "null" + ] + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "Address", + "type": "object", + "x-expandableFields": [] + }, + "api_errors": { + "description": "", + "properties": { + "charge": { + "description": "For card errors, the ID of the failed charge.", + "maxLength": 5000, + "type": "string" + }, + "code": { + "description": "For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "decline_code": { + "description": "For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.", + "maxLength": 40000, + "type": "string" + }, + "param": { + "description": "If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.", + "maxLength": 5000, + "type": "string" + }, + "payment_intent": { + "$ref": "#/components/schemas/payment_intent" + }, + "payment_method": { + "$ref": "#/components/schemas/payment_method" + }, + "payment_method_type": { + "description": "If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.", + "maxLength": 5000, + "type": "string" + }, + "request_log_url": { + "description": "A URL to the request log entry in your dashboard.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "$ref": "#/components/schemas/setup_intent" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "description": "The source object for errors returned on a request involving a 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" + ] + }, + "apple_pay_domain": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "domain_name": { + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "apple_pay_domain" + ], + "type": "string" + } + }, + "required": [ + "created", + "domain_name", + "id", + "livemode", + "object" + ], + "title": "ApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "apple_pay_domain" + }, + "application": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "id", + "object" + ], + "title": "Application", + "type": "object", + "x-expandableFields": [] + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "amount": { + "description": "Amount earned, in %s.", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + } + ], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application_fee" + ], + "type": "string" + }, + "originating_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "refunded": { + "description": "Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.", + "type": "boolean" + }, + "refunds": { + "description": "A list of refunds that have been applied to the fee.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "charge", + "created", + "currency", + "id", + "livemode", + "object", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee" + }, + "apps.secret": { + "description": "Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.\n\nThe primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.\n\nAll Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.\n\nA `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.\n\nRelated guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deleted": { + "description": "If true, indicates that this secret has been deleted", + "type": "boolean" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "apps.secret" + ], + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "scope": { + "$ref": "#/components/schemas/secret_service_resource_scope" + } + }, + "required": [ + "created", + "id", + "livemode", + "name", + "object", + "scope" + ], + "title": "SecretServiceResourceSecret", + "type": "object", + "x-expandableFields": [ + "scope" + ], + "x-resourceId": "apps.secret" + }, + "automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this invoice.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "balance": { + "description": "This is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.\n\nYou can also retrieve the balance history, which contains a list of\n[transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance\n(charges, payouts, and so forth).\n\nThe available and pending amounts for each currency are broken down further by\npayment source types.\n\nRelated guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).", + "properties": { + "available": { + "description": "Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "connect_reserved": { + "description": "Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "instant_available": { + "description": "Funds that can be paid out using Instant Payouts.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + }, + "issuing": { + "$ref": "#/components/schemas/balance_detail" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "balance" + ], + "type": "string" + }, + "pending": { + "description": "Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + } + }, + "required": [ + "available", + "livemode", + "object", + "pending" + ], + "title": "Balance", + "type": "object", + "x-expandableFields": [ + "available", + "connect_reserved", + "instant_available", + "issuing", + "pending" + ], + "x-resourceId": "balance" + }, + "balance_amount": { + "description": "", + "properties": { + "amount": { + "description": "Balance amount.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "source_types": { + "$ref": "#/components/schemas/balance_amount_by_source_type" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "BalanceAmount", + "type": "object", + "x-expandableFields": [ + "source_types" + ] + }, + "balance_amount_by_source_type": { + "description": "", + "properties": { + "bank_account": { + "description": "Amount for bank account.", + "type": "integer" + }, + "card": { + "description": "Amount for card.", + "type": "integer" + }, + "fpx": { + "description": "Amount for FPX.", + "type": "integer" + } + }, + "title": "BalanceAmountBySourceType", + "type": "object", + "x-expandableFields": [] + }, + "balance_detail": { + "description": "", + "properties": { + "available": { + "description": "Funds that are available for use.", + "items": { + "$ref": "#/components/schemas/balance_amount" + }, + "type": "array" + } + }, + "required": [ + "available" + ], + "title": "BalanceDetail", + "type": "object", + "x-expandableFields": [ + "available" + ] + }, + "balance_transaction": { + "description": "Balance transactions represent funds moving through your Stripe account.\nThey're created for every type of transaction that comes into or flows out of your Stripe account balance.\n\nRelated guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).", + "properties": { + "amount": { + "description": "Gross amount of the transaction, in %s.", + "type": "integer" + }, + "available_on": { + "description": "The date the transaction's net funds will become available in the Stripe balance.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "exchange_rate": { + "description": "The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.", + "type": [ + "number", + "null" + ] + }, + "fee": { + "description": "Fees (in %s) paid for this transaction.", + "type": "integer" + }, + "fee_details": { + "description": "Detailed breakdown of fees (in %s) paid for this transaction.", + "items": { + "$ref": "#/components/schemas/fee" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "net": { + "description": "Net amount of the transaction, in %s.", + "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](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The Stripe object to which this transaction is related.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "$ref": "#/components/schemas/connect_collection_transfer" + }, + { + "$ref": "#/components/schemas/dispute" + }, + { + "$ref": "#/components/schemas/fee_refund" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "$ref": "#/components/schemas/platform_tax_fee" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "$ref": "#/components/schemas/reserve_transaction" + }, + { + "$ref": "#/components/schemas/tax_deducted_at_source" + }, + { + "$ref": "#/components/schemas/topup" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + }, + "x-stripeBypassValidation": true + }, + "status": { + "description": "If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.", + "enum": [ + "adjustment", + "advance", + "advance_funding", + "anticipation_repayment", + "application_fee", + "application_fee_refund", + "charge", + "connect_collection_transfer", + "contribution", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "payment", + "payment_failure_refund", + "payment_refund", + "payout", + "payout_cancel", + "payout_failure", + "refund", + "refund_failure", + "reserve_transaction", + "reserved_funds", + "stripe_fee", + "stripe_fx_fee", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "created", + "currency", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": [ + "fee_details", + "source" + ], + "x-resourceId": "balance_transaction" + }, + "bank_account": { + "description": "These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer\ndestinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-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](https://stripe.com/docs/payments/bank-debits-transfers).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The ID of the account that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number (e.g., `WELLS FARGO`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_for_currency": { + "description": "Whether this bank account is the default external account for its currency.", + "type": [ + "boolean", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "bank_account" + ], + "type": "string" + }, + "routing_number": { + "description": "The routing transit number for the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country", + "currency", + "id", + "last4", + "object", + "status" + ], + "title": "BankAccount", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "bank_account" + }, + "bank_connections_resource_accountholder": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "type": { + "description": "Type of account holder that this account belongs to.", + "enum": [ + "account", + "customer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "BankConnectionsResourceAccountholder", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ] + }, + "bank_connections_resource_balance": { + "description": "", + "properties": { + "as_of": { + "description": "The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "cash": { + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_cash_balance" + }, + "credit": { + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_credit_balance" + }, + "current": { + "additionalProperties": { + "type": "integer" + }, + "description": "The balances owed to (or by) the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": "object" + }, + "type": { + "description": "The `type` of the balance. An additional hash is included on the balance with a name matching this value.", + "enum": [ + "cash", + "credit" + ], + "type": "string" + } + }, + "required": [ + "as_of", + "current", + "type" + ], + "title": "BankConnectionsResourceBalance", + "type": "object", + "x-expandableFields": [ + "cash", + "credit" + ] + }, + "bank_connections_resource_balance_api_resource_cash_balance": { + "description": "", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "The funds available to the account holder. Typically this is the current balance less any holds.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": [ + "object", + "null" + ] + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCashBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_api_resource_credit_balance": { + "description": "", + "properties": { + "used": { + "additionalProperties": { + "type": "integer" + }, + "description": "The credit that has been used by the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": [ + "object", + "null" + ] + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCreditBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + } + }, + "required": [ + "last_attempted_at", + "status" + ], + "title": "BankConnectionsResourceBalanceRefresh", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_link_account_session_filters": { + "description": "", + "properties": { + "countries": { + "description": "List of countries from which to filter accounts.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "BankConnectionsResourceLinkAccountSessionFilters", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_ownership_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + } + }, + "required": [ + "last_attempted_at", + "status" + ], + "title": "BankConnectionsResourceOwnershipRefresh", + "type": "object", + "x-expandableFields": [] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Billing address." + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "Billing phone number (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "billing_details", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "billing_portal.configuration": { + "description": "A portal configuration describes the functionality and behavior of a portal session.", + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the configuration.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "business_profile": { + "$ref": "#/components/schemas/portal_business_profile" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_return_url": { + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "features": { + "$ref": "#/components/schemas/portal_features" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_default": { + "description": "Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "login_page": { + "$ref": "#/components/schemas/portal_login_page" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "billing_portal.configuration" + ], + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "active", + "business_profile", + "created", + "features", + "id", + "is_default", + "livemode", + "login_page", + "object", + "updated" + ], + "title": "PortalConfiguration", + "type": "object", + "x-expandableFields": [ + "application", + "business_profile", + "features", + "login_page" + ], + "x-resourceId": "billing_portal.configuration" + }, + "billing_portal.session": { + "description": "The Billing customer portal is a Stripe-hosted UI for subscription and\nbilling management.\n\nA portal configuration describes the functionality and features that you\nwant to provide to your customers through the portal.\n\nA portal session describes the instantiation of the customer portal for\na particular customer. By visiting the session's URL, the customer\ncan manage their subscriptions and billing details. For security reasons,\nsessions are short-lived and will expire if the customer does not visit the URL.\nCreate sessions on-demand when customers intend to manage their subscriptions\nand billing details.\n\nLearn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).", + "properties": { + "configuration": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/billing_portal.configuration" + } + ], + "description": "The configuration used by this session, describing the features available.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/billing_portal.configuration" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "description": "The ID of the customer for this session.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow" + }, + { + "type": "null" + } + ], + "description": "Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + null + ], + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "billing_portal.session" + ], + "type": "string" + }, + "on_behalf_of": { + "description": "The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "return_url": { + "description": "The URL to redirect customers to when they click on the portal's link to return to your website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The short-lived URL of the session that gives customers access to the customer portal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "configuration", + "created", + "customer", + "id", + "livemode", + "object", + "url" + ], + "title": "PortalSession", + "type": "object", + "x-expandableFields": [ + "configuration", + "flow" + ], + "x-resourceId": "billing_portal.session" + }, + "capability": { + "description": "This is an object representing a capability for a Stripe account.\n\nRelated guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account for which the capability enables functionality.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "future_requirements": { + "$ref": "#/components/schemas/account_capability_future_requirements" + }, + "id": { + "description": "The identifier for the capability.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "capability" + ], + "type": "string" + }, + "requested": { + "description": "Whether the capability has been requested.", + "type": "boolean" + }, + "requested_at": { + "description": "Time at which the capability was requested. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "requirements": { + "$ref": "#/components/schemas/account_capability_requirements" + }, + "status": { + "description": "The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.", + "enum": [ + "active", + "disabled", + "inactive", + "pending", + "unrequested" + ], + "type": "string" + } + }, + "required": [ + "account", + "id", + "object", + "requested", + "status" + ], + "title": "AccountCapability", + "type": "object", + "x-expandableFields": [ + "account", + "future_requirements", + "requirements" + ], + "x-resourceId": "capability" + }, + "card": { + "description": "You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line1_check": { + "description": "If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "description": "If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + }, + "brand": { + "description": "Card brand. Can be `American Express`, `Diners Club`, `Discover`, `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, + "type": [ + "string", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.", + "type": [ + "string", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "default_for_currency": { + "description": "Whether this card is the default external account for its currency.", + "type": [ + "boolean", + "null" + ] + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + }, + "status": { + "description": "For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "object" + ], + "title": "Card", + "type": "object", + "x-expandableFields": [ + "account", + "customer" + ], + "x-resourceId": "card" + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "type": { + "description": "The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "card_generated_from_payment_method_details", + "type": "object", + "x-expandableFields": [ + "card_present" + ] + }, + "card_issuing_account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "card_mandate_payment_method_details": { + "description": "", + "properties": {}, + "title": "card_mandate_payment_method_details", + "type": "object", + "x-expandableFields": [] + }, + "cash_balance": { + "description": "A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": [ + "object", + "null" + ] + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "cash_balance" + ], + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/customer_balance_customer_balance_settings" + } + }, + "required": [ + "customer", + "livemode", + "object", + "settings" + ], + "title": "cash_balance", + "type": "object", + "x-expandableFields": [ + "settings" + ], + "x-resourceId": "cash_balance" + }, + "charge": { + "description": "To charge a credit or a debit card, you create a `Charge` object. You can\nretrieve and refund individual charges as well as list all charges. Charges\nare identified by a unique, random ID.\n\nRelated guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_captured": { + "description": "Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + }, + { + "type": "null" + } + ], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "type": [ + "integer", + "null" + ] + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "calculated_statement_descriptor": { + "description": "The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 40000, + "type": [ + "string", + "null" + ] + }, + "disputed": { + "description": "Whether the charge has been disputed.", + "type": "boolean" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for charge failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fraud_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_fraud_details" + }, + { + "type": "null" + } + ], + "description": "Information on fraud assessments for the charge." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "charge" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_outcome" + }, + { + "type": "null" + } + ], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details." + }, + "paid": { + "description": "`true` if the charge succeeded, or was successfully authorized for later capture.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_method": { + "description": "ID of the payment method used in this charge.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Details about the payment method at the time of the transaction." + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge was sent to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RefundList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this charge if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for the charge." + }, + "source_transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + }, + { + "type": "null" + } + ], + "description": "The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the payment is either `succeeded`, `pending`, or `failed`.", + "enum": [ + "failed", + "pending", + "succeeded" + ], + "type": "string" + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/charge_transfer_data" + }, + { + "type": "null" + } + ], + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details." + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "billing_details", + "captured", + "created", + "currency", + "disputed", + "id", + "livemode", + "metadata", + "object", + "paid", + "refunded", + "status" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "invoice", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "radar_options", + "refunds", + "review", + "shipping", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge" + }, + "charge_fraud_details": { + "description": "", + "properties": { + "stripe_report": { + "description": "Assessments from Stripe. If set, the value is `fraudulent`.", + "maxLength": 5000, + "type": "string" + }, + "user_report": { + "description": "Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "ChargeFraudDetails", + "type": "object", + "x-expandableFields": [] + }, + "charge_outcome": { + "description": "", + "properties": { + "network_status": { + "description": "Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as \"pending\" on a cardholder's statement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "reason": { + "description": "An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "risk_level": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.", + "maxLength": 5000, + "type": "string" + }, + "risk_score": { + "description": "Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.", + "type": "integer" + }, + "rule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/rule" + } + ], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/rule" + } + ] + } + }, + "seller_message": { + "description": "A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": [ + "rule" + ] + }, + "charge_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "checkout.session": { + "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).", + "properties": { + "after_expiration": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for actions to take if this Checkout Session expires." + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": [ + "boolean", + "null" + ] + }, + "amount_subtotal": { + "description": "Total of all items before discounts or taxes are applied.", + "type": [ + "integer", + "null" + ] + }, + "amount_total": { + "description": "Total of all items after discounts and taxes are applied.", + "type": [ + "integer", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_pages_checkout_session_automatic_tax" + }, + "billing_address_collection": { + "description": "Describes whether Checkout should collect the customer's billing address.", + "enum": [ + "auto", + "required", + null + ], + "type": [ + "string", + "null" + ] + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "consent": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent" + }, + { + "type": "null" + } + ], + "description": "Results of `consent_collection` for this session." + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the Checkout Session to gather active consent from customers." + }, + "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).", + "type": [ + "string", + "null" + ] + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", + "enum": [ + "always", + "if_required", + null + ], + "type": [ + "string", + "null" + ] + }, + "customer_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" + }, + { + "type": "null" + } + ], + "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode." + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "expires_at": { + "description": "The timestamp at which the Checkout Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice created by the Checkout Session, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Details on the state of invoice creation for the Checkout Session." + }, + "line_items": { + "description": "The line items purchased by the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "mode": { + "description": "The mode of the Checkout Session.", + "enum": [ + "payment", + "setup", + "subscription" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "checkout.session" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_link": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_link" + }, + { + "type": "null" + } + ], + "description": "The ID of the Payment Link that created this Session.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_link" + } + ] + } + }, + "payment_method_collection": { + "description": "Configure whether a Checkout Session should collect a payment method.", + "enum": [ + "always", + "if_required", + null + ], + "type": [ + "string", + "null" + ] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/checkout_session_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession." + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_status": { + "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", + "enum": [ + "no_payment_required", + "paid", + "unpaid" + ], + "type": "string" + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_phone_number_collection" + }, + "recovered_from": { + "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this Checkout Session." + }, + "shipping_options": { + "description": "The shipping rate options applied to this Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" + }, + "type": "array" + }, + "status": { + "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", + "enum": [ + "complete", + "expired", + "open", + null + ], + "type": [ + "string", + "null" + ] + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": [ + "auto", + "book", + "donate", + "pay", + null + ], + "type": [ + "string", + "null" + ] + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "success_url": { + "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id_collection" + }, + "total_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details" + }, + { + "type": "null" + } + ], + "description": "Tax and discount details for the computed total amount." + }, + "url": { + "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "automatic_tax", + "created", + "custom_fields", + "custom_text", + "expires_at", + "id", + "livemode", + "mode", + "object", + "payment_method_types", + "payment_status", + "shipping_options", + "success_url" + ], + "title": "Session", + "type": "object", + "x-expandableFields": [ + "after_expiration", + "automatic_tax", + "consent", + "consent_collection", + "custom_fields", + "custom_text", + "customer", + "customer_details", + "invoice", + "invoice_creation", + "line_items", + "payment_intent", + "payment_link", + "payment_method_options", + "phone_number_collection", + "setup_intent", + "shipping_address_collection", + "shipping_cost", + "shipping_details", + "shipping_options", + "subscription", + "tax_id_collection", + "total_details" + ], + "x-resourceId": "checkout.session" + }, + "checkout_acss_debit_mandate_options": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "CheckoutAcssDebitMandateOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_acss_debit_payment_method_options": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account. Returned when the Session is in `setup` mode.", + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "$ref": "#/components/schemas/checkout_acss_debit_mandate_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutAcssDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "checkout_affirm_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAffirmPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_afterpay_clearpay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAfterpayClearpayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_alipay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAlipayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_au_becs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutAuBecsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bacs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutBacsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bancontact_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutBancontactPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_boleto_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutBoletoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_installments_options": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates if installments are enabled", + "type": "boolean" + } + }, + "title": "CheckoutCardInstallmentsOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_payment_method_options": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/checkout_card_installments_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "checkout_customer_balance_bank_transfer_payment_method_options": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutCustomerBalanceBankTransferPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "checkout_customer_balance_payment_method_options": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/checkout_customer_balance_bank_transfer_payment_method_options" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutCustomerBalancePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "checkout_eps_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutEpsPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_fpx_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutFpxPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_giropay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGiropayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_grab_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutGrabPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_ideal_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutIdealPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_klarna_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutKlarnaPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_konbini_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.", + "type": [ + "integer", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutKonbiniPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_oxxo_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "CheckoutOxxoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_p24_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutP24PaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paynow_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutPaynowPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_pix_payment_method_options": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds after which Pix payment will expire.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "CheckoutPixPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_sepa_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "CheckoutSepaDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_session_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" + }, + "affirm": { + "$ref": "#/components/schemas/checkout_affirm_payment_method_options" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/checkout_afterpay_clearpay_payment_method_options" + }, + "alipay": { + "$ref": "#/components/schemas/checkout_alipay_payment_method_options" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/checkout_au_becs_debit_payment_method_options" + }, + "bacs_debit": { + "$ref": "#/components/schemas/checkout_bacs_debit_payment_method_options" + }, + "bancontact": { + "$ref": "#/components/schemas/checkout_bancontact_payment_method_options" + }, + "boleto": { + "$ref": "#/components/schemas/checkout_boleto_payment_method_options" + }, + "card": { + "$ref": "#/components/schemas/checkout_card_payment_method_options" + }, + "customer_balance": { + "$ref": "#/components/schemas/checkout_customer_balance_payment_method_options" + }, + "eps": { + "$ref": "#/components/schemas/checkout_eps_payment_method_options" + }, + "fpx": { + "$ref": "#/components/schemas/checkout_fpx_payment_method_options" + }, + "giropay": { + "$ref": "#/components/schemas/checkout_giropay_payment_method_options" + }, + "grabpay": { + "$ref": "#/components/schemas/checkout_grab_pay_payment_method_options" + }, + "ideal": { + "$ref": "#/components/schemas/checkout_ideal_payment_method_options" + }, + "klarna": { + "$ref": "#/components/schemas/checkout_klarna_payment_method_options" + }, + "konbini": { + "$ref": "#/components/schemas/checkout_konbini_payment_method_options" + }, + "oxxo": { + "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" + }, + "p24": { + "$ref": "#/components/schemas/checkout_p24_payment_method_options" + }, + "paynow": { + "$ref": "#/components/schemas/checkout_paynow_payment_method_options" + }, + "pix": { + "$ref": "#/components/schemas/checkout_pix_payment_method_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/checkout_sepa_debit_payment_method_options" + }, + "sofort": { + "$ref": "#/components/schemas/checkout_sofort_payment_method_options" + }, + "us_bank_account": { + "$ref": "#/components/schemas/checkout_us_bank_account_payment_method_options" + } + }, + "title": "CheckoutSessionPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "checkout_sofort_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "CheckoutSofortPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_us_bank_account_payment_method_options": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutUsBankAccountPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "connect_collection_transfer": { + "description": "", + "properties": { + "amount": { + "description": "Amount transferred, in %s.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "connect_collection_transfer" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "destination", + "id", + "livemode", + "object" + ], + "title": "ConnectCollectionTransfer", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "country_spec": { + "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", + "properties": { + "default_currency": { + "description": "The default currency for this country. This applies to both payment methods and bank accounts.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object. Represented as the ISO country code for this country.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "country_spec" + ], + "type": "string" + }, + "supported_bank_account_currencies": { + "additionalProperties": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": "Currencies that can be accepted in the specific country (for transfers).", + "type": "object" + }, + "supported_payment_currencies": { + "description": "Currencies that can be accepted in the specified country (for payments).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_payment_methods": { + "description": "Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_transfer_countries": { + "description": "Countries that can accept transfers from the specified country.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "verification_fields": { + "$ref": "#/components/schemas/country_spec_verification_fields" + } + }, + "required": [ + "default_currency", + "id", + "object", + "supported_bank_account_currencies", + "supported_payment_currencies", + "supported_payment_methods", + "supported_transfer_countries", + "verification_fields" + ], + "title": "CountrySpec", + "type": "object", + "x-expandableFields": [ + "verification_fields" + ], + "x-resourceId": "country_spec" + }, + "country_spec_verification_field_details": { + "description": "", + "properties": { + "additional": { + "description": "Additional fields which are only required for some users.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "minimum": { + "description": "Fields which every account must eventually provide.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "additional", + "minimum" + ], + "title": "CountrySpecVerificationFieldDetails", + "type": "object", + "x-expandableFields": [] + }, + "country_spec_verification_fields": { + "description": "", + "properties": { + "company": { + "$ref": "#/components/schemas/country_spec_verification_field_details" + }, + "individual": { + "$ref": "#/components/schemas/country_spec_verification_field_details" + } + }, + "required": [ + "company", + "individual" + ], + "title": "CountrySpecVerificationFields", + "type": "object", + "x-expandableFields": [ + "company", + "individual" + ] + }, + "coupon": { + "description": "A coupon contains information about a percent-off or amount-off discount you\nmight want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),\n[checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": [ + "integer", + "null" + ] + }, + "applies_to": { + "$ref": "#/components/schemas/coupon_applies_to" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.", + "type": [ + "string", + "null" + ] + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/coupon_currency_option" + }, + "description": "Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.", + "type": [ + "integer", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "name": { + "description": "Name of the coupon displayed to customers on for instance invoices or receipts.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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 %s100 invoice %s50 instead.", + "type": [ + "number", + "null" + ] + }, + "redeem_by": { + "description": "Date after which the coupon can no longer be redeemed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "times_redeemed": { + "description": "Number of times this coupon has been applied to a customer.", + "type": "integer" + }, + "valid": { + "description": "Taking account of the above properties, whether this coupon can still be applied to a customer.", + "type": "boolean" + } + }, + "required": [ + "created", + "duration", + "id", + "livemode", + "object", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": [ + "applies_to", + "currency_options" + ], + "x-resourceId": "coupon" + }, + "coupon_applies_to": { + "description": "", + "properties": { + "products": { + "description": "A list of product IDs this coupon applies to", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "products" + ], + "title": "CouponAppliesTo", + "type": "object", + "x-expandableFields": [] + }, + "coupon_currency_option": { + "description": "", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": "integer" + } + }, + "required": [ + "amount_off" + ], + "title": "CouponCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "credit_note": { + "description": "Issue a credit note to adjust an invoice's amount after the invoice is finalized.\n\nRelated guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).", + "properties": { + "amount": { + "description": "The integer amount in %s representing the total amount of the credit note, including tax.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer_balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Customer balance transaction related to this credit note.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer_balance_transaction" + } + ] + } + }, + "discount_amount": { + "description": "The integer amount in %s representing the total amount of discount that was credited.", + "type": "integer" + }, + "discount_amounts": { + "description": "The aggregate amounts calculated per discount for all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "ID of the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "Line items that make up the credit note", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "memo": { + "description": "Customer-facing text that appears on the credit note PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "number": { + "description": "A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "credit_note" + ], + "type": "string" + }, + "out_of_band_amount": { + "description": "Amount that was credited outside of Stripe.", + "type": [ + "integer", + "null" + ] + }, + "pdf": { + "description": "The link to download the PDF of the credit note.", + "maxLength": 5000, + "type": "string" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory", + null + ], + "type": [ + "string", + "null" + ] + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "Refund related to this credit note.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied to the invoice." + }, + "status": { + "description": "Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).", + "enum": [ + "issued", + "void" + ], + "type": "string" + }, + "subtotal": { + "description": "The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.", + "type": [ + "integer", + "null" + ] + }, + "tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/credit_note_tax_amount" + }, + "type": "array" + }, + "total": { + "description": "The integer amount in %s representing the total amount of the credit note, including tax and all discount.", + "type": "integer" + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.", + "type": [ + "integer", + "null" + ] + }, + "type": { + "description": "Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.", + "enum": [ + "post_payment", + "pre_payment" + ], + "type": "string" + }, + "voided_at": { + "description": "The time that the credit note was voided.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "amount", + "amount_shipping", + "created", + "currency", + "customer", + "discount_amount", + "discount_amounts", + "id", + "invoice", + "lines", + "livemode", + "number", + "object", + "pdf", + "status", + "subtotal", + "tax_amounts", + "total", + "type" + ], + "title": "CreditNote", + "type": "object", + "x-expandableFields": [ + "customer", + "customer_balance_transaction", + "discount_amounts", + "invoice", + "lines", + "refund", + "shipping_cost", + "tax_amounts" + ], + "x-resourceId": "credit_note" + }, + "credit_note_line_item": { + "description": "", + "properties": { + "amount": { + "description": "The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.", + "type": [ + "integer", + "null" + ] + }, + "description": { + "description": "Description of the item being credited.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount_amount": { + "description": "The integer amount in %s representing the discount being credited for this line item.", + "type": "integer" + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "description": "ID of the invoice line item being credited", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "credit_note_line_item" + ], + "type": "string" + }, + "quantity": { + "description": "The number of units of product being credited.", + "type": [ + "integer", + "null" + ] + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/credit_note_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.", + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "description": "The cost of each unit of product being credited.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "discount_amount", + "discount_amounts", + "id", + "livemode", + "object", + "tax_amounts", + "tax_rates", + "type" + ], + "title": "CreditNoteLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "credit_note_line_item" + }, + "credit_note_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate" + ], + "title": "CreditNoteTaxAmount", + "type": "object", + "x-expandableFields": [ + "tax_rate" + ] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "tax_behavior": { + "description": "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "unit_amount": { + "description": "The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": [ + "custom_unit_amount", + "tiers" + ] + }, + "custom_unit_amount": { + "description": "", + "properties": { + "maximum": { + "description": "The maximum unit amount the customer can specify for this item.", + "type": [ + "integer", + "null" + ] + }, + "minimum": { + "description": "The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.", + "type": [ + "integer", + "null" + ] + }, + "preset": { + "description": "The starting unit amount which can be updated by the customer.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [] + }, + "customer": { + "description": "This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.\n\nRelated guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "type": "integer" + }, + "cash_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/cash_balance" + }, + { + "type": "null" + } + ], + "description": "The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source \"cash_balance\". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the customer.\n\nIf you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "delinquent": { + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.\n\nIf an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.", + "type": [ + "boolean", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount active on the customer, if there is one." + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_credit_balance": { + "additionalProperties": { + "type": "integer" + }, + "description": "The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.", + "type": "object" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "invoice_settings": { + "$ref": "#/components/schemas/invoice_setting_customer_setting" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "next_invoice_sequence": { + "description": "The suffix of the customer's next invoice number, e.g., 0001.", + "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, + "type": [ + "string", + "null" + ] + }, + "preferred_locales": { + "description": "The customer's preferred locales (languages), ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer." + }, + "sources": { + "description": "The customer's payment sources, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "tax": { + "$ref": "#/components/schemas/customer_tax" + }, + "tax_exempt": { + "description": "Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **\"Reverse charge\"**.", + "enum": [ + "exempt", + "none", + "reverse", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this customer belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "id", + "livemode", + "object" + ], + "title": "Customer", + "type": "object", + "x-expandableFields": [ + "address", + "cash_balance", + "default_source", + "discount", + "invoice_settings", + "shipping", + "sources", + "subscriptions", + "tax", + "tax_ids", + "test_clock" + ], + "x-resourceId": "customer" + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time at which the customer accepted the Mandate.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "offline": { + "$ref": "#/components/schemas/offline_acceptance" + }, + "online": { + "$ref": "#/components/schemas/online_acceptance" + }, + "type": { + "description": "The type of customer acceptance information included with the Mandate. One of `online` or `offline`.", + "enum": [ + "offline", + "online" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": [ + "offline", + "online" + ] + }, + "customer_balance_customer_balance_settings": { + "description": "", + "properties": { + "reconciliation_mode": { + "description": "The configuration for how funds that land in the customer cash balance are reconciled.", + "enum": [ + "automatic", + "manual" + ], + "type": "string" + }, + "using_merchant_default": { + "description": "A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance", + "type": "boolean" + } + }, + "required": [ + "reconciliation_mode", + "using_merchant_default" + ], + "title": "CustomerBalanceCustomerBalanceSettings", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "payment_intent" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction", + "type": "object", + "x-expandableFields": [ + "payment_intent" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer" + } + }, + "required": [ + "bank_transfer" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer" + }, + "reference": { + "description": "The user-supplied reference field on the bank transfer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer", + "type": "object", + "x-expandableFields": [ + "eu_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, + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "description": "The last 4 digits of the IBAN of the sender of the funding.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction": { + "description": "", + "properties": { + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + } + }, + "required": [ + "refund" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction", + "type": "object", + "x-expandableFields": [ + "refund" + ] + }, + "customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "payment_intent" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction", + "type": "object", + "x-expandableFields": [ + "payment_intent" + ] + }, + "customer_balance_transaction": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,\nwhich denotes a debit or credit that's automatically applied to their next invoice upon finalization.\nYou may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),\nor by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.\n\nRelated guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.", + "properties": { + "amount": { + "description": "The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "credit_note": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/credit_note" + }, + { + "type": "null" + } + ], + "description": "The ID of the credit note (if any) related to the transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/credit_note" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The ID of the customer the transaction belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "ending_balance": { + "description": "The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the invoice (if any) related to the transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer_balance_transaction" + ], + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.", + "enum": [ + "adjustment", + "applied_to_invoice", + "credit_note", + "initial", + "invoice_overpaid", + "invoice_too_large", + "invoice_too_small", + "migration", + "unapplied_from_invoice", + "unspent_receiver_credit" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "object", + "type" + ], + "title": "CustomerBalanceTransaction", + "type": "object", + "x-expandableFields": [ + "credit_note", + "customer", + "invoice" + ], + "x-resourceId": "customer_balance_transaction" + }, + "customer_cash_balance_transaction": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "applied_to_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The customer whose available cash balance changed as a result of this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "ending_balance": { + "description": "The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "funded": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "net_amount": { + "description": "The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer_cash_balance_transaction" + ], + "type": "string" + }, + "refunded_from_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction" + }, + "type": { + "description": "The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.", + "enum": [ + "applied_to_payment", + "funded", + "funding_reversed", + "refunded_from_payment", + "return_canceled", + "return_initiated", + "unapplied_from_payment" + ], + "type": "string" + }, + "unapplied_from_payment": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction" + } + }, + "required": [ + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "net_amount", + "object", + "type" + ], + "title": "CustomerCashBalanceTransaction", + "type": "object", + "x-expandableFields": [ + "applied_to_payment", + "customer", + "funded", + "refunded_from_payment", + "unapplied_from_payment" + ], + "x-resourceId": "customer_cash_balance_transaction" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer_tax_location" + }, + { + "type": "null" + } + ], + "description": "The customer's location as identified by Stripe Tax." + } + }, + "required": [ + "automatic_tax" + ], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": [ + "location" + ] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The customer's country as identified by Stripe Tax.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "The data source used to infer the customer's location.", + "enum": [ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination" + ], + "type": "string" + }, + "state": { + "description": "The customer's state, county, province, or region as identified by Stripe Tax.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "country", + "source" + ], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [] + }, + "deleted_account": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedAccount", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_account" + }, + "deleted_apple_pay_domain": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "apple_pay_domain" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_apple_pay_domain" + }, + "deleted_application": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "application" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [] + }, + "deleted_bank_account": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "bank_account" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "deleted_card": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCard", + "type": "object", + "x-expandableFields": [] + }, + "deleted_coupon": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "coupon" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCoupon", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_coupon" + }, + "deleted_customer": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "customer" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedCustomer", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_customer" + }, + "deleted_discount": { + "description": "", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "coupon", + "deleted", + "id", + "object", + "start" + ], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "deleted_discount" + }, + "deleted_external_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_external_account", + "x-stripeBypassValidation": true + }, + "deleted_invoice": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoice" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedInvoice", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoice" + }, + "deleted_invoiceitem": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoiceitem" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedInvoiceItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoiceitem" + }, + "deleted_payment_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_payment_source", + "x-stripeBypassValidation": true + }, + "deleted_person": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "person" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedPerson", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_person" + }, + "deleted_plan": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "plan" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedPlan", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_plan" + }, + "deleted_price": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "price" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedPrice", + "type": "object", + "x-expandableFields": [] + }, + "deleted_product": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "product" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedProduct", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_product" + }, + "deleted_radar.value_list": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "RadarListDeletedList", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list" + }, + "deleted_radar.value_list_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list_item" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "RadarListDeletedListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list_item" + }, + "deleted_subscription_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_item" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedSubscriptionItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_subscription_item" + }, + "deleted_tax_id": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_id" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "deleted_tax_id", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_tax_id" + }, + "deleted_terminal.configuration": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.configuration" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "TerminalConfigurationDeletedConfiguration", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.configuration" + }, + "deleted_terminal.location": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.location" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "TerminalLocationDeletedLocation", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.location" + }, + "deleted_terminal.reader": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.reader" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "TerminalReaderDeletedReader", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.reader" + }, + "deleted_test_helpers.test_clock": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "test_helpers.test_clock" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "DeletedTestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_test_helpers.test_clock" + }, + "deleted_webhook_endpoint": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [ + true + ], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "webhook_endpoint" + ], + "type": "string" + } + }, + "required": [ + "deleted", + "id", + "object" + ], + "title": "NotificationWebhookEndpointDeleted", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_webhook_endpoint" + }, + "discount": { + "description": "A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "end": { + "description": "If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "discount" + ], + "type": "string" + }, + "promotion_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "coupon", + "id", + "object", + "start" + ], + "title": "Discount", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "promotion_code" + ], + "x-resourceId": "discount" + }, + "discounts_resource_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the discount.", + "type": "integer" + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + } + }, + "required": [ + "amount", + "discount" + ], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "dispute": { + "description": "A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you're given the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate. You can find more\ninformation about the dispute process in our [Disputes and\nFraud](/docs/disputes) documentation.\n\nRelated guide: [Disputes and Fraud](https://stripe.com/docs/disputes).", + "properties": { + "amount": { + "description": "Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/dispute_evidence" + }, + "evidence_details": { + "$ref": "#/components/schemas/dispute_evidence_details" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_charge_refundable": { + "description": "If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "dispute" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.", + "enum": [ + "charge_refunded", + "lost", + "needs_response", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string" + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent" + ], + "x-resourceId": "dispute" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "billing_address": { + "description": "The billing address provided by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cancellation_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cancellation_policy_disclosure": { + "description": "An explanation of how and when the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "cancellation_rebuttal": { + "description": "A justification for why the customer's subscription was not canceled.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "customer_communication": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_name": { + "description": "The name of the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer_signature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "duplicate_charge_explanation": { + "description": "An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "duplicate_charge_id": { + "description": "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "refund_policy_disclosure": { + "description": "Documentation demonstrating that the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "refund_refusal_explanation": { + "description": "A justification for why the customer is not entitled to a refund.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + }, + "service_date": { + "description": "The date on which the customer received or began receiving the purchased service, in a clear human-readable format.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "service_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_address": { + "description": "The address to which a physical product was shipped. You should try to include as complete address information as possible.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "shipping_tracking_number": { + "description": "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "uncategorized_file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "type": [ + "string", + "null" + ] + } + }, + "title": "DisputeEvidence", + "type": "object", + "x-expandableFields": [ + "cancellation_policy", + "customer_communication", + "customer_signature", + "duplicate_charge_documentation", + "receipt", + "refund_policy", + "service_documentation", + "shipping_documentation", + "uncategorized_file" + ] + }, + "dispute_evidence_details": { + "description": "", + "properties": { + "due_by": { + "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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": [ + "has_evidence", + "past_due", + "submission_count" + ], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": [] + }, + "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": [] + }, + "ephemeral_key": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires": { + "description": "Time at which the key will expire. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "ephemeral_key" + ], + "type": "string" + }, + "secret": { + "description": "The key's secret. You can use this value to make authorized requests to the Stripe API.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "expires", + "id", + "livemode", + "object" + ], + "title": "EphemeralKey", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "ephemeral_key" + }, + "error": { + "description": "An error response from the Stripe API", + "properties": { + "error": { + "$ref": "#/components/schemas/api_errors" + } + }, + "required": [ + "error" + ], + "type": "object" + }, + "event": { + "description": "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent; and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a `charge.succeeded` event will contain a charge, and an\n`invoice.payment_failed` event will contain an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. Webhooks are managed\nin your\n[account settings](https://dashboard.stripe.com/account/webhooks),\nand our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional `account` attribute in the received `Event` object.\n\n**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is\nguaranteed only for 30 days.", + "properties": { + "account": { + "description": "The connected account that originated the event.", + "maxLength": 5000, + "type": "string" + }, + "api_version": { + "description": "The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data": { + "$ref": "#/components/schemas/notification_event_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "event" + ], + "type": "string" + }, + "pending_webhooks": { + "description": "Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.", + "type": "integer" + }, + "request": { + "anyOf": [ + { + "$ref": "#/components/schemas/notification_event_request" + }, + { + "type": "null" + } + ], + "description": "Information on the API request that instigated the event." + }, + "type": { + "description": "Description of the event (e.g., `invoice.created` or `charge.refunded`).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data", + "id", + "livemode", + "object", + "pending_webhooks", + "type" + ], + "title": "NotificationEvent", + "type": "object", + "x-expandableFields": [ + "data", + "request" + ], + "x-resourceId": "event" + }, + "exchange_rate": { + "description": "`Exchange Rate` objects allow you to determine the rates that Stripe is\ncurrently using to convert from one currency to another. Since this number is\nvariable throughout the day, there are various reasons why you might want to\nknow the current rate (for example, to dynamically price an item for a user\nwith a default payment in a foreign currency).\n\nIf you want a guarantee that the charge is made with a certain exchange rate\nyou expect is current, you can pass in `exchange_rate` to charges endpoints.\nIf the value is no longer up to date, the charge won't go through. Please\nrefer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more\ndetails.", + "properties": { + "id": { + "description": "Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "exchange_rate" + ], + "type": "string" + }, + "rates": { + "additionalProperties": { + "type": "number" + }, + "description": "Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.", + "type": "object" + } + }, + "required": [ + "id", + "object", + "rates" + ], + "title": "ExchangeRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "exchange_rate" + }, + "external_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-resourceId": "external_account", + "x-stripeBypassValidation": true + }, + "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, + "type": [ + "string", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "type" + ], + "title": "Fee", + "type": "object", + "x-expandableFields": [] + }, + "fee_refund": { + "description": "`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application_fee" + } + ], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application_fee" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "fee_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "fee", + "id", + "object" + ], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "fee" + ], + "x-resourceId": "fee_refund" + }, + "file": { + "description": "This is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File Upload Guide](https://stripe.com/docs/file-upload).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The time at which the file expires and is no longer available in epoch seconds.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "filename": { + "description": "A filename for the file, suitable for saving to a filesystem.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "links": { + "description": "A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileLinkList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file" + ], + "type": "string" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "size": { + "description": "The size in bytes of the file object.", + "type": "integer" + }, + "title": { + "description": "A user friendly title for the document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL from which the file can be downloaded using your live secret API key.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "id", + "object", + "purpose", + "size" + ], + "title": "File", + "type": "object", + "x-expandableFields": [ + "links" + ], + "x-resourceId": "file" + }, + "file_link": { + "description": "To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that can be used 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": "Whether this link is already expired.", + "type": "boolean" + }, + "expires_at": { + "description": "Time at which the link expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "The file object this link points to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "file_link" + ], + "type": "string" + }, + "url": { + "description": "The publicly accessible URL to download the file.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "expired", + "file", + "id", + "livemode", + "metadata", + "object" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": [ + "file" + ], + "x-resourceId": "file_link" + }, + "financial_connections.account": { + "description": "A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_accountholder" + }, + { + "type": "null" + } + ], + "description": "The account holder that this account belongs to." + }, + "balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_balance" + }, + { + "type": "null" + } + ], + "description": "The most recent information about the account's balance." + }, + "balance_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_balance_refresh" + }, + { + "type": "null" + } + ], + "description": "The state of the most recent attempt to refresh the account balance." + }, + "category": { + "description": "The type of the account. Account category is further divided in `subcategory`.", + "enum": [ + "cash", + "credit", + "investment", + "other" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "display_name": { + "description": "A human-readable name that has been assigned to this account, either by the account holder or by the institution.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "institution_name": { + "description": "The name of the institution that holds this account.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the account number. If present, this will be 4 numeric characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.account" + ], + "type": "string" + }, + "ownership": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/financial_connections.account_ownership" + }, + { + "type": "null" + } + ], + "description": "The most recent information about the account's owners.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/financial_connections.account_ownership" + } + ] + } + }, + "ownership_refresh": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_ownership_refresh" + }, + { + "type": "null" + } + ], + "description": "The state of the most recent attempt to refresh the account owners." + }, + "permissions": { + "description": "The list of permissions granted by this account.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "status": { + "description": "The status of the link to the account.", + "enum": [ + "active", + "disconnected", + "inactive" + ], + "type": "string" + }, + "subcategory": { + "description": "If `category` is `cash`, one of:\n\n - `checking`\n - `savings`\n - `other`\n\nIf `category` is `credit`, one of:\n\n - `mortgage`\n - `line_of_credit`\n - `credit_card`\n - `other`\n\nIf `category` is `investment` or `other`, this will be `other`.", + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "other", + "savings" + ], + "type": "string" + }, + "supported_payment_method_types": { + "description": "The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.", + "items": { + "enum": [ + "link", + "us_bank_account" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "category", + "created", + "id", + "institution_name", + "livemode", + "object", + "status", + "subcategory", + "supported_payment_method_types" + ], + "title": "BankConnectionsResourceLinkedAccount", + "type": "object", + "x-expandableFields": [ + "account_holder", + "balance", + "balance_refresh", + "ownership", + "ownership_refresh" + ], + "x-resourceId": "financial_connections.account" + }, + "financial_connections.account_owner": { + "description": "", + "properties": { + "email": { + "description": "The email address of the owner.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The full name of the owner.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.account_owner" + ], + "type": "string" + }, + "ownership": { + "description": "The ownership object that this owner belongs to.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The raw phone number of the owner.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "raw_address": { + "description": "The raw physical address of the owner.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "refreshed_at": { + "description": "The timestamp of the refresh that updated this owner.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "id", + "name", + "object", + "ownership" + ], + "title": "BankConnectionsResourceOwner", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "financial_connections.account_owner" + }, + "financial_connections.account_ownership": { + "description": "Describes a snapshot of the owners of an account at a particular point in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.account_ownership" + ], + "type": "string" + }, + "owners": { + "description": "A paginated list of owners for this account.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + }, + "required": [ + "created", + "id", + "object", + "owners" + ], + "title": "BankConnectionsResourceOwnership", + "type": "object", + "x-expandableFields": [ + "owners" + ] + }, + "financial_connections.session": { + "description": "A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_connections_resource_accountholder" + }, + { + "type": "null" + } + ], + "description": "The account holder for whom accounts are collected in this session." + }, + "accounts": { + "description": "The accounts that were collected as part of this Session.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "client_secret": { + "description": "A value that will be passed to the client to launch the authentication flow.", + "maxLength": 5000, + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/bank_connections_resource_link_account_session_filters" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "financial_connections.session" + ], + "type": "string" + }, + "permissions": { + "description": "Permissions requested for accounts collected during this session.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "accounts", + "client_secret", + "id", + "livemode", + "object", + "permissions" + ], + "title": "BankConnectionsResourceLinkAccountSession", + "type": "object", + "x-expandableFields": [ + "account_holder", + "accounts", + "filters" + ], + "x-resourceId": "financial_connections.session" + }, + "financial_reporting_finance_report_run_run_parameters": { + "description": "", + "properties": { + "columns": { + "description": "The set of output columns requested for inclusion in the report run.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "description": "Connected account ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Currency of objects to be included in the report run.", + "type": "string" + }, + "interval_end": { + "description": "Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value.", + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "description": "Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value.", + "format": "unix-time", + "type": "integer" + }, + "payout": { + "description": "Payout ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "reporting_category": { + "description": "Category of balance transactions to be included in the report run.", + "maxLength": 5000, + "type": "string" + }, + "timezone": { + "description": "Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "FinancialReportingFinanceReportRunRunParameters", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is\nautomatically applied to future invoices and payments using the `customer_balance` payment method.\nCustomers can fund this balance by initiating a bank transfer to any account in the\n`financial_addresses` field.\nRelated guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "funding_type": { + "description": "The `funding_type` of the returned instructions", + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "funding_instructions" + ], + "type": "string" + } + }, + "required": [ + "bank_transfer", + "currency", + "funding_type", + "livemode", + "object" + ], + "title": "CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ], + "x-resourceId": "funding_instructions" + }, + "funding_instructions_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The country of the bank account to fund", + "maxLength": 5000, + "type": "string" + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund a particular balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "type": { + "description": "The bank_transfer type", + "enum": [ + "eu_bank_transfer", + "jp_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "country", + "financial_addresses", + "type" + ], + "title": "FundingInstructionsBankTransfer", + "type": "object", + "x-expandableFields": [ + "financial_addresses" + ] + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "iban": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_iban_record" + }, + "sort_code": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_sort_code_record" + }, + "spei": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_spei_record" + }, + "supported_networks": { + "description": "The payment networks supported by this FinancialAddress", + "items": { + "enum": [ + "bacs", + "fps", + "sepa", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": [ + "iban", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "zengin": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_zengin_record" + } + }, + "required": [ + "type" + ], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": [ + "iban", + "sort_code", + "spei", + "zengin" + ] + }, + "funding_instructions_bank_transfer_iban_record": { + "description": "Iban Records contain E.U. bank account details per the SEPA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "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_name", + "bic", + "country", + "iban" + ], + "title": "FundingInstructionsBankTransferIbanRecord", + "type": "object", + "x-expandableFields": [] + }, + "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_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" + }, + "sort_code": { + "description": "The six-digit sort code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number", + "sort_code" + ], + "title": "FundingInstructionsBankTransferSortCodeRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "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": [ + "bank_code", + "bank_name", + "clabe" + ], + "title": "FundingInstructionsBankTransferSpeiRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "The bank account type. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_code": { + "description": "The bank code of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "The bank name of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "The branch code of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_name": { + "description": "The branch name of the account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_date_of_birth": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "GelatoDataDocumentReportDateOfBirth", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_expiration_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "GelatoDataDocumentReportExpirationDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_issued_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "GelatoDataDocumentReportIssuedDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_id_number_report_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "GelatoDataIdNumberReportDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_verified_outputs_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "GelatoDataVerifiedOutputsDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_document_report": { + "description": "Result from a document check", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Address as it appears in the document." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_date_of_birth" + }, + { + "type": "null" + } + ], + "description": "Date of birth as it appears in the document." + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_document_report_error" + }, + { + "type": "null" + } + ], + "description": "Details on the verification error. Present when status is `unverified`." + }, + "expiration_date": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_expiration_date" + }, + { + "type": "null" + } + ], + "description": "Expiration date of the document." + }, + "files": { + "description": "Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "first_name": { + "description": "First name as it appears in the document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "issued_date": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_document_report_issued_date" + }, + { + "type": "null" + } + ], + "description": "Issued date of the document." + }, + "issuing_country": { + "description": "Issuing country of the document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name": { + "description": "Last name as it appears in the document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "Document ID number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Status of this `document` check.", + "enum": [ + "unverified", + "verified" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "Type of the document.", + "enum": [ + "driving_license", + "id_card", + "passport", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "status" + ], + "title": "GelatoDocumentReport", + "type": "object", + "x-expandableFields": [ + "address", + "dob", + "error", + "expiration_date", + "issued_date" + ] + }, + "gelato_document_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "document_expired", + "document_type_not_supported", + "document_unverified_other", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "GelatoDocumentReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_id_number_report": { + "description": "Result from an id_number check", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_id_number_report_date" + }, + { + "type": "null" + } + ], + "description": "Date of birth." + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_id_number_report_error" + }, + { + "type": "null" + } + ], + "description": "Details on the verification error. Present when status is `unverified`." + }, + "first_name": { + "description": "First name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id_number": { + "description": "ID number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id_number_type": { + "description": "Type of ID number.", + "enum": [ + "br_cpf", + "sg_nric", + "us_ssn", + null + ], + "type": [ + "string", + "null" + ] + }, + "last_name": { + "description": "Last name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Status of this `id_number` check.", + "enum": [ + "unverified", + "verified" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "status" + ], + "title": "GelatoIdNumberReport", + "type": "object", + "x-expandableFields": [ + "dob", + "error" + ] + }, + "gelato_id_number_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + null + ], + "type": [ + "string", + "null" + ] + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "GelatoIdNumberReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.", + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).", + "type": "boolean" + } + }, + "title": "GelatoReportDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoReportIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_selfie_report": { + "description": "Result from a selfie check", + "properties": { + "document": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_selfie_report_error" + }, + { + "type": "null" + } + ], + "description": "Details on the verification error. Present when status is `unverified`." + }, + "selfie": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Status of this `selfie` check.", + "enum": [ + "unverified", + "verified" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "status" + ], + "title": "GelatoSelfieReport", + "type": "object", + "x-expandableFields": [ + "error" + ] + }, + "gelato_selfie_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + null + ], + "type": [ + "string", + "null" + ] + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "GelatoSelfieReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.", + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).", + "type": "boolean" + } + }, + "title": "GelatoSessionDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoSessionIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_last_error": { + "description": "Shows last VerificationSession error", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification or user-session failure.", + "enum": [ + "abandoned", + "consent_declined", + "country_not_supported", + "device_not_supported", + "document_expired", + "document_type_not_supported", + "document_unverified_other", + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + "under_supported_age", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A message that explains the reason for verification or user-session failure.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "GelatoSessionLastError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_verification_report_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/gelato_report_document_options" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_report_id_number_options" + } + }, + "title": "GelatoVerificationReportOptions", + "type": "object", + "x-expandableFields": [ + "document", + "id_number" + ] + }, + "gelato_verification_session_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/gelato_session_document_options" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_session_id_number_options" + } + }, + "title": "GelatoVerificationSessionOptions", + "type": "object", + "x-expandableFields": [ + "document", + "id_number" + ] + }, + "gelato_verified_outputs": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The user's verified address." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_data_verified_outputs_date" + }, + { + "type": "null" + } + ], + "description": "The user’s verified date of birth." + }, + "first_name": { + "description": "The user's verified first name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id_number": { + "description": "The user's verified id number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id_number_type": { + "description": "The user's verified id number type.", + "enum": [ + "br_cpf", + "sg_nric", + "us_ssn", + null + ], + "type": [ + "string", + "null" + ] + }, + "last_name": { + "description": "The user's verified last name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "GelatoVerifiedOutputs", + "type": "object", + "x-expandableFields": [ + "address", + "dob" + ] + }, + "identity.verification_report": { + "description": "A VerificationReport is the result of an attempt to collect and verify data from a user.\nThe collection of verification checks performed is determined from the `type` and `options`\nparameters used. You can find the result of each verification check performed in the\nappropriate sub-resource: `document`, `id_number`, `selfie`.\n\nEach VerificationReport contains a copy of any data collected by the user as well as\nreference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)\nAPI. To configure and create VerificationReports, use the\n[VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.\n\nRelated guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "document": { + "$ref": "#/components/schemas/gelato_document_report" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number": { + "$ref": "#/components/schemas/gelato_id_number_report" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "identity.verification_report" + ], + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/gelato_verification_report_options" + }, + "selfie": { + "$ref": "#/components/schemas/gelato_selfie_report" + }, + "type": { + "description": "Type of report.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "verification_session": { + "description": "ID of the VerificationSession that created this report.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "options", + "type" + ], + "title": "GelatoVerificationReport", + "type": "object", + "x-expandableFields": [ + "document", + "id_number", + "options", + "selfie" + ], + "x-resourceId": "identity.verification_report" + }, + "identity.verification_session": { + "description": "A VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what [verification\ncheck](/docs/identity/verification-checks) to perform. Only create one VerificationSession for\neach verification in your system.\n\nA VerificationSession transitions through [multiple\nstatuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user's verified data after\nverification checks are complete.\n\nRelated guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)", + "properties": { + "client_secret": { + "description": "The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_session_last_error" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you the last error encountered when processing the verification." + }, + "last_verification_report": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/identity.verification_report" + }, + { + "type": "null" + } + ], + "description": "ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/identity.verification_report" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "identity.verification_session" + ], + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/gelato_verification_session_options" + }, + "redaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/verification_session_redaction" + }, + { + "type": "null" + } + ], + "description": "Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null." + }, + "status": { + "description": "Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "enum": [ + "canceled", + "processing", + "requires_input", + "verified" + ], + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "url": { + "description": "The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_outputs": { + "anyOf": [ + { + "$ref": "#/components/schemas/gelato_verified_outputs" + }, + { + "type": "null" + } + ], + "description": "The user’s verified data." + } + }, + "required": [ + "created", + "id", + "livemode", + "metadata", + "object", + "options", + "status", + "type" + ], + "title": "GelatoVerificationSession", + "type": "object", + "x-expandableFields": [ + "last_error", + "last_verification_report", + "options", + "redaction", + "verified_outputs" + ], + "x-resourceId": "identity.verification_session" + }, + "inbound_transfers": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the InboundTransfer.", + "enum": [ + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/inbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "InboundTransfers", + "type": "object", + "x-expandableFields": [ + "billing_details", + "us_bank_account" + ] + }, + "inbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "The US bank account network used to debit funds.", + "enum": [ + "ach" + ], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "network" + ], + "title": "inbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "invoice": { + "description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).", + "properties": { + "account_country": { + "description": "The country of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_name": { + "description": "The public name of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "amount_due": { + "description": "Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "type": "integer" + }, + "amount_paid": { + "description": "The amount, in %s, that was paid.", + "type": "integer" + }, + "amount_remaining": { + "description": "The difference between amount_due and amount_paid, in %s.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.", + "type": [ + "integer", + "null" + ] + }, + "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.", + "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 will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "$ref": "#/components/schemas/automatic_tax" + }, + "billing_reason": { + "description": "Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming", + null + ], + "type": [ + "string", + "null" + ] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the latest charge generated for this invoice, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer who will be billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "customer_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "customer_shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "customer_tax_ids": { + "description": "The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.", + "items": { + "$ref": "#/components/schemas/invoices_resource_invoice_tax_id" + }, + "type": [ + "array", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts." + }, + "discounts": { + "description": "The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "$ref": "#/components/schemas/deleted_discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "from_invoice": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_from_invoice" + }, + { + "type": "null" + } + ], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.", + "maxLength": 5000, + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_finalization_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized." + }, + "latest_revision": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the most recent non-draft revision of this invoice", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "lines": { + "description": "The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoice" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "payment_settings": { + "$ref": "#/components/schemas/invoices_payment_settings" + }, + "period_end": { + "description": "End of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "Start of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "post_payment_credit_notes_amount": { + "description": "Total amount of all post-payment credit notes issued for this invoice.", + "type": "integer" + }, + "pre_payment_credit_notes_amount": { + "description": "Total amount of all pre-payment credit notes issued for this invoice.", + "type": "integer" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + }, + { + "type": "null" + } + ], + "description": "The quote this invoice was generated from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied on the invoice." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void", + null + ], + "type": [ + "string", + "null" + ] + }, + "status_transitions": { + "$ref": "#/components/schemas/invoices_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that this invoice was prepared for, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "type": "integer" + }, + "subtotal": { + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated", + "type": [ + "integer", + "null" + ] + }, + "tax": { + "description": "The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.", + "type": [ + "integer", + "null" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this invoice belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "threshold_reason": { + "$ref": "#/components/schemas/invoice_threshold_reason" + }, + "total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "total_discount_amounts": { + "description": "The aggregate amounts calculated per discount across all line items.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": [ + "array", + "null" + ] + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.", + "type": [ + "integer", + "null" + ] + }, + "total_tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice." + }, + "webhooks_delivered_at": { + "description": "Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "amount_due", + "amount_paid", + "amount_remaining", + "amount_shipping", + "attempt_count", + "attempted", + "automatic_tax", + "collection_method", + "created", + "currency", + "default_tax_rates", + "lines", + "livemode", + "object", + "paid", + "paid_out_of_band", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "starting_balance", + "status_transitions", + "subtotal", + "total", + "total_tax_amounts" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "charge", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "from_invoice", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "payment_intent", + "payment_settings", + "quote", + "rendering_options", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_tax_amounts", + "transfer_data" + ], + "x-resourceId": "invoice" + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_item_threshold_reason": { + "description": "", + "properties": { + "line_item_ids": { + "description": "The IDs of the line items that triggered the threshold invoice.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "usage_gte": { + "description": "The quantity threshold boundary that applied to the given line item.", + "type": "integer" + } + }, + "required": [ + "line_item_ids", + "usage_gte" + ], + "title": "InvoiceItemThresholdReason", + "type": "object", + "x-expandableFields": [] + }, + "invoice_line_item_period": { + "description": "", + "properties": { + "end": { + "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.", + "format": "unix-time", + "type": "integer" + }, + "start": { + "description": "The start of the period. This value is inclusive.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "InvoiceLineItemPeriod", + "type": "object", + "x-expandableFields": [] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": [ + "integer", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "invoice_payment_method_options_acss_debit_mandate_options": { + "description": "", + "properties": { + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "invoice_payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { + "$ref": "#/components/schemas/invoice_installments_card" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer" + }, + "type": { + "description": "The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.", + "type": [ + "string", + "null" + ] + } + }, + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": [ + "balances", + "payment_method", + "transactions" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_custom_field": { + "description": "", + "properties": { + "name": { + "description": "The name of the custom field.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value of the custom field.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "InvoiceSettingCustomField", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Default options for invoice PDF rendering for this customer." + } + }, + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": [ + "custom_fields", + "default_payment_method", + "rendering_options" + ] + }, + "invoice_setting_quote_setting": { + "description": "", + "properties": { + "days_until_due": { + "description": "Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoiceSettingQuoteSetting", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_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, + "type": [ + "string", + "null" + ] + } + }, + "title": "InvoiceSettingRenderingOptions", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_subscription_schedule_setting": { + "description": "", + "properties": { + "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`.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": [] + }, + "invoice_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate" + ], + "title": "InvoiceTaxAmount", + "type": "object", + "x-expandableFields": [ + "tax_rate" + ] + }, + "invoice_threshold_reason": { + "description": "", + "properties": { + "amount_gte": { + "description": "The total invoice amount threshold boundary if it triggered the threshold invoice.", + "type": [ + "integer", + "null" + ] + }, + "item_reasons": { + "description": "Indicates which line items triggered a threshold invoice.", + "items": { + "$ref": "#/components/schemas/invoice_item_threshold_reason" + }, + "type": "array" + } + }, + "required": [ + "item_reasons" + ], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": [ + "item_reasons" + ] + }, + "invoice_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "InvoiceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "invoiceitem": { + "description": "Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an\ninvoice by creating or updating it with an `invoice` field, at which point it will be included as\n[an invoice line item](https://stripe.com/docs/api/invoices/line_item) within\n[invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).\n\nInvoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined\nwith a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge\nor credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges\n(to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.\n\nRelated guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).", + "properties": { + "amount": { + "description": "Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "date": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discountable": { + "description": "If true, discounts will apply to this invoice item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the invoice this invoice item belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "invoiceitem" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price of the invoice item." + }, + "proration": { + "description": "Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.", + "type": "boolean" + }, + "quantity": { + "description": "Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.", + "type": "integer" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that this invoice item has been created for, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_item": { + "description": "The subscription item that this invoice item has been created for, if any.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this invoice item belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "unit_amount": { + "description": "Unit amount (in the `currency` specified) of the invoice item.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "currency", + "customer", + "date", + "discountable", + "id", + "livemode", + "object", + "period", + "proration", + "quantity" + ], + "title": "InvoiceItem", + "type": "object", + "x-expandableFields": [ + "customer", + "discounts", + "invoice", + "period", + "price", + "subscription", + "tax_rates", + "test_clock" + ], + "x-resourceId": "invoiceitem" + }, + "invoices_from_invoice": { + "description": "", + "properties": { + "action": { + "description": "The relation between this invoice and the cloned invoice", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + } + ], + "description": "The invoice that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + } + }, + "required": [ + "action", + "invoice" + ], + "title": "InvoicesFromInvoice", + "type": "object", + "x-expandableFields": [ + "invoice" + ] + }, + "invoices_line_items_credited_items": { + "description": "", + "properties": { + "invoice": { + "description": "Invoice containing the credited invoice line items", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_items": { + "description": "Credited invoice line items", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "invoice", + "invoice_line_items" + ], + "title": "InvoicesLineItemsCreditedItems", + "type": "object", + "x-expandableFields": [] + }, + "invoices_line_items_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_credited_items" + }, + { + "type": "null" + } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies." + } + }, + "title": "InvoicesLineItemsProrationDetails", + "type": "object", + "x-expandableFields": [ + "credited_items" + ] + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "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." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent." + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "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." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "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, + "type": [ + "string", + "null" + ] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "invoices_resource_invoice_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type" + ], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [] + }, + "invoices_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "InvoicesShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "invoices_status_transitions": { + "description": "", + "properties": { + "finalized_at": { + "description": "The time that the invoice draft was finalized.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "marked_uncollectible_at": { + "description": "The time that the invoice was marked uncollectible.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "paid_at": { + "description": "The time that the invoice was paid.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "voided_at": { + "description": "The time that the invoice was voided.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "InvoicesStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "issuing.authorization": { + "description": "When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).", + "properties": { + "amount": { + "description": "The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether the authorization has been approved.", + "type": "boolean" + }, + "authorization_method": { + "description": "How the card details were provided.", + "enum": [ + "chip", + "contactless", + "keyed_in", + "online", + "swipe" + ], + "type": "string" + }, + "balance_transactions": { + "description": "List of balance transactions associated with this authorization.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "card": { + "$ref": "#/components/schemas/issuing.card" + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this authorization belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "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).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was 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).", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_network_data" + }, + { + "type": "null" + } + ], + "description": "Details about the authorization, such as identifiers, set by the card network." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.authorization" + ], + "type": "string" + }, + "pending_request": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_pending_request" + }, + { + "type": "null" + } + ], + "description": "The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook." + }, + "request_history": { + "description": "History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.", + "items": { + "$ref": "#/components/schemas/issuing_authorization_request" + }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": [ + "closed", + "pending", + "reversed" + ], + "type": "string" + }, + "transactions": { + "description": "List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.", + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts)." + }, + "verification_data": { + "$ref": "#/components/schemas/issuing_authorization_verification_data" + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "approved", + "authorization_method", + "balance_transactions", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "request_history", + "status", + "transactions", + "verification_data" + ], + "title": "IssuingAuthorization", + "type": "object", + "x-expandableFields": [ + "amount_details", + "balance_transactions", + "card", + "cardholder", + "merchant_data", + "network_data", + "pending_request", + "request_history", + "transactions", + "treasury", + "verification_data" + ], + "x-resourceId": "issuing.authorization" + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) 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", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "cardholder": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.", + "type": "string" + }, + "cvc": { + "description": "The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "The expiration month of the card.", + "type": "integer" + }, + "exp_year": { + "description": "The expiration year of the card.", + "type": "integer" + }, + "financial_account": { + "description": "The financial account this card is attached to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the card number.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.card" + ], + "type": "string" + }, + "replaced_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The latest card that replaces this card, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_for": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The card this card replaces, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "replacement_reason": { + "description": "The reason why the previous card needed to be replaced.", + "enum": [ + "damaged", + "expired", + "lost", + "stolen", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping" + }, + { + "type": "null" + } + ], + "description": "Where and how the card will be shipped." + }, + "spending_controls": { + "$ref": "#/components/schemas/issuing_card_authorization_controls" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "The type of the card.", + "enum": [ + "physical", + "virtual" + ], + "type": "string" + }, + "wallets": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_wallets" + }, + { + "type": "null" + } + ], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay)." + } + }, + "required": [ + "brand", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "livemode", + "metadata", + "object", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card" + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)", + "properties": { + "billing": { + "$ref": "#/components/schemas/issuing_cardholder_address" + }, + "company": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_company" + }, + { + "type": "null" + } + ], + "description": "Additional information about a `company` cardholder." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual" + }, + { + "type": "null" + } + ], + "description": "Additional information about an `individual` cardholder." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.cardholder" + ], + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "requirements": { + "$ref": "#/components/schemas/issuing_cardholder_requirements" + }, + "spending_controls": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_authorization_controls" + }, + { + "type": "null" + } + ], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details." + }, + "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`.", + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "created", + "id", + "livemode", + "metadata", + "name", + "object", + "requirements", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder" + }, + "issuing.dispute": { + "description": "As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.\n\nRelated guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of balance transactions associated with the dispute.", + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": [ + "array", + "null" + ] + }, + "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.", + "type": "string" + }, + "evidence": { + "$ref": "#/components/schemas/issuing_dispute_evidence" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.dispute" + ], + "type": "string" + }, + "status": { + "description": "Current status of the dispute.", + "enum": [ + "expired", + "lost", + "submitted", + "unsubmitted", + "won" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.transaction" + } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.transaction" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_dispute_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + } + }, + "required": [ + "amount", + "created", + "currency", + "evidence", + "id", + "livemode", + "metadata", + "object", + "status", + "transaction" + ], + "title": "IssuingDispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "evidence", + "transaction", + "treasury" + ], + "x-resourceId": "issuing.dispute" + }, + "issuing.settlement": { + "description": "When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object.", + "properties": { + "bin": { + "description": "The Bank Identification Number reflecting this settlement record.", + "maxLength": 5000, + "type": "string" + }, + "clearing_date": { + "description": "The date that the transactions are cleared and posted to user's accounts.", + "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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interchange_fees": { + "description": "The total interchange received as reimbursement for the transactions.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "net_total": { + "description": "The total net amount required to settle with the network.", + "type": "integer" + }, + "network": { + "description": "The card network for this settlement report. One of [\"visa\"]", + "enum": [ + "visa" + ], + "type": "string" + }, + "network_fees": { + "description": "The total amount of fees owed to the network.", + "type": "integer" + }, + "network_settlement_identifier": { + "description": "The Settlement Identification Number assigned by the network.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.settlement" + ], + "type": "string" + }, + "settlement_service": { + "description": "One of `international` or `uk_national_net`.", + "maxLength": 5000, + "type": "string" + }, + "transaction_count": { + "description": "The total number of transactions reflected in this settlement.", + "type": "integer" + }, + "transaction_volume": { + "description": "The total transaction amount reflected in this settlement.", + "type": "integer" + } + }, + "required": [ + "bin", + "clearing_date", + "created", + "currency", + "id", + "interchange_fees", + "livemode", + "metadata", + "net_total", + "network", + "network_fees", + "network_settlement_identifier", + "object", + "settlement_service", + "transaction_count", + "transaction_volume" + ], + "title": "IssuingSettlement", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "issuing.settlement" + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).", + "properties": { + "amount": { + "description": "The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "authorization": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.authorization" + }, + { + "type": "null" + } + ], + "description": "The `Authorization` object that led to this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.authorization" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.card" + } + ], + "description": "The card used to make this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.card" + } + ] + } + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this transaction belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.cardholder" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "dispute": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/issuing.dispute" + }, + { + "type": "null" + } + ], + "description": "If you've disputed the transaction, the ID of the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/issuing.dispute" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency with which the merchant is taking payment.", + "type": "string" + }, + "merchant_data": { + "$ref": "#/components/schemas/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "issuing.transaction" + ], + "type": "string" + }, + "purchase_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_purchase_details" + }, + { + "type": "null" + } + ], + "description": "Additional purchase information that is optionally provided by the merchant." + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "type" + ], + "title": "IssuingTransaction", + "type": "object", + "x-expandableFields": [ + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "dispute", + "merchant_data", + "purchase_details", + "treasury" + ], + "x-resourceId": "issuing.transaction" + }, + "issuing_authorization_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.", + "maxLength": 5000, + "type": "string" + }, + "category_code": { + "description": "The merchant category code for the seller’s business", + "maxLength": 5000, + "type": "string" + }, + "city": { + "description": "City where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Country where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the seller", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "State where the seller is located", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "category", + "category_code", + "network_id" + ], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_network_data": { + "description": "", + "properties": { + "acquiring_institution_id": { + "description": "Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_pending_request": { + "description": "", + "properties": { + "amount": { + "description": "The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "is_amount_controllable": { + "description": "If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The local currency the merchant is requesting to authorize.", + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "issuing_authorization_request": { + "description": "", + "properties": { + "amount": { + "description": "The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether this request was approved.", + "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).", + "maxLength": 5000, + "type": "string" + }, + "merchant_amount": { + "description": "The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "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_inactive", + "cardholder_inactive", + "cardholder_verification_required", + "insufficient_funds", + "not_allowed", + "spending_controls", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason_message": { + "description": "If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "approved", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "reason" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": [ + "amount_details" + ] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "received_credits", + "received_debits" + ], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_verification_data": { + "description": "", + "properties": { + "address_line1_check": { + "description": "Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.", + "enum": [ + "match", + "mismatch", + "not_provided" + ], + "type": "string" + }, + "address_postal_code_check": { + "description": "Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.", + "enum": [ + "match", + "mismatch", + "not_provided" + ], + "type": "string" + }, + "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" + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "cvc_check", + "expiry_check" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": [] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).", + "items": { + "$ref": "#/components/schemas/issuing_card_spending_limit" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`. Always the same as the currency of the card.", + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_card_google_pay": { + "description": "", + "properties": { + "eligible": { + "description": "Google Pay Eligibility", + "type": "boolean" + }, + "ineligible_reason": { + "description": "Reason the card is ineligible for Google Pay", + "enum": [ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "eligible" + ], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery company that shipped a card.", + "enum": [ + "dhl", + "fedex", + "royal_mail", + "usps", + null + ], + "type": [ + "string", + "null" + ] + }, + "customs": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_card_shipping_customs" + }, + { + "type": "null" + } + ], + "description": "Additional information that may be required for clearing customs." + }, + "eta": { + "description": "A unix timestamp representing a best estimate of when the card will be delivered.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tracking_number": { + "description": "A tracking number for a card shipment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tracking_url": { + "description": "A link to the shipping carrier's site where you can view detailed information about a card shipment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Packaging options.", + "enum": [ + "bulk", + "individual" + ], + "type": "string" + } + }, + "required": [ + "address", + "name", + "service", + "type" + ], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": [ + "address", + "customs" + ] + }, + "issuing_card_shipping_customs": { + "description": "", + "properties": { + "eori_number": { + "description": "A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/issuing_card_apple_pay" + }, + "google_pay": { + "$ref": "#/components/schemas/issuing_card_google_pay" + }, + "primary_account_identifier": { + "description": "Unique identifier for a card used with digital wallets", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "apple_pay", + "google_pay" + ], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": [ + "apple_pay", + "google_pay" + ] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + } + }, + "required": [ + "address" + ], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across this cardholder's cards.", + "items": { + "$ref": "#/components/schemas/issuing_cardholder_spending_limit" + }, + "type": [ + "array", + "null" + ] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`.", + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": [ + "spending_limits" + ] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_user_terms_acceptance" + }, + { + "type": "null" + } + ], + "description": "Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards)." + } + }, + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": [ + "user_terms_acceptance" + ] + }, + "issuing_cardholder_company": { + "description": "", + "properties": { + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + } + }, + "required": [ + "tax_id_provided" + ], + "title": "IssuingCardholderCompany", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_card_issuing" + }, + { + "type": "null" + } + ], + "description": "Information related to the card_issuing program for this cardholder." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_individual_dob" + }, + { + "type": "null" + } + ], + "description": "The date of birth of this cardholder." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_verification" + }, + { + "type": "null" + } + ], + "description": "Government-issued ID document for this cardholder." + } + }, + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "dob", + "verification" + ] + }, + "issuing_cardholder_individual_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_requirements": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.", + "enum": [ + "listed", + "rejected.listed", + "under_review", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "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.dob.day", + "individual.dob.month", + "individual.dob.year", + "individual.first_name", + "individual.last_name", + "individual.verification.document" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": [ + "array", + "null" + ] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_user_terms_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_cardholder_id_document" + }, + { + "type": "null" + } + ], + "description": "An identifying document, either a passport or local ID card." + } + }, + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancellation_policy_provided": { + "description": "Whether the cardholder was provided with a cancellation policy.", + "type": [ + "boolean", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful", + null + ], + "type": [ + "string", + "null" + ] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "card_statement": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "cash_receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "check_image": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { + "$ref": "#/components/schemas/issuing_dispute_canceled_evidence" + }, + "duplicate": { + "$ref": "#/components/schemas/issuing_dispute_duplicate_evidence" + }, + "fraudulent": { + "$ref": "#/components/schemas/issuing_dispute_fraudulent_evidence" + }, + "merchandise_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_merchandise_not_as_described_evidence" + }, + "not_received": { + "$ref": "#/components/schemas/issuing_dispute_not_received_evidence" + }, + "other": { + "$ref": "#/components/schemas/issuing_dispute_other_evidence" + }, + "reason": { + "description": "The reason for filing the dispute. Its value will match the field containing the evidence.", + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "$ref": "#/components/schemas/issuing_dispute_service_not_as_described_evidence" + } + }, + "required": [ + "reason" + ], + "title": "IssuingDisputeEvidence", + "type": "object", + "x-expandableFields": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "return_description": { + "description": "Description of the cardholder's attempt to return the product.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": [ + "merchant_rejected", + "successful", + null + ], + "type": [ + "string", + "null" + ] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": [ + "merchandise", + "service", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation" + ] + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_flight_data": { + "description": "", + "properties": { + "departure_at": { + "description": "The time that the flight departed.", + "type": [ + "integer", + "null" + ] + }, + "passenger_name": { + "description": "The name of the passenger.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "refundable": { + "description": "Whether the ticket is refundable.", + "type": [ + "boolean", + "null" + ] + }, + "segments": { + "description": "The legs of the trip.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_flight_data_leg" + }, + "type": [ + "array", + "null" + ] + }, + "travel_agency": { + "description": "The travel agency that issued the ticket.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": [ + "segments" + ] + }, + "issuing_transaction_flight_data_leg": { + "description": "", + "properties": { + "arrival_airport_code": { + "description": "The three-letter IATA airport code of the flight's destination.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "carrier": { + "description": "The airline carrier code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "departure_airport_code": { + "description": "The three-letter IATA airport code that the flight departed from.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flight_number": { + "description": "The flight number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "service_class": { + "description": "The flight's service class.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "stopover_allowed": { + "description": "Whether a stopover is allowed on this flight.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fuel_data": { + "description": "", + "properties": { + "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 `volume_decimal`. One of `us_gallon` or `liter`.", + "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" + }, + "volume_decimal": { + "description": "The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type", + "unit", + "unit_cost_decimal" + ], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_lodging_data": { + "description": "", + "properties": { + "check_in_at": { + "description": "The time of checking into the lodging.", + "type": [ + "integer", + "null" + ] + }, + "nights": { + "description": "The number of nights stayed at the lodging.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "flight": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_flight_data" + }, + { + "type": "null" + } + ], + "description": "Information about the flight that was purchased with this transaction." + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_fuel_data" + }, + { + "type": "null" + } + ], + "description": "Information about fuel that was purchased with this transaction." + }, + "lodging": { + "anyOf": [ + { + "$ref": "#/components/schemas/issuing_transaction_lodging_data" + }, + { + "type": "null" + } + ], + "description": "Information about lodging that was purchased with this transaction." + }, + "receipt": { + "description": "The line items in the purchase.", + "items": { + "$ref": "#/components/schemas/issuing_transaction_receipt_data" + }, + "type": [ + "array", + "null" + ] + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": [ + "flight", + "fuel", + "lodging", + "receipt" + ] + }, + "issuing_transaction_receipt_data": { + "description": "", + "properties": { + "description": { + "description": "The description of the item. The maximum length of this field is 26 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "quantity": { + "description": "The quantity of the item.", + "type": [ + "number", + "null" + ] + }, + "total": { + "description": "The total for this line item in cents.", + "type": [ + "integer", + "null" + ] + }, + "unit_cost": { + "description": "The unit cost of the item in cents.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [] + }, + "item": { + "description": "A line item.", + "properties": { + "amount_discount": { + "description": "Total discount amount applied. If no discounts were applied, defaults to 0.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.", + "maxLength": 5000, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "item" + ], + "type": "string" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price used to generate the line item." + }, + "quantity": { + "description": "The quantity of products being purchased.", + "type": [ + "integer", + "null" + ] + }, + "taxes": { + "description": "The taxes applied to the line item.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_discount", + "amount_subtotal", + "amount_tax", + "amount_total", + "currency", + "description", + "id", + "object" + ], + "title": "LineItem", + "type": "object", + "x-expandableFields": [ + "discounts", + "price", + "taxes" + ], + "x-resourceId": "item" + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kana variation of the company's primary address (Japan only)." + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kanji variation of the company's primary address (Japan only)." + }, + "directors_provided": { + "description": "Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).", + "type": "boolean" + }, + "executives_provided": { + "description": "Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.", + "type": "boolean" + }, + "name": { + "description": "The company's legal name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "owners_provided": { + "description": "Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).", + "type": "boolean" + }, + "ownership_declaration": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_ubo_declaration" + }, + { + "type": "null" + } + ], + "description": "This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct." + }, + "phone": { + "description": "The company's phone number (used for verification).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.", + "enum": [ + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + }, + "tax_id_registrar": { + "description": "The jurisdiction in which the `tax_id` is registered (Germany-based companies only).", + "maxLength": 5000, + "type": "string" + }, + "vat_id_provided": { + "description": "Whether the company's business VAT number was provided.", + "type": "boolean" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_company_verification" + }, + { + "type": "null" + } + ], + "description": "Information on the verification state of the company." + } + }, + "title": "LegalEntityCompany", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "ownership_declaration", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { + "$ref": "#/components/schemas/legal_entity_company_verification_document" + } + }, + "required": [ + "document" + ], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": [ + "document" + ] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "legal_entity_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_japan_address": { + "description": "", + "properties": { + "city": { + "description": "City/Ward.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + "null" + ] + }, + "line1": { + "description": "Block/Building number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "line2": { + "description": "Building details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "Prefecture.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "town": { + "description": "Town/cho-me.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + { + "type": "null" + } + ], + "description": "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "document": { + "$ref": "#/components/schemas/legal_entity_person_verification_document" + }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": [ + "additional_document", + "document" + ] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say \"Identity document is too unclear to read\".", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": [ + "back", + "front" + ] + }, + "legal_entity_ubo_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the beneficial owner attestation was made.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "ip": { + "description": "The IP address from which the beneficial owner attestation was made.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user-agent string from the browser where the beneficial owner attestation was made.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [] + }, + "line_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount for this line item, excluding all tax and discounts.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item.", + "items": { + "$ref": "#/components/schemas/discounts_resource_discount_amount" + }, + "type": [ + "array", + "null" + ] + }, + "discountable": { + "description": "If true, discounts will apply to this line item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_item": { + "description": "The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "line_item" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The price of the line item." + }, + "proration": { + "description": "Whether this is a proration.", + "type": "boolean" + }, + "proration_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoices_line_items_proration_details" + }, + { + "type": "null" + } + ], + "description": "Additional details for proration line items" + }, + "quantity": { + "description": "The quantity of the subscription, if the line item is a subscription or a proration.", + "type": [ + "integer", + "null" + ] + }, + "subscription": { + "description": "The subscription that the invoice item pertains to, if any.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "subscription_item": { + "description": "The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/components/schemas/invoice_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.", + "enum": [ + "invoiceitem", + "subscription" + ], + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount for this line item, excluding all tax and discounts.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "currency", + "discountable", + "id", + "livemode", + "metadata", + "object", + "period", + "proration", + "type" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "period", + "price", + "proration_details", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "line_item" + }, + "line_items_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount discounted.", + "type": "integer" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + }, + "required": [ + "amount", + "discount" + ], + "title": "LineItemsDiscountAmount", + "type": "object", + "x-expandableFields": [ + "discount" + ] + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "Amount of tax applied for this rate.", + "type": "integer" + }, + "rate": { + "$ref": "#/components/schemas/tax_rate" + } + }, + "required": [ + "amount", + "rate" + ], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": [ + "rate" + ] + }, + "linked_account_options_us_bank_account": { + "description": "", + "properties": { + "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" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "login_link": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "login_link" + ], + "type": "string" + }, + "url": { + "description": "The URL for the login link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "object", + "url" + ], + "title": "LoginLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "login_link" + }, + "mandate": { + "description": "A Mandate is a record of the permission a customer has given you to debit their payment method.", + "properties": { + "customer_acceptance": { + "$ref": "#/components/schemas/customer_acceptance" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "multi_use": { + "$ref": "#/components/schemas/mandate_multi_use" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "mandate" + ], + "type": "string" + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/mandate_payment_method_details" + }, + "single_use": { + "$ref": "#/components/schemas/mandate_single_use" + }, + "status": { + "description": "The status of the mandate, which indicates whether it can be used to initiate a payment.", + "enum": [ + "active", + "inactive", + "pending" + ], + "type": "string" + }, + "type": { + "description": "The type of the mandate.", + "enum": [ + "multi_use", + "single_use" + ], + "type": "string" + } + }, + "required": [ + "customer_acceptance", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "title": "Mandate", + "type": "object", + "x-expandableFields": [ + "customer_acceptance", + "multi_use", + "payment_method", + "payment_method_details", + "single_use" + ], + "x-resourceId": "mandate" + }, + "mandate_acss_debit": { + "description": "", + "properties": { + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "required": [ + "payment_schedule", + "transaction_type" + ], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_au_becs_debit": { + "description": "", + "properties": { + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "mandate_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "network_status": { + "description": "The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.", + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "type": "string" + }, + "reference": { + "description": "The unique reference identifying the mandate on the Bacs network.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "network_status", + "reference", + "url" + ], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "mandate_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "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_options_off_session_details_blik": { + "description": "", + "properties": { + "amount": { + "description": "Amount of each recurring payment.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Currency of each recurring payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "interval": { + "description": "Frequency interval of each recurring payment.", + "enum": [ + "day", + "month", + "week", + "year", + null + ], + "type": [ + "string", + "null" + ] + }, + "interval_count": { + "description": "Frequency indicator of each recurring payment.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "mandate_options_off_session_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/mandate_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/mandate_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/mandate_bacs_debit" + }, + "blik": { + "$ref": "#/components/schemas/mandate_blik" + }, + "card": { + "$ref": "#/components/schemas/card_mandate_payment_method_details" + }, + "link": { + "$ref": "#/components/schemas/mandate_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/mandate_sepa_debit" + }, + "type": { + "description": "The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/mandate_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "mandate_payment_method_details", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "mandate_sepa_debit": { + "description": "", + "properties": { + "reference": { + "description": "The unique reference of the mandate.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "reference", + "url" + ], + "title": "mandate_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_single_use": { + "description": "", + "properties": { + "amount": { + "description": "On a single use mandate, the amount of the payment.", + "type": "integer" + }, + "currency": { + "description": "On a single use mandate, the currency of the payment.", + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "mandate_single_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_us_bank_account": { + "description": "", + "properties": {}, + "title": "mandate_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "networks": { + "description": "", + "properties": { + "available": { + "description": "All available networks for the card.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "The preferred network for the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "available" + ], + "title": "networks", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_data": { + "description": "", + "properties": { + "object": { + "description": "Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.", + "type": "object" + }, + "previous_attributes": { + "description": "Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events).", + "type": "object" + } + }, + "required": [ + "object" + ], + "title": "NotificationEventData", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_request": { + "description": "", + "properties": { + "id": { + "description": "ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "idempotency_key": { + "description": "The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "NotificationEventRequest", + "type": "object", + "x-expandableFields": [] + }, + "offline_acceptance": { + "description": "", + "properties": {}, + "title": "offline_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "online_acceptance": { + "description": "", + "properties": { + "ip_address": { + "description": "The IP address from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "description": "The user agent of the browser from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/outbound_payments_payment_method_details_financial_account" + }, + "type": { + "description": "The type of the payment method used in the OutboundPayment.", + "enum": [ + "financial_account", + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/outbound_payments_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "OutboundPaymentsPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "outbound_payments_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "Token of the FinancialAccount.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails used to send funds.", + "enum": [ + "stripe" + ], + "type": "string" + } + }, + "required": [ + "id", + "network" + ], + "title": "outbound_payments_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "The US bank account network used to send funds.", + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "network" + ], + "title": "outbound_payments_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_transfers_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the OutboundTransfer.", + "enum": [ + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "OutboundTransfersPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "us_bank_account" + ] + }, + "outbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "The US bank account network used to send funds.", + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "network" + ], + "title": "outbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "package_dimensions": { + "description": "", + "properties": { + "height": { + "description": "Height, in inches.", + "type": "number" + }, + "length": { + "description": "Length, in inches.", + "type": "number" + }, + "weight": { + "description": "Weight, in ounces.", + "type": "number" + }, + "width": { + "description": "Width, in inches.", + "type": "number" + } + }, + "required": [ + "height", + "length", + "weight", + "width" + ], + "title": "PackageDimensions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "tip": { + "$ref": "#/components/schemas/payment_flows_amount_details_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": [ + "tip" + ] + }, + "payment_flows_amount_details_resource_tip": { + "description": "", + "properties": { + "amount": { + "description": "Portion of the amount that corresponds to a tip.", + "type": "integer" + } + }, + "title": "PaymentFlowsAmountDetailsResourceTip", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_payment_intent": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculates compatible payment methods", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsAutomaticPaymentMethodsPaymentIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_installment_options": { + "description": "", + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentFlowsInstallmentOptions", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_flows_private_payment_methods_alipay": { + "description": "", + "properties": {}, + "title": "PaymentFlowsPrivatePaymentMethodsAlipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_alipay_details": { + "description": "", + "properties": { + "buyer_id": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_id": { + "description": "Transaction ID of this particular Alipay transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_klarna_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": [ + "integer", + "null" + ] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": [ + "integer", + "null" + ] + }, + "year": { + "description": "The four-digit year of birth.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent": { + "description": "A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_capturable": { + "description": "Amount that can be captured from this PaymentIntent.", + "type": "integer" + }, + "amount_details": { + "$ref": "#/components/schemas/payment_flows_amount_details" + }, + "amount_received": { + "description": "Amount that was collected by this PaymentIntent.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": [ + "integer", + "null" + ] + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" + }, + { + "type": "null" + } + ], + "description": "Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)" + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "cancellation_reason": { + "description": "Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice", + null + ], + "type": [ + "string", + "null" + ] + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "confirmation_method": { + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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 present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice that created this PaymentIntent, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "last_payment_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason." + }, + "latest_charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The latest charge created by this payment intent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).", + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action" + }, + { + "type": "null" + } + ], + "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." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used in this PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this PaymentIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "processing": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_processing" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you about the processing state of the payment." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this PaymentIntent, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/review" + } + ] + } + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/transfer_data" + }, + { + "type": "null" + } + ], + "description": "The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details." + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "capture_method", + "confirmation_method", + "created", + "currency", + "id", + "livemode", + "object", + "payment_method_types", + "status" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "invoice", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "processing", + "review", + "shipping", + "transfer_data" + ], + "x-resourceId": "payment_intent" + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/components/schemas/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": [ + "customer_notification" + ] + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_boleto" + }, + "card_await_notification": { + "$ref": "#/components/schemas/payment_intent_next_action_card_await_notification" + }, + "display_bank_transfer_instructions": { + "$ref": "#/components/schemas/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini" + }, + "oxxo_display_details": { + "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_pix_display_qr_code" + }, + "promptpay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextAction", + "type": "object", + "x-expandableFields": [ + "alipay_handle_redirect", + "boleto_display_details", + "card_await_notification", + "display_bank_transfer_instructions", + "konbini_display_details", + "oxxo_display_details", + "paynow_display_qr_code", + "pix_display_qr_code", + "promptpay_display_qr_code", + "redirect_to_url", + "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, + "type": [ + "string", + "null" + ] + }, + "native_url": { + "description": "The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_boleto": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp after which the boleto expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "hosted_voucher_url": { + "description": "The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "The boleto number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "pdf": { + "description": "The URL to the downloadable boleto voucher PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_card_await_notification": { + "description": "", + "properties": { + "charge_attempt_at": { + "description": "The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_bank_transfer_instructions": { + "description": "", + "properties": { + "amount_remaining": { + "description": "The remaining amount that needs to be transferred to complete the payment.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": [ + "string", + "null" + ] + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund the customer balance", + "items": { + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "hosted_instructions_url": { + "description": "A link to a hosted page that guides your customer through completing the transfer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of bank transfer", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": [ + "financial_addresses" + ] + }, + "payment_intent_next_action_display_oxxo_details": { + "description": "", + "properties": { + "expires_after": { + "description": "The timestamp after which the OXXO voucher expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "hosted_voucher_url": { + "description": "The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "number": { + "description": "OXXO reference number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp at which the pending Konbini payment expires.", + "format": "unix-time", + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "stores": { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_stores" + } + }, + "required": [ + "expires_at", + "stores" + ], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": [ + "stores" + ] + }, + "payment_intent_next_action_konbini_familymart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_familymart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_lawson": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_lawson", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_ministop": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_ministop", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_seicomart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "payment_code" + ], + "title": "payment_intent_next_action_konbini_seicomart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_familymart" + }, + { + "type": "null" + } + ], + "description": "FamilyMart instruction details." + }, + "lawson": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_lawson" + }, + { + "type": "null" + } + ], + "description": "Lawson instruction details." + }, + "ministop": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_ministop" + }, + { + "type": "null" + } + ], + "description": "Ministop instruction details." + }, + "seicomart": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_next_action_konbini_seicomart" + }, + { + "type": "null" + } + ], + "description": "Seicomart instruction details." + } + }, + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": [ + "familymart", + "lawson", + "ministop", + "seicomart" + ] + }, + "payment_intent_next_action_paynow_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_pix_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "expires_at": { + "description": "The date (unix timestamp) when the PIX expires.", + "type": "integer" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted pix instructions page, which allows customers to view the pix QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render png QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render svg QR code", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentIntentNextActionPixDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_promptpay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The PNG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The SVG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPromptpayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": [ + "amounts", + "descriptor_code", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The data being used to generate QR code", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_data_url": { + "description": "The base64 image data for a pre-generated QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionWechatPayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_android_app": { + "description": "", + "properties": { + "app_id": { + "description": "app_id is the APP ID registered on WeChat open platform", + "maxLength": 5000, + "type": "string" + }, + "nonce_str": { + "description": "nonce_str is a random string", + "maxLength": 5000, + "type": "string" + }, + "package": { + "description": "package is static value", + "maxLength": 5000, + "type": "string" + }, + "partner_id": { + "description": "an unique merchant ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "prepay_id": { + "description": "an unique trading ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "sign": { + "description": "A signature", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "Specifies the current time in epoch format", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToAndroidApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_ios_app": { + "description": "", + "properties": { + "native_url": { + "description": "An universal link that redirect to WeChat Pay app", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "native_url" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToIOSApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "affirm": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_affirm" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alipay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_alipay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bacs_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_bancontact" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "boleto": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_boleto" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_card" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_customer_balance" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "eps": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "fpx": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_fpx" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "giropay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_giropay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_grabpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "ideal": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_ideal" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_interac_present" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "klarna": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_klarna" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_konbini" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_oxxo" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "p24": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_p24" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paynow": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_paynow" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pix": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_pix" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_promptpay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sofort": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_sofort" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_wechat_pay" + }, + { + "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_intent_payment_method_options_au_becs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_blik": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "installments", + "mandate_options" + ] + }, + "payment_intent_payment_method_options_eps": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_link": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { + "$ref": "#/components/schemas/payment_intent_card_processing" + }, + "type": { + "description": "Type of the payment method for which payment is in `processing` state, one of `card`.", + "enum": [ + "card" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentIntentProcessing", + "type": "object", + "x-expandableFields": [ + "card" + ] + }, + "payment_intent_processing_customer_notification": { + "description": "", + "properties": { + "approval_requested": { + "description": "Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.", + "type": [ + "boolean", + "null" + ] + }, + "completes_at": { + "description": "If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual", + "manual_preferred" + ], + "type": "string" + }, + "installments": { + "$ref": "#/components/schemas/payment_flows_installment_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [ + "installments" + ] + }, + "payment_link": { + "description": "A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.\n\nWhen a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)", + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "$ref": "#/components/schemas/payment_links_resource_after_completion" + }, + "allow_promotion_codes": { + "description": "Whether user redeemable promotion codes are enabled.", + "type": "boolean" + }, + "application_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.", + "type": [ + "integer", + "null" + ] + }, + "application_fee_percent": { + "description": "This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/payment_links_resource_automatic_tax" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration to gather active consent from customers." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/components/schemas/payment_links_resource_custom_text" + }, + "customer_creation": { + "description": "Configuration for Customer creation during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Configuration for creating invoice for payment mode payment links." + }, + "line_items": { + "description": "The line items representing what is being sold.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_link" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_intent_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_payment_intent_data" + }, + { + "type": "null" + } + ], + "description": "Indicates the parameters to be passed to PaymentIntent creation during checkout." + }, + "payment_method_collection": { + "description": "Configuration for collecting a payment method during checkout.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + }, + "phone_number_collection": { + "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "Configuration for collecting the customer's shipping address." + }, + "shipping_options": { + "description": "The shipping rate options applied to the session.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_shipping_option" + }, + "type": "array" + }, + "submit_type": { + "description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_subscription_data" + }, + { + "type": "null" + } + ], + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`." + }, + "tax_id_collection": { + "$ref": "#/components/schemas/payment_links_resource_tax_id_collection" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to." + }, + "url": { + "description": "The public URL that can be shared with customers.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "active", + "after_completion", + "allow_promotion_codes", + "automatic_tax", + "billing_address_collection", + "currency", + "custom_fields", + "custom_text", + "customer_creation", + "id", + "livemode", + "metadata", + "object", + "payment_method_collection", + "phone_number_collection", + "shipping_options", + "submit_type", + "tax_id_collection", + "url" + ], + "title": "PaymentLink", + "type": "object", + "x-expandableFields": [ + "after_completion", + "automatic_tax", + "consent_collection", + "custom_fields", + "custom_text", + "invoice_creation", + "line_items", + "on_behalf_of", + "payment_intent_data", + "phone_number_collection", + "shipping_address_collection", + "shipping_options", + "subscription_data", + "tax_id_collection", + "transfer_data" + ], + "x-resourceId": "payment_link" + }, + "payment_links_resource_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" + }, + "redirect": { + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" + }, + "type": { + "description": "The specified behavior after the purchase is complete.", + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceAfterCompletion", + "type": "object", + "x-expandableFields": [ + "hosted_confirmation", + "redirect" + ] + }, + "payment_links_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, tax will be calculated automatically using the customer's location.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_confirmation_page": { + "description": "", + "properties": { + "custom_message": { + "description": "The custom message that is displayed to the customer after the purchase is complete.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourceCompletionBehaviorConfirmationPage", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_redirect": { + "description": "", + "properties": { + "url": { + "description": "The URL the customer will be redirected to after the purchase is complete.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "PaymentLinksResourceCompletionBehaviorRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications.", + "enum": [ + "auto", + "none", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.", + "enum": [ + "none", + "required", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourceConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_label" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentLinksResourceCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label" + ] + }, + "payment_links_resource_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown_option" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "PaymentLinksResourceCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_links_resource_custom_fields_dropdown_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentLinksResourceCustomFieldsDropdownOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentLinksResourceCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentLinksResourceCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_links_resource_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentLinksResourceCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Enable creating an invoice on successful payment.", + "type": "boolean" + }, + "invoice_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_links_resource_invoice_settings" + }, + { + "type": "null" + } + ], + "description": "Configuration for the invoice. Default invoice values will be used if unspecified." + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_links_resource_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "custom_fields": { + "description": "A list of up to 4 custom fields to be displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentLinksResourceInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_links_resource_payment_intent_data": { + "description": "", + "properties": { + "capture_method": { + "description": "Indicates when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with the payment method collected during checkout.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentLinksResourcePaymentIntentData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a phone number will be collected during checkout.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourcePhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentLinksResourceShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The ID of the Shipping Rate to use for this shipping option.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentLinksResourceShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_links_resource_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PaymentLinksResourceSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentLinksResourceTaxIdCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The connected account receiving the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "PaymentLinksResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/components/schemas/billing_details" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_card_present" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_grabpay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_link" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payment_method" + ], + "type": "string" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_promptpay" + }, + "radar_options": { + "$ref": "#/components/schemas/radar_radar_options" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_sofort" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_wechat_pay" + } + }, + "required": [ + "billing_details", + "created", + "id", + "livemode", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "radar_options", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "x-resourceId": "payment_method" + }, + "payment_method_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "institution_number": { + "description": "Institution number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_afterpay_clearpay": { + "description": "", + "properties": {}, + "title": "payment_method_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Six-digit number identifying bank and branch associated with this bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_blik": { + "description": "", + "properties": {}, + "title": "payment_method_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "Uniquely identifies the customer tax id (CNPJ or CPF)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_checks" + }, + { + "type": "null" + } + ], + "description": "Checks on Card address and CVC if provided." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_generated_card" + }, + { + "type": "null" + } + ], + "description": "Details of the original PaymentMethod that created this object." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about card networks that can be used to process the payment." + }, + "three_d_secure_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_usage" + }, + { + "type": "null" + } + ], + "description": "Contains details on how this Card may be used for 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "last4" + ], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ] + }, + "payment_method_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_generated_card": { + "description": "", + "properties": { + "charge": { + "description": "The charge that created this object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/card_generated_from_payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Transaction-specific details of the payment method used in the payment." + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": [ + "payment_method_details", + "setup_attempt" + ] + }, + "payment_method_card_present": { + "description": "", + "properties": {}, + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/payment_method_details_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/payment_method_details_acss_debit" + }, + "affirm": { + "$ref": "#/components/schemas/payment_method_details_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/payment_method_details_card_present" + }, + "customer_balance": { + "$ref": "#/components/schemas/payment_method_details_customer_balance" + }, + "eps": { + "$ref": "#/components/schemas/payment_method_details_eps" + }, + "fpx": { + "$ref": "#/components/schemas/payment_method_details_fpx" + }, + "giropay": { + "$ref": "#/components/schemas/payment_method_details_giropay" + }, + "grabpay": { + "$ref": "#/components/schemas/payment_method_details_grabpay" + }, + "ideal": { + "$ref": "#/components/schemas/payment_method_details_ideal" + }, + "interac_present": { + "$ref": "#/components/schemas/payment_method_details_interac_present" + }, + "klarna": { + "$ref": "#/components/schemas/payment_method_details_klarna" + }, + "konbini": { + "$ref": "#/components/schemas/payment_method_details_konbini" + }, + "link": { + "$ref": "#/components/schemas/payment_method_details_link" + }, + "multibanco": { + "$ref": "#/components/schemas/payment_method_details_multibanco" + }, + "oxxo": { + "$ref": "#/components/schemas/payment_method_details_oxxo" + }, + "p24": { + "$ref": "#/components/schemas/payment_method_details_p24" + }, + "paynow": { + "$ref": "#/components/schemas/payment_method_details_paynow" + }, + "pix": { + "$ref": "#/components/schemas/payment_method_details_pix" + }, + "promptpay": { + "$ref": "#/components/schemas/payment_method_details_promptpay" + }, + "sepa_debit": { + "$ref": "#/components/schemas/payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/payment_method_details_sofort" + }, + "stripe_account": { + "$ref": "#/components/schemas/payment_method_details_stripe_account" + }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/payment_method_details_us_bank_account" + }, + "wechat": { + "$ref": "#/components/schemas/payment_method_details_wechat" + }, + "wechat_pay": { + "$ref": "#/components/schemas/payment_method_details_wechat_pay" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "multibanco", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "stripe_account", + "us_bank_account", + "wechat", + "wechat_pay" + ] + }, + "payment_method_details_ach_credit_transfer": { + "description": "", + "properties": { + "account_number": { + "description": "Account number to transfer funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing transit number for the bank account to transfer funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "swift_code": { + "description": "SWIFT code of the bank associated with the routing number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_debit": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing transit number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "institution_number": { + "description": "Institution number of the bank account", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_afterpay_clearpay": { + "description": "", + "properties": { + "reference": { + "description": "Order identifier shown to the merchant in Afterpay’s online portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "checks": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_checks" + }, + { + "type": "null" + } + ], + "description": "Check results by Card networks on Card address and CVC at time of payment." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "installments": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment or created by it.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this transaction used 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "installments", + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for the payment." + } + }, + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": [ + "plan" + ] + }, + "payment_method_details_card_installments_plan": { + "description": "", + "properties": { + "count": { + "description": "For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.", + "type": [ + "integer", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`.", + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "type": [ + "integer", + "null" + ] + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "incremental_authorization_supported": { + "description": "Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).", + "type": "boolean" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "overcapture_supported": { + "description": "Defines whether the authorized amount can be over-captured or not", + "type": "boolean" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year", + "incremental_authorization_supported", + "overcapture_supported" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_card_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "credit", + "prepaid", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "google_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + }, + "type": { + "description": "The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" + } + }, + "required": [ + "type" + ], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_details_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "payment_method_details_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": [ + "billing_address", + "shipping_address" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction id generated by FPX for every request from the merchant", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "bank" + ], + "title": "payment_method_details_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_giropay": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year" + ], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": [ + "receipt" + ] + }, + "payment_method_details_interac_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": [ + "checking", + "savings", + "unknown" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "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, + "type": [ + "string", + "null" + ] + }, + "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`, `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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_konbini_store" + }, + { + "type": "null" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed." + } + }, + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": [ + "store" + ] + }, + "payment_method_details_konbini_store": { + "description": "", + "properties": { + "chain": { + "description": "The name of the convenience store chain where the payment was completed.", + "enum": [ + "familymart", + "lawson", + "ministop", + "seicomart", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_link": { + "description": "", + "properties": {}, + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_multibanco": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `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", + "volkswagen_bank", + null + ], + "type": [ + "string", + "null" + ] + }, + "reference": { + "description": "Unique reference for this Przelewy24 payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_stripe_account": { + "description": "", + "properties": {}, + "title": "payment_method_details_stripe_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_details_wechat_pay", + "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", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + } + }, + "required": [ + "bank" + ], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_giropay": { + "description": "", + "properties": {}, + "title": "payment_method_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_grabpay": { + "description": "", + "properties": {}, + "title": "payment_method_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank, if the bank was provided.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" + }, + { + "type": "null" + } + ], + "description": "The customer's date of birth, if provided." + } + }, + "title": "payment_method_klarna", + "type": "object", + "x-expandableFields": [ + "dob" + ] + }, + "payment_method_konbini": { + "description": "", + "properties": {}, + "title": "payment_method_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_affirm": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_afterpay_clearpay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "reference": { + "description": "Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about\nthe payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alipay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_alipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bacs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "required": [ + "preferred_language" + ], + "title": "payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_boleto": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + "type": [ + "array", + "null" + ] + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for this PaymentIntent." + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": [ + "available_plans", + "plan" + ] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "integer", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)", + "type": [ + "boolean", + "null" + ] + }, + "request_incremental_authorization_support": { + "description": "Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_bank_transfer" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": [ + "bank_transfer", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": [ + "bank_transfer" + ] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + }, + "requested_address_types": { + "description": "List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.\n\nPermitted values include: `sort_code`, `zengin`, `iban`, or `spei`.", + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": [ + "eu_bank_transfer" + ] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": [ + "BE", + "DE", + "ES", + "FR", + "IE", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "payment_method_options_customer_balance_eu_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_fpx": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_giropay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_grabpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_ideal": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_options_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_klarna": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the Klarna checkout page that the customer is redirected to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_konbini": { + "description": "", + "properties": { + "confirmation_number": { + "description": "An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "product_description": { + "description": "A product descriptor of up to 22 characters, which will appear to customers at the convenience store.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_oxxo": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "expires_after_days" + ], + "title": "payment_method_options_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_p24": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_p24", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire.", + "type": [ + "integer", + "null" + ] + }, + "expires_at": { + "description": "The timestamp at which the Pix expires.", + "type": [ + "integer", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_promptpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_sofort": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the SOFORT authorization page that the customer is redirected to.", + "enum": [ + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl", + null + ], + "type": [ + "string", + "null" + ] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_wechat_pay": { + "description": "", + "properties": { + "app_id": { + "description": "The app ID registered with WeChat Pay. Only required when client is ios or android.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "client": { + "description": "The client type that the end customer will pay from", + "enum": [ + "android", + "ios", + "web", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_oxxo": { + "description": "", + "properties": {}, + "title": "payment_method_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided.", + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paynow": { + "description": "", + "properties": {}, + "title": "payment_method_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pix": { + "description": "", + "properties": {}, + "title": "payment_method_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_promptpay": { + "description": "", + "properties": {}, + "title": "payment_method_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/components/schemas/sepa_debit_generated_from" + }, + { + "type": "null" + } + ], + "description": "Information about the object that generated this PaymentMethod." + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": [ + "generated_from" + ] + }, + "payment_method_sofort": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": [ + "company", + "individual", + null + ], + "type": [ + "string", + "null" + ] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": [ + "checking", + "savings", + null + ], + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "financial_connections_account": { + "description": "The ID of the Financial Connections Account used to create the payment method.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "networks": { + "anyOf": [ + { + "$ref": "#/components/schemas/us_bank_account_networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about US bank account networks that can be used." + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": [ + "networks" + ] + }, + "payment_method_wechat_pay": { + "description": "", + "properties": {}, + "title": "payment_method_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_after_expiration": { + "description": "", + "properties": { + "recovery": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" + }, + { + "type": "null" + } + ], + "description": "When set, configuration used to recover the Checkout Session on expiry." + } + }, + "title": "PaymentPagesCheckoutSessionAfterExpiration", + "type": "object", + "x-expandableFields": [ + "recovery" + ] + }, + "payment_pages_checkout_session_after_expiration_recovery": { + "description": "", + "properties": { + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`", + "type": "boolean" + }, + "enabled": { + "description": "If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.", + "type": "boolean" + }, + "expires_at": { + "description": "The timestamp at which the recovery URL will expire.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "url": { + "description": "URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "allow_promotion_codes", + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAfterExpirationRecovery", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether automatic tax is enabled for the session", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this session.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent": { + "description": "", + "properties": { + "promotions": { + "description": "If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.", + "enum": [ + "opt_in", + "opt_out", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.", + "enum": [ + "accepted", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "PaymentPagesCheckoutSessionConsent", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants.", + "enum": [ + "auto", + "none", + null + ], + "type": [ + "string", + "null" + ] + }, + "terms_of_service": { + "description": "If set to `required`, it requires customers to accept the terms of service before being able to pay.", + "enum": [ + "none", + "required", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_label" + }, + "numeric": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=numeric` fields." + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=text` fields." + }, + "type": { + "description": "The type of the field.", + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "optional", + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFields", + "type": "object", + "x-expandableFields": [ + "dropdown", + "label", + "numeric", + "text" + ] + }, + "payment_pages_checkout_session_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_option" + }, + "type": "array" + }, + "value": { + "description": "The option selected by the customer. This will be the `value` for the option.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "options" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsDropdown", + "type": "object", + "x-expandableFields": [ + "options" + ] + }, + "payment_pages_checkout_session_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the label.", + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_numeric": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer, containing only digits.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "PaymentPagesCheckoutSessionCustomFieldsOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_text": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentPagesCheckoutSessionCustomText", + "type": "object", + "x-expandableFields": [ + "shipping_address", + "submit" + ] + }, + "payment_pages_checkout_session_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "PaymentPagesCheckoutSessionCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022." + }, + "email": { + "description": "The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "The customer's phone number after a completed Checkout Session.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_exempt": { + "description": "The customer’s tax exempt status after a completed Checkout Session.", + "enum": [ + "exempt", + "none", + "reverse", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_ids": { + "description": "The customer’s tax IDs after a completed Checkout Session.", + "items": { + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" + }, + "type": [ + "array", + "null" + ] + } + }, + "title": "PaymentPagesCheckoutSessionCustomerDetails", + "type": "object", + "x-expandableFields": [ + "address", + "tax_ids" + ] + }, + "payment_pages_checkout_session_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether invoice creation is enabled for the Checkout Session.", + "type": "boolean" + }, + "invoice_data": { + "$ref": "#/components/schemas/payment_pages_checkout_session_invoice_settings" + } + }, + "required": [ + "enabled", + "invoice_data" + ], + "title": "PaymentPagesCheckoutSessionInvoiceCreation", + "type": "object", + "x-expandableFields": [ + "invoice_data" + ] + }, + "payment_pages_checkout_session_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_id" + }, + { + "$ref": "#/components/schemas/deleted_tax_id" + } + ] + } + }, + "type": [ + "array", + "null" + ] + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/components/schemas/invoice_setting_custom_field" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentPagesCheckoutSessionInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_pages_checkout_session_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether phone number collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionPhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "PaymentPagesCheckoutSessionShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after discounts and taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this order.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_subtotal", + "amount_tax", + "amount_total" + ], + "title": "PaymentPagesCheckoutSessionShippingCost", + "type": "object", + "x-expandableFields": [ + "shipping_rate", + "taxes" + ] + }, + "payment_pages_checkout_session_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/shipping_rate" + } + ], + "description": "The shipping rate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/shipping_rate" + } + ] + } + } + }, + "required": [ + "shipping_amount", + "shipping_rate" + ], + "title": "PaymentPagesCheckoutSessionShippingOption", + "type": "object", + "x-expandableFields": [ + "shipping_rate" + ] + }, + "payment_pages_checkout_session_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type" + ], + "title": "PaymentPagesCheckoutSessionTaxID", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PaymentPagesCheckoutSessionTaxIDCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": [ + "integer", + "null" + ] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "PaymentPagesCheckoutSessionTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "payment_pages_checkout_session_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "payment_source": { + "anyOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-resourceId": "payment_source", + "x-stripeBypassValidation": true + }, + "payout": { + "description": "A `Payout` object is created when you receive funds from Stripe, or when you\ninitiate a payout to either a bank account or debit card of a [connected\nStripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,\nas well as list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving Payouts](https://stripe.com/docs/payouts).", + "properties": { + "amount": { + "description": "Amount (in %s) to be transferred to your bank account or debit card.", + "type": "integer" + }, + "arrival_date": { + "description": "Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.", + "format": "unix-time", + "type": "integer" + }, + "automatic": { + "description": "Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts).", + "type": "boolean" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this payout on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + }, + { + "type": "null" + } + ], + "description": "ID of the bank account or card the payout was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/deleted_bank_account" + }, + { + "$ref": "#/components/schemas/deleted_card" + } + ] + }, + "x-stripeBypassValidation": true + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for payout failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "payout" + ], + "type": "string" + }, + "original_payout": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout reverses another, this is the ID of the original payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "reversed_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout was reversed, this is the ID of the payout that reverses this payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payout" + } + ] + } + }, + "source_type": { + "description": "The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a payout to be displayed on the user's bank statement.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Can be `bank_account` or `card`.", + "enum": [ + "bank_account", + "card" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "arrival_date", + "automatic", + "created", + "currency", + "id", + "livemode", + "method", + "object", + "source_type", + "status", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by" + ], + "x-resourceId": "payout" + }, + "period": { + "description": "", + "properties": { + "end": { + "description": "The end date of this usage period. All usage up to and including this point in time is included.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "start": { + "description": "The start date of this usage period. All usage after this point in time is included.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "Period", + "type": "object", + "x-expandableFields": [] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.\nSee the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.\n\nRelated guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).", + "properties": { + "account": { + "description": "The account the person is associated with.", + "maxLength": 5000, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/components/schemas/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "dob": { + "$ref": "#/components/schemas/legal_entity_dob" + }, + "email": { + "description": "The person's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_future_requirements" + }, + { + "type": "null" + } + ] + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number_provided": { + "description": "Whether the person's `id_number` was provided.", + "type": "boolean" + }, + "id_number_secondary_provided": { + "description": "Whether the person's `id_number_secondary` was provided.", + "type": "boolean" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nationality": { + "description": "The country where the person is a national.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "$ref": "#/components/schemas/address" + }, + "relationship": { + "$ref": "#/components/schemas/person_relationship" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/components/schemas/person_requirements" + }, + { + "type": "null" + } + ] + }, + "ssn_last_4_provided": { + "description": "Whether the last four digits of the person's Social Security number have been provided (U.S. only).", + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/legal_entity_person_verification" + } + }, + "required": [ + "account", + "created", + "id", + "object" + ], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "verification" + ], + "x-resourceId": "person" + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "person_relationship": { + "description": "", + "properties": { + "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.", + "type": [ + "boolean", + "null" + ] + }, + "executive": { + "description": "Whether the person has significant responsibility to control, manage, or direct the organization.", + "type": [ + "boolean", + "null" + ] + }, + "owner": { + "description": "Whether the person is an owner of the account’s legal entity.", + "type": [ + "boolean", + "null" + ] + }, + "percent_ownership": { + "description": "The percent owned by the person of the account's legal entity.", + "type": [ + "number", + "null" + ] + }, + "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.", + "type": [ + "boolean", + "null" + ] + }, + "title": { + "description": "The person's title (e.g., CEO, Support Engineer).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/components/schemas/account_requirements_alternative" + }, + "type": [ + "array", + "null" + ] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/components/schemas/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": [ + "alternatives", + "errors" + ] + }, + "plan": { + "description": "You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.\n\nPlans define the base price, currency, and billing cycle for recurring purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has plans for $10/month, $100/year, €9/month, and €90/year.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the plan can be used for new purchases.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum", + null + ], + "type": [ + "string", + "null" + ] + }, + "amount": { + "description": "The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "plan" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + }, + { + "type": "null" + } + ], + "description": "The product whose pricing this plan determines.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/plan_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.", + "enum": [ + "graduated", + "volume", + null + ], + "type": [ + "string", + "null" + ] + }, + "transform_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_usage" + }, + { + "type": "null" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`." + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "type": [ + "integer", + "null" + ] + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "interval", + "interval_count", + "livemode", + "object", + "usage_type" + ], + "title": "Plan", + "type": "object", + "x-expandableFields": [ + "product", + "tiers", + "transform_usage" + ], + "x-resourceId": "plan" + }, + "plan_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "type": [ + "integer", + "null" + ] + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PlanTier", + "type": "object", + "x-expandableFields": [] + }, + "platform_tax_fee": { + "description": "", + "properties": { + "account": { + "description": "The Connected account that incurred this charge.", + "maxLength": 5000, + "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": [ + "platform_tax_fee" + ], + "type": "string" + }, + "source_transaction": { + "description": "The payment object that caused this tax to be inflicted.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of tax (VAT).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account", + "id", + "object", + "source_transaction", + "type" + ], + "title": "PlatformTax", + "type": "object", + "x-expandableFields": [] + }, + "portal_business_profile": { + "description": "", + "properties": { + "headline": { + "description": "The messaging shown to customers in the portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "privacy_policy_url": { + "description": "A link to the business’s publicly available privacy policy.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "terms_of_service_url": { + "description": "A link to the business’s publicly available terms of service.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PortalBusinessProfile", + "type": "object", + "x-expandableFields": [] + }, + "portal_customer_update": { + "description": "", + "properties": { + "allowed_updates": { + "description": "The types of customer updates that are supported. When empty, customers are not updateable.", + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "allowed_updates", + "enabled" + ], + "title": "PortalCustomerUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_features": { + "description": "", + "properties": { + "customer_update": { + "$ref": "#/components/schemas/portal_customer_update" + }, + "invoice_history": { + "$ref": "#/components/schemas/portal_invoice_list" + }, + "payment_method_update": { + "$ref": "#/components/schemas/portal_payment_method_update" + }, + "subscription_cancel": { + "$ref": "#/components/schemas/portal_subscription_cancel" + }, + "subscription_pause": { + "$ref": "#/components/schemas/portal_subscription_pause" + }, + "subscription_update": { + "$ref": "#/components/schemas/portal_subscription_update" + } + }, + "required": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_pause", + "subscription_update" + ], + "title": "PortalFeatures", + "type": "object", + "x-expandableFields": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_pause", + "subscription_update" + ] + }, + "portal_flows_after_completion_hosted_confirmation": { + "description": "", + "properties": { + "custom_message": { + "description": "A custom message to display to the customer after the flow is completed.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "PortalFlowsAfterCompletionHostedConfirmation", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_after_completion_redirect": { + "description": "", + "properties": { + "return_url": { + "description": "The URL the customer will be redirected to after the flow is completed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "return_url" + ], + "title": "PortalFlowsAfterCompletionRedirect", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_flow": { + "description": "", + "properties": { + "after_completion": { + "$ref": "#/components/schemas/portal_flows_flow_after_completion" + }, + "subscription_cancel": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_flow_subscription_cancel" + }, + { + "type": "null" + } + ], + "description": "Configuration when `flow.type=subscription_cancel`." + }, + "type": { + "description": "Type of flow that the customer will go through.", + "enum": [ + "payment_method_update", + "subscription_cancel" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "after_completion", + "type" + ], + "title": "PortalFlowsFlow", + "type": "object", + "x-expandableFields": [ + "after_completion", + "subscription_cancel" + ] + }, + "portal_flows_flow_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_after_completion_hosted_confirmation" + }, + { + "type": "null" + } + ], + "description": "Configuration when `after_completion.type=hosted_confirmation`." + }, + "redirect": { + "anyOf": [ + { + "$ref": "#/components/schemas/portal_flows_after_completion_redirect" + }, + { + "type": "null" + } + ], + "description": "Configuration when `after_completion.type=redirect`." + }, + "type": { + "description": "The specified type of behavior after the flow is completed.", + "enum": [ + "hosted_confirmation", + "portal_homepage", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "PortalFlowsFlowAfterCompletion", + "type": "object", + "x-expandableFields": [ + "hosted_confirmation", + "redirect" + ] + }, + "portal_flows_flow_subscription_cancel": { + "description": "", + "properties": { + "subscription": { + "description": "The ID of the subscription to be canceled.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "subscription" + ], + "title": "PortalFlowsFlowSubscriptionCancel", + "type": "object", + "x-expandableFields": [] + }, + "portal_invoice_list": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PortalInvoiceList", + "type": "object", + "x-expandableFields": [] + }, + "portal_login_page": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.\n\nIf `false`, the previously generated `url`, if any, will be deactivated.", + "type": "boolean" + }, + "url": { + "description": "A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "PortalLoginPage", + "type": "object", + "x-expandableFields": [] + }, + "portal_payment_method_update": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PortalPaymentMethodUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_cancel": { + "description": "", + "properties": { + "cancellation_reason": { + "$ref": "#/components/schemas/portal_subscription_cancellation_reason" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "mode": { + "description": "Whether to cancel subscriptions immediately or at the end of the billing period.", + "enum": [ + "at_period_end", + "immediately" + ], + "type": "string" + }, + "proration_behavior": { + "description": "Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "cancellation_reason", + "enabled", + "mode", + "proration_behavior" + ], + "title": "PortalSubscriptionCancel", + "type": "object", + "x-expandableFields": [ + "cancellation_reason" + ] + }, + "portal_subscription_cancellation_reason": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "options": { + "description": "Which cancellation reasons will be given as options to the customer.", + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "enabled", + "options" + ], + "title": "PortalSubscriptionCancellationReason", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_pause": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "PortalSubscriptionPause", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_update": { + "description": "", + "properties": { + "default_allowed_updates": { + "description": "The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.", + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "products": { + "description": "The list of products that support subscription updates.", + "items": { + "$ref": "#/components/schemas/portal_subscription_update_product" + }, + "type": [ + "array", + "null" + ] + }, + "proration_behavior": { + "description": "Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "default_allowed_updates", + "enabled", + "proration_behavior" + ], + "title": "PortalSubscriptionUpdate", + "type": "object", + "x-expandableFields": [ + "products" + ] + }, + "portal_subscription_update_product": { + "description": "", + "properties": { + "prices": { + "description": "The list of price IDs which, when subscribed to, a subscription can be updated.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "description": "The product ID.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "prices", + "product" + ], + "title": "PortalSubscriptionUpdateProduct", + "type": "object", + "x-expandableFields": [] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the price can be used for new purchases.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/currency_option" + }, + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/components/schemas/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "price" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/product" + }, + { + "$ref": "#/components/schemas/deleted_product" + } + ] + } + }, + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/recurring" + }, + { + "type": "null" + } + ], + "description": "The recurring components of a price such as `interval` and `usage_type`." + }, + "tax_behavior": { + "description": "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "$ref": "#/components/schemas/price_tier" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.", + "enum": [ + "graduated", + "volume", + null + ], + "type": [ + "string", + "null" + ] + }, + "transform_quantity": { + "anyOf": [ + { + "$ref": "#/components/schemas/transform_quantity" + }, + { + "type": "null" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`." + }, + "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 %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "product", + "type" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price" + }, + "price_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "type": [ + "integer", + "null" + ] + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "type": [ + "integer", + "null" + ] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": [ + "string", + "null" + ] + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "PriceTier", + "type": "object", + "x-expandableFields": [] + }, + "product": { + "description": "Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)", + "properties": { + "active": { + "description": "Whether the product is currently available for purchase.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "type": "null" + } + ], + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + } + ] + } + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "product" + ], + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "$ref": "#/components/schemas/package_dimensions" + }, + { + "type": "null" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": [ + "boolean", + "null" + ] + }, + "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.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "created", + "id", + "images", + "livemode", + "metadata", + "name", + "object", + "updated" + ], + "title": "Product", + "type": "object", + "x-expandableFields": [ + "default_price", + "package_dimensions", + "tax_code" + ], + "x-resourceId": "product" + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.", + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.", + "maxLength": 5000, + "type": "string" + }, + "coupon": { + "$ref": "#/components/schemas/coupon" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer that this promotion code can be used by.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "expires_at": { + "description": "Date at which the promotion code can no longer be redeemed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this promotion code can be redeemed.", + "type": [ + "integer", + "null" + ] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "promotion_code" + ], + "type": "string" + }, + "restrictions": { + "$ref": "#/components/schemas/promotion_codes_resource_restrictions" + }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "coupon", + "created", + "id", + "livemode", + "object", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": [ + "coupon", + "customer", + "restrictions" + ], + "x-resourceId": "promotion_code" + }, + "promotion_code_currency_option": { + "description": "", + "properties": { + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": "integer" + } + }, + "required": [ + "minimum_amount" + ], + "title": "PromotionCodeCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/promotion_code_currency_option" + }, + "description": "Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "first_time_transaction": { + "description": "A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices", + "type": "boolean" + }, + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": [ + "integer", + "null" + ] + }, + "minimum_amount_currency": { + "description": "Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "first_time_transaction" + ], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "quote": { + "description": "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule.", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.", + "type": [ + "integer", + "null" + ] + }, + "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 subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/quotes_resource_automatic_tax" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "computed": { + "$ref": "#/components/schemas/quotes_resource_computed" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_tax_rates": { + "description": "The tax rates applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_rate" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_rate" + } + ] + } + }, + "type": "array" + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "discounts": { + "description": "The discounts applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/discount" + } + ] + } + }, + "type": "array" + }, + "expires_at": { + "description": "The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "from_quote": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_from_quote" + }, + { + "type": "null" + } + ], + "description": "Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details." + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + }, + { + "type": "null" + } + ], + "description": "The invoice that was created from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + }, + { + "$ref": "#/components/schemas/deleted_invoice" + } + ] + } + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_quote_setting" + }, + { + "type": "null" + } + ], + "description": "All invoices will be billed using the specified settings." + }, + "line_items": { + "description": "A list of items the customer is being quoted for.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "quote" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "status": { + "description": "The status of the quote.", + "enum": [ + "accepted", + "canceled", + "draft", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/components/schemas/quotes_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "subscription_data": { + "$ref": "#/components/schemas/quotes_resource_subscription_data_subscription_data" + }, + "subscription_schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this quote belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices." + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "automatic_tax", + "collection_method", + "computed", + "created", + "discounts", + "expires_at", + "id", + "livemode", + "metadata", + "object", + "status", + "status_transitions", + "subscription_data", + "total_details" + ], + "title": "Quote", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "computed", + "customer", + "default_tax_rates", + "discounts", + "from_quote", + "invoice", + "invoice_settings", + "line_items", + "on_behalf_of", + "status_transitions", + "subscription", + "subscription_data", + "subscription_schedule", + "test_clock", + "total_details", + "transfer_data" + ], + "x-resourceId": "quote" + }, + "quotes_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculate taxes", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this quote.", + "enum": [ + "complete", + "failed", + "requires_location_inputs", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "enabled" + ], + "title": "QuotesResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_computed": { + "description": "", + "properties": { + "recurring": { + "anyOf": [ + { + "$ref": "#/components/schemas/quotes_resource_recurring" + }, + { + "type": "null" + } + ], + "description": "The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices." + }, + "upfront": { + "$ref": "#/components/schemas/quotes_resource_upfront" + } + }, + "required": [ + "upfront" + ], + "title": "QuotesResourceComputed", + "type": "object", + "x-expandableFields": [ + "recurring", + "upfront" + ] + }, + "quotes_resource_from_quote": { + "description": "", + "properties": { + "is_revision": { + "description": "Whether this quote is a revision of a different quote.", + "type": "boolean" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/quote" + } + ], + "description": "The quote that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/quote" + } + ] + } + } + }, + "required": [ + "is_revision", + "quote" + ], + "title": "QuotesResourceFromQuote", + "type": "object", + "x-expandableFields": [ + "quote" + ] + }, + "quotes_resource_recurring": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "interval", + "interval_count", + "total_details" + ], + "title": "QuotesResourceRecurring", + "type": "object", + "x-expandableFields": [ + "total_details" + ] + }, + "quotes_resource_status_transitions": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the quote was accepted. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "canceled_at": { + "description": "The time that the quote was canceled. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "finalized_at": { + "description": "The time that the quote was finalized. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "QuotesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_subscription_data_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "effective_date": { + "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": [ + "integer", + "null" + ] + } + }, + "title": "QuotesResourceSubscriptionDataSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": [ + "integer", + "null" + ] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" + } + }, + "required": [ + "amount_discount", + "amount_tax" + ], + "title": "QuotesResourceTotalDetails", + "type": "object", + "x-expandableFields": [ + "breakdown" + ] + }, + "quotes_resource_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/components/schemas/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/components/schemas/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "discounts", + "taxes" + ], + "title": "QuotesResourceTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": [ + "discounts", + "taxes" + ] + }, + "quotes_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": [ + "integer", + "null" + ] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.", + "type": [ + "number", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "QuotesResourceTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "quotes_resource_upfront": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "line_items": { + "description": "The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "total_details": { + "$ref": "#/components/schemas/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "total_details" + ], + "title": "QuotesResourceUpfront", + "type": "object", + "x-expandableFields": [ + "line_items", + "total_details" + ] + }, + "radar.early_fraud_warning": { + "description": "An early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.\n\nRelated guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).", + "properties": { + "actionable": { + "description": "An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.", + "type": "boolean" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "ID of the charge this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "fraud_type": { + "description": "The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.early_fraud_warning" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "ID of the Payment Intent this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + } + }, + "required": [ + "actionable", + "charge", + "created", + "fraud_type", + "id", + "livemode", + "object" + ], + "title": "RadarEarlyFraudWarning", + "type": "object", + "x-expandableFields": [ + "charge", + "payment_intent" + ], + "x-resourceId": "radar.early_fraud_warning" + }, + "radar.value_list": { + "description": "Value lists allow you to group values together which can then be referenced in rules.\n\nRelated guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).", + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who created this value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "item_type": { + "description": "The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "string" + ], + "type": "string" + }, + "list_items": { + "description": "List of items contained within this value list.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The name of the value list.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list" + ], + "type": "string" + } + }, + "required": [ + "alias", + "created", + "created_by", + "id", + "item_type", + "list_items", + "livemode", + "metadata", + "name", + "object" + ], + "title": "RadarListList", + "type": "object", + "x-expandableFields": [ + "list_items" + ], + "x-resourceId": "radar.value_list" + }, + "radar.value_list_item": { + "description": "Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.\n\nRelated guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who added this item to the value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "radar.value_list_item" + ], + "type": "string" + }, + "value": { + "description": "The value of the item.", + "maxLength": 5000, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list this item belongs to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "created_by", + "id", + "livemode", + "object", + "value", + "value_list" + ], + "title": "RadarListListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "radar.value_list_item" + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "RadarRadarOptions", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "country": { + "description": "Two-letter ISO code representing the country where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "latitude": { + "description": "The geographic latitude where the payment originated.", + "type": [ + "number", + "null" + ] + }, + "longitude": { + "description": "The geographic longitude where the payment originated.", + "type": [ + "number", + "null" + ] + }, + "region": { + "description": "The state/county/province/region where the payment originated.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_session": { + "description": "", + "properties": { + "browser": { + "description": "The browser used in this browser session (e.g., `Chrome`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "device": { + "description": "Information about the device used for the browser session (e.g., `Samsung SM-G930T`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "platform": { + "description": "The platform for the browser session (e.g., `Macintosh`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "version": { + "description": "The version for the browser session (e.g., `61.0.3163.100`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [] + }, + "received_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "The FinancialAccount ID.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.", + "enum": [ + "stripe" + ], + "type": "string" + } + }, + "required": [ + "id", + "network" + ], + "title": "received_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "recurring": { + "description": "", + "properties": { + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum", + null + ], + "type": [ + "string", + "null" + ] + }, + "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" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ], + "title": "Recurring", + "type": "object", + "x-expandableFields": [] + }, + "refund": { + "description": "`Refund` objects allow you to refund a charge that has previously been created\nbut not yet refunded. Funds will be refunded to the credit or debit card that\nwas originally charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)", + "maxLength": 5000, + "type": "string" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + } + ], + "description": "If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "failure_reason": { + "description": "If the refund failed, the reason for refund failure if known. 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": "Email to which refund instructions, if required, are sent to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "next_action": { + "$ref": "#/components/schemas/refund_next_action" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "refund" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason for the refund, 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", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this refund.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "source_transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + }, + "status": { + "description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer_reversal" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object" + ], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "failure_balance_transaction", + "next_action", + "payment_intent", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund" + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/refund_next_action_display_details" + }, + { + "type": "null" + } + ], + "description": "Contains the refund details." + }, + "type": { + "description": "Type of the next action to perform.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "RefundNextAction", + "type": "object", + "x-expandableFields": [ + "display_details" + ] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { + "$ref": "#/components/schemas/email_sent" + }, + "expires_at": { + "description": "The expiry timestamp.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "email_sent", + "expires_at" + ], + "title": "RefundNextActionDisplayDetails", + "type": "object", + "x-expandableFields": [ + "email_sent" + ] + }, + "reporting.report_run": { + "description": "The Report Run object represents an instance of a report type generated with\nspecific run parameters. Once the object is created, Stripe begins processing the report.\nWhen the report has finished running, it will give you a reference to a file\nwhere you can retrieve your results. For an overview, see\n[API Access to Reports](https://stripe.com/docs/reporting/statements/api).\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "description": "If something should go wrong during the run, a message about the failure (populated when\n `status=failed`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "`true` if the report is run on live mode data and `false` if it is run on test mode data.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reporting.report_run" + ], + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/financial_reporting_finance_report_run_run_parameters" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `\"balance.summary.1\"`.", + "maxLength": 5000, + "type": "string" + }, + "result": { + "anyOf": [ + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The file object representing the result of the report run (populated when\n `status=succeeded`)." + }, + "status": { + "description": "Status of this report run. This will be `pending` when the run is initially created.\n When the run finishes, this will be set to `succeeded` and the `result` field will be populated.\n Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.", + "maxLength": 5000, + "type": "string" + }, + "succeeded_at": { + "description": "Timestamp at which this run successfully finished (populated when\n `status=succeeded`). Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "parameters", + "report_type", + "status" + ], + "title": "reporting_report_run", + "type": "object", + "x-expandableFields": [ + "parameters", + "result" + ], + "x-resourceId": "reporting.report_run" + }, + "reporting.report_type": { + "description": "The Report Type resource corresponds to a particular type of report, such as\nthe \"Activity summary\" or \"Itemized payouts\" reports. These objects are\nidentified by an ID belonging to a set of enumerated values. See\n[API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)\nfor those Report Type IDs, along with required and optional parameters.\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "data_available_end": { + "description": "Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_available_start": { + "description": "Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_columns": { + "description": "List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "Human-readable name of the Report Type", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reporting.report_type" + ], + "type": "string" + }, + "updated": { + "description": "When this Report Type was latest updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "version": { + "description": "Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.", + "type": "integer" + } + }, + "required": [ + "data_available_end", + "data_available_start", + "id", + "livemode", + "name", + "object", + "updated", + "version" + ], + "title": "reporting_report_type", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "reporting.report_type" + }, + "reserve_transaction": { + "description": "", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "reserve_transaction" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "id", + "object" + ], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [] + }, + "review": { + "description": "Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).", + "properties": { + "billing_zip": { + "description": "The ZIP or postal code of the card used, if applicable.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The charge associated with this review.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "closed_reason": { + "description": "The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "enum": [ + "approved", + "disputed", + "redacted", + "refunded", + "refunded_as_fraud", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "ip_address_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_location" + }, + { + "type": "null" + } + ], + "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." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "review" + ], + "type": "string" + }, + "open": { + "description": "If `true`, the review needs action.", + "type": "boolean" + }, + "opened_reason": { + "description": "The reason the review was opened. One of `rule` or `manual`.", + "enum": [ + "manual", + "rule" + ], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [ + { + "$ref": "#/components/schemas/radar_review_resource_session" + }, + { + "type": "null" + } + ], + "description": "Information related to the browsing session of the user who initiated the payment." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "open", + "opened_reason", + "reason" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": [ + "charge", + "ip_address_location", + "payment_intent", + "session" + ], + "x-resourceId": "review" + }, + "rule": { + "description": "", + "properties": { + "action": { + "description": "The action taken on the payment.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "predicate": { + "description": "The predicate to evaluate the payment against.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "action", + "id", + "predicate" + ], + "title": "RadarRule", + "type": "object", + "x-expandableFields": [] + }, + "scheduled_query_run": { + "description": "If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_load_time": { + "description": "When the query was run, Sigma contained a snapshot of your Stripe data at this time.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "$ref": "#/components/schemas/sigma_scheduled_query_run_error" + }, + "file": { + "anyOf": [ + { + "$ref": "#/components/schemas/file" + }, + { + "type": "null" + } + ], + "description": "The file object representing the results of the query." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "scheduled_query_run" + ], + "type": "string" + }, + "result_available_until": { + "description": "Time at which the result expires and is no longer available for download.", + "format": "unix-time", + "type": "integer" + }, + "sql": { + "description": "SQL for the query.", + "maxLength": 100000, + "type": "string" + }, + "status": { + "description": "The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.", + "maxLength": 5000, + "type": "string" + }, + "title": { + "description": "Title of the query.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data_load_time", + "id", + "livemode", + "object", + "result_available_until", + "sql", + "status", + "title" + ], + "title": "ScheduledQueryRun", + "type": "object", + "x-expandableFields": [ + "error", + "file" + ], + "x-resourceId": "scheduled_query_run" + }, + "schedules_phase_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "secret_service_resource_scope": { + "description": "", + "properties": { + "type": { + "description": "The secret scope type.", + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "description": "The user ID, if type is set to \"user\"", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "SecretServiceResourceScope", + "type": "object", + "x-expandableFields": [] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + } + }, + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": [ + "charge", + "setup_attempt" + ] + }, + "setup_attempt": { + "description": "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_attempt" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + } + ], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details" + }, + "setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during this attempt to confirm the SetupIntent, if any." + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "status": { + "description": "Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "description": "The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "setup_intent", + "status", + "usage" + ], + "title": "PaymentFlowsSetupIntentSetupAttempt", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent" + ], + "x-resourceId": "setup_attempt" + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_blik" + }, + "boleto": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" + }, + "card": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" + }, + "card_present": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" + }, + "ideal": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_klarna" + }, + "link": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_link" + }, + "sepa_debit": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" + }, + "type": { + "description": "The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/components/schemas/setup_attempt_payment_method_details_us_bank_account" + } + }, + "required": [ + "type" + ], + "title": "SetupAttemptPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "ideal", + "klarna", + "link", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "setup_attempt_payment_method_details_acss_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_au_becs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bacs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "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": { + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/components/schemas/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this authorization used 3D Secure authentication." + } + }, + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "three_d_secure" + ] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + } + }, + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": [ + "generated_card" + ] + }, + "setup_attempt_payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_klarna": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_klarna", + "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_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, + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent": { + "description": "A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.\nFor example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent as soon as you're ready to collect your customer's payment credentials.\nDo not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.\nThe SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/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](/guides/strong-customer-authentication) may need to be run through\n[Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection\nin order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).\nIf the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,\nit will automatically attach the resulting payment method to that Customer.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you ensure that your customers experience the minimum set of required friction,\neven as regulations change over time.\n\nRelated guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + } + ] + } + }, + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "cancellation_reason": { + "description": "Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.", + "enum": [ + "abandoned", + "duplicate", + "requested_by_customer", + null + ], + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [ + { + "$ref": "#/components/schemas/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered in the previous SetupIntent confirmation." + }, + "latest_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The most recent SetupAttempt for this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_attempt" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_next_action" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to continue payment setup." + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "setup_intent" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the setup is intended.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used with this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this SetupIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/mandate" + } + ] + } + }, + "status": { + "description": "[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future.\n\nUse `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method_types", + "status", + "usage" + ], + "title": "SetupIntent", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "last_setup_error", + "latest_attempt", + "mandate", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "single_use_mandate" + ], + "x-resourceId": "setup_intent" + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "redirect_to_url": { + "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" + } + }, + "required": [ + "type" + ], + "title": "SetupIntentNextAction", + "type": "object", + "x-expandableFields": [ + "redirect_to_url", + "verify_with_microdeposits" + ] + }, + "setup_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": [ + "amounts", + "descriptor_code", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "arrival_date", + "hosted_verification_url" + ], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_blik" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card" + }, + "link": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_link" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "setup_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account", + "enum": [ + "cad", + "usd", + null + ], + "type": [ + "string", + "null" + ] + }, + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_blik": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_blik" + } + }, + "title": "setup_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/setup_intent_payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + "challenge_only", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": [ + "string", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "integer", + "null" + ] + }, + "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" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": { + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": [ + "combined", + "interval", + "sporadic", + null + ], + "type": [ + "string", + "null" + ] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": [ + "business", + "personal", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "off_session": { + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": [ + "off_session", + "on_session", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_blik", + "type": "object", + "x-expandableFields": [ + "off_session" + ] + }, + "setup_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": [ + "financial_connections" + ] + }, + "setup_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "verification_method": { + "description": "Bank account verification method.", + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "SetupIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [] + }, + "shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "Shipping", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "shipping_rate": { + "description": "Shipping rates describe the price of shipping presented to your customers and can be\napplied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)\nand [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.", + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "delivery_estimate": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate" + }, + { + "type": "null" + } + ], + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions." + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "fixed_amount": { + "$ref": "#/components/schemas/shipping_rate_fixed_amount" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "shipping_rate" + ], + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified", + null + ], + "type": [ + "string", + "null" + ] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax_code" + } + ] + } + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": [ + "delivery_estimate", + "fixed_amount", + "tax_code" + ], + "x-resourceId": "shipping_rate" + }, + "shipping_rate_currency_option": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount", + "tax_behavior" + ], + "title": "ShippingRateCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite." + }, + "minimum": { + "anyOf": [ + { + "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The lower bound of the estimated range. If empty, represents no lower bound." + } + }, + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": [ + "maximum", + "minimum" + ] + }, + "shipping_rate_delivery_estimate_bound": { + "description": "", + "properties": { + "unit": { + "description": "A unit of time.", + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "ShippingRateDeliveryEstimateBound", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_fixed_amount": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/components/schemas/shipping_rate_currency_option" + }, + "description": "Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "ShippingRateFixedAmount", + "type": "object", + "x-expandableFields": [ + "currency_options" + ] + }, + "sigma_scheduled_query_run_error": { + "description": "", + "properties": { + "message": { + "description": "Information about the run failure.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "SigmaScheduledQueryRunError", + "type": "object", + "x-expandableFields": [] + }, + "source": { + "description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_type_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/components/schemas/source_type_ach_debit" + }, + "acss_debit": { + "$ref": "#/components/schemas/source_type_acss_debit" + }, + "alipay": { + "$ref": "#/components/schemas/source_type_alipay" + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "au_becs_debit": { + "$ref": "#/components/schemas/source_type_au_becs_debit" + }, + "bancontact": { + "$ref": "#/components/schemas/source_type_bancontact" + }, + "card": { + "$ref": "#/components/schemas/source_type_card" + }, + "card_present": { + "$ref": "#/components/schemas/source_type_card_present" + }, + "client_secret": { + "description": "The client secret of the source. Used for client-side retrieval using a publishable key.", + "maxLength": 5000, + "type": "string" + }, + "code_verification": { + "$ref": "#/components/schemas/source_code_verification_flow" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.", + "type": [ + "string", + "null" + ] + }, + "customer": { + "description": "The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.", + "maxLength": 5000, + "type": "string" + }, + "eps": { + "$ref": "#/components/schemas/source_type_eps" + }, + "flow": { + "description": "The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.", + "maxLength": 5000, + "type": "string" + }, + "giropay": { + "$ref": "#/components/schemas/source_type_giropay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/components/schemas/source_type_ideal" + }, + "klarna": { + "$ref": "#/components/schemas/source_type_klarna" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "multibanco": { + "$ref": "#/components/schemas/source_type_multibanco" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source" + ], + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/source_owner" + }, + { + "type": "null" + } + ], + "description": "Information about the owner of the payment instrument that may be used or required by particular source types." + }, + "p24": { + "$ref": "#/components/schemas/source_type_p24" + }, + "receiver": { + "$ref": "#/components/schemas/source_receiver_flow" + }, + "redirect": { + "$ref": "#/components/schemas/source_redirect_flow" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_type_sepa_debit" + }, + "sofort": { + "$ref": "#/components/schemas/source_type_sofort" + }, + "source_order": { + "$ref": "#/components/schemas/source_order" + }, + "statement_descriptor": { + "description": "Extra information about a source. This will appear on your customer's statement every time you charge the source.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.", + "maxLength": 5000, + "type": "string" + }, + "three_d_secure": { + "$ref": "#/components/schemas/source_type_three_d_secure" + }, + "type": { + "description": "The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "alipay", + "au_becs_debit", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "usage": { + "description": "Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "wechat": { + "$ref": "#/components/schemas/source_type_wechat" + } + }, + "required": [ + "client_secret", + "created", + "flow", + "id", + "livemode", + "object", + "status", + "type" + ], + "title": "Source", + "type": "object", + "x-expandableFields": [ + "code_verification", + "owner", + "receiver", + "redirect", + "source_order" + ], + "x-resourceId": "source" + }, + "source_code_verification_flow": { + "description": "", + "properties": { + "attempts_remaining": { + "description": "The number of attempts remaining to authenticate the source object with a verification code.", + "type": "integer" + }, + "status": { + "description": "The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "attempts_remaining", + "status" + ], + "title": "SourceCodeVerificationFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification": { + "description": "Source mandate notifications should be created when a notification related to\na source mandate must be sent to the payer. They will trigger a webhook or\ndeliver an email to the customer.", + "properties": { + "acss_debit": { + "$ref": "#/components/schemas/source_mandate_notification_acss_debit_data" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.", + "type": [ + "integer", + "null" + ] + }, + "bacs_debit": { + "$ref": "#/components/schemas/source_mandate_notification_bacs_debit_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source_mandate_notification" + ], + "type": "string" + }, + "reason": { + "description": "The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.", + "maxLength": 5000, + "type": "string" + }, + "sepa_debit": { + "$ref": "#/components/schemas/source_mandate_notification_sepa_debit_data" + }, + "source": { + "$ref": "#/components/schemas/source" + }, + "status": { + "description": "The status of the mandate notification. Valid statuses are `pending` or `submitted`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "reason", + "source", + "status", + "type" + ], + "title": "SourceMandateNotification", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bacs_debit", + "sepa_debit", + "source" + ], + "x-resourceId": "source_mandate_notification" + }, + "source_mandate_notification_acss_debit_data": { + "description": "", + "properties": { + "statement_descriptor": { + "description": "The statement descriptor associate with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationAcssDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_bacs_debit_data": { + "description": "", + "properties": { + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationBacsDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_sepa_debit_data": { + "description": "", + "properties": { + "creditor_identifier": { + "description": "SEPA creditor ID.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + }, + "mandate_reference": { + "description": "Mandate reference associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationSepaDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_order": { + "description": "", + "properties": { + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "email": { + "description": "The email address of the customer placing the order.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of items constituting the order.", + "items": { + "$ref": "#/components/schemas/source_order_item" + }, + "type": [ + "array", + "null" + ] + }, + "shipping": { + "$ref": "#/components/schemas/shipping" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": [ + "items", + "shipping" + ] + }, + "source_order_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount (price) for this order item.", + "type": [ + "integer", + "null" + ] + }, + "currency": { + "description": "This currency of this order item. Required when `amount` is present.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description for this order item.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "parent": { + "description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [] + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "description": "Owner's address." + }, + "email": { + "description": "Owner's email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Owner's full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "phone": { + "description": "Owner's phone number (including extension).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_address": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "title": "SourceOwner", + "type": "object", + "x-expandableFields": [ + "address", + "verified_address" + ] + }, + "source_receiver_flow": { + "description": "", + "properties": { + "address": { + "description": "The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "amount_charged": { + "description": "The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.", + "type": "integer" + }, + "amount_received": { + "description": "The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.", + "type": "integer" + }, + "amount_returned": { + "description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.", + "type": "integer" + }, + "refund_attributes_method": { + "description": "Type of refund attribute method, one of `email`, `manual`, or `none`.", + "maxLength": 5000, + "type": "string" + }, + "refund_attributes_status": { + "description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_redirect_flow": { + "description": "", + "properties": { + "failure_reason": { + "description": "The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "return_url": { + "description": "The URL you provide to redirect the customer to after they authenticated their payment.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.", + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "return_url", + "status", + "url" + ], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction": { + "description": "Some payment methods have no required amount that a customer must send.\nCustomers can be instructed to send any amount, and it can be made up of\nmultiple transactions. As such, sources can have multiple associated\ntransactions.", + "properties": { + "ach_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_ach_credit_transfer_data" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.", + "type": "integer" + }, + "chf_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_chf_credit_transfer_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "gbp_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_gbp_credit_transfer_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "source_transaction" + ], + "type": "string" + }, + "paper_check": { + "$ref": "#/components/schemas/source_transaction_paper_check_data" + }, + "sepa_credit_transfer": { + "$ref": "#/components/schemas/source_transaction_sepa_credit_transfer_data" + }, + "source": { + "description": "The ID of the source this transaction is attached to.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the transaction, one of `succeeded`, `pending`, or `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this transaction is attached to.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "alipay", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "object", + "source", + "status", + "type" + ], + "title": "SourceTransaction", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "chf_credit_transfer", + "gbp_credit_transfer", + "paper_check", + "sepa_credit_transfer" + ], + "x-resourceId": "source_transaction" + }, + "source_transaction_ach_credit_transfer_data": { + "description": "", + "properties": { + "customer_data": { + "description": "Customer data associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Bank account fingerprint associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionAchCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_chf_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_country": { + "description": "Sender's country address.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_line1": { + "description": "Sender's line 1 address.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionChfCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_gbp_credit_transfer_data": { + "description": "", + "properties": { + "fingerprint": { + "description": "Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.", + "maxLength": 5000, + "type": "string" + }, + "funding_method": { + "description": "The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "Sender entered arbitrary information about the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_account_number": { + "description": "Sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender name associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_sort_code": { + "description": "Sender sort code associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionGbpCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_paper_check_data": { + "description": "", + "properties": { + "available_at": { + "description": "Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.", + "maxLength": 5000, + "type": "string" + }, + "invoices": { + "description": "Comma-separated list of invoice IDs associated with the paper check.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionPaperCheckData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_sepa_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionSepaCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_type_ach_credit_transfer": { + "properties": { + "account_number": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_name": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_type": { + "type": [ + "string", + "null" + ] + }, + "refund_routing_number": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + }, + "swift_code": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_ach_debit": { + "properties": { + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_acss_debit": { + "properties": { + "bank_address_city": { + "type": [ + "string", + "null" + ] + }, + "bank_address_line_1": { + "type": [ + "string", + "null" + ] + }, + "bank_address_line_2": { + "type": [ + "string", + "null" + ] + }, + "bank_address_postal_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_alipay": { + "properties": { + "data_string": { + "type": [ + "string", + "null" + ] + }, + "native_url": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_bancontact": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "preferred_language": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_card": { + "properties": { + "address_line1_check": { + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "type": [ + "string", + "null" + ] + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "type": [ + "string", + "null" + ] + }, + "dynamic_last4": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_card_present": { + "properties": { + "application_cryptogram": { + "type": "string" + }, + "application_preferred_name": { + "type": "string" + }, + "authorization_code": { + "type": [ + "string", + "null" + ] + }, + "authorization_response_code": { + "type": "string" + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "cvm_type": { + "type": "string" + }, + "data_type": { + "type": [ + "string", + "null" + ] + }, + "dedicated_file_name": { + "type": "string" + }, + "emv_auth_data": { + "type": "string" + }, + "evidence_customer_signature": { + "type": [ + "string", + "null" + ] + }, + "evidence_transaction_certificate": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "pos_device_id": { + "type": [ + "string", + "null" + ] + }, + "pos_entry_mode": { + "type": "string" + }, + "read_method": { + "type": [ + "string", + "null" + ] + }, + "reader": { + "type": [ + "string", + "null" + ] + }, + "terminal_verification_results": { + "type": "string" + }, + "transaction_status_information": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_eps": { + "properties": { + "reference": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_giropay": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_ideal": { + "properties": { + "bank": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_klarna": { + "properties": { + "background_image_url": { + "type": "string" + }, + "client_token": { + "type": [ + "string", + "null" + ] + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "page_title": { + "type": "string" + }, + "pay_later_asset_urls_descriptive": { + "type": "string" + }, + "pay_later_asset_urls_standard": { + "type": "string" + }, + "pay_later_name": { + "type": "string" + }, + "pay_later_redirect_url": { + "type": "string" + }, + "pay_now_asset_urls_descriptive": { + "type": "string" + }, + "pay_now_asset_urls_standard": { + "type": "string" + }, + "pay_now_name": { + "type": "string" + }, + "pay_now_redirect_url": { + "type": "string" + }, + "pay_over_time_asset_urls_descriptive": { + "type": "string" + }, + "pay_over_time_asset_urls_standard": { + "type": "string" + }, + "pay_over_time_name": { + "type": "string" + }, + "pay_over_time_redirect_url": { + "type": "string" + }, + "payment_method_categories": { + "type": "string" + }, + "purchase_country": { + "type": "string" + }, + "purchase_type": { + "type": "string" + }, + "redirect_url": { + "type": "string" + }, + "shipping_delay": { + "type": "integer" + }, + "shipping_first_name": { + "type": "string" + }, + "shipping_last_name": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_multibanco": { + "properties": { + "entity": { + "type": [ + "string", + "null" + ] + }, + "reference": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_city": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_country": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_line1": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_line2": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_postal_code": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_address_state": { + "type": [ + "string", + "null" + ] + }, + "refund_account_holder_name": { + "type": [ + "string", + "null" + ] + }, + "refund_iban": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_p24": { + "properties": { + "reference": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_sepa_debit": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "branch_code": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "mandate_reference": { + "type": [ + "string", + "null" + ] + }, + "mandate_url": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_sofort": { + "properties": { + "bank_code": { + "type": [ + "string", + "null" + ] + }, + "bank_name": { + "type": [ + "string", + "null" + ] + }, + "bic": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "iban_last4": { + "type": [ + "string", + "null" + ] + }, + "preferred_language": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_three_d_secure": { + "properties": { + "address_line1_check": { + "type": [ + "string", + "null" + ] + }, + "address_zip_check": { + "type": [ + "string", + "null" + ] + }, + "authenticated": { + "type": [ + "boolean", + "null" + ] + }, + "brand": { + "type": [ + "string", + "null" + ] + }, + "card": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "customer": { + "type": [ + "string", + "null" + ] + }, + "cvc_check": { + "type": [ + "string", + "null" + ] + }, + "dynamic_last4": { + "type": [ + "string", + "null" + ] + }, + "exp_month": { + "type": [ + "integer", + "null" + ] + }, + "exp_year": { + "type": [ + "integer", + "null" + ] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": [ + "string", + "null" + ] + }, + "last4": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "source_type_wechat": { + "properties": { + "prepay_id": { + "type": "string" + }, + "qr_code_url": { + "type": [ + "string", + "null" + ] + }, + "statement_descriptor": { + "type": "string" + } + }, + "type": "object" + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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", + "type": "integer" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "cancel_at": { + "description": "A date in the future at which the subscription will automatically get canceled", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "cancel_at_period_end": { + "description": "If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current 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", + "type": [ + "integer", + "null" + ] + }, + "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).", + "type": "string" + }, + "current_period_end": { + "description": "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "Start of the current period that the subscription has been invoiced for.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.", + "type": [ + "integer", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "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.", + "maxLength": 500, + "type": [ + "string", + "null" + ] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/components/schemas/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis." + }, + "ended_at": { + "description": "If the subscription has ended, the date the subscription ended.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of subscription items, each with an attached price.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "latest_invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/invoice" + }, + { + "type": "null" + } + ], + "description": "The most recent invoice this subscription has generated.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "next_pending_invoice_item_invoice": { + "description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription" + ], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "pause_collection": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pause_collection" + }, + { + "type": "null" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_settings" + }, + { + "type": "null" + } + ], + "description": "Payment settings passed on to invoices created by the subscription." + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" + }, + { + "type": "null" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "pending_setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + }, + { + "type": "null" + } + ], + "description": "You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + }, + "pending_update": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_pending_update" + }, + { + "type": "null" + } + ], + "description": "If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid." + }, + "schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The schedule attached to the subscription", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription_schedule" + } + ] + } + }, + "start_date": { + "description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, 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\nIf subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.", + "enum": [ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "If the subscription has a trial, the end of that trial.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings" + }, + { + "type": "null" + } + ], + "description": "Settings related to subscription trials." + }, + "trial_start": { + "description": "If the subscription has a trial, the beginning of that trial.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "automatic_tax", + "billing_cycle_anchor", + "cancel_at_period_end", + "collection_method", + "created", + "currency", + "current_period_end", + "current_period_start", + "customer", + "id", + "items", + "livemode", + "metadata", + "object", + "start_date", + "status" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_thresholds", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription" + }, + "subscription_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this subscription.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "subscription_billing_thresholds": { + "description": "", + "properties": { + "amount_gte": { + "description": "Monetary threshold that triggers the subscription to create an invoice", + "type": [ + "integer", + "null" + ] + }, + "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`.", + "type": [ + "boolean", + "null" + ] + } + }, + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_item": { + "description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_item" + ], + "type": "string" + }, + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "description": "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "subscription": { + "description": "The `subscription` this `subscription_item` belongs to.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "created", + "id", + "metadata", + "object", + "price", + "subscription" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ], + "x-resourceId": "subscription_item" + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "type": [ + "integer", + "null" + ] + } + }, + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/components/schemas/invoice_mandate_options_card" + }, + "network": { + "description": "Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.", + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": [ + "string", + "null" + ] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": [ + "any", + "automatic", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": [ + "mandate_options" + ] + }, + "subscription_pending_invoice_item_interval": { + "description": "", + "properties": { + "interval": { + "description": "Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).", + "type": "integer" + } + }, + "required": [ + "interval", + "interval_count" + ], + "title": "SubscriptionPendingInvoiceItemInterval", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule": { + "description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/application" + }, + { + "$ref": "#/components/schemas/deleted_application" + } + ] + } + }, + "canceled_at": { + "description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "completed_at": { + "description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_phase": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_schedule_current_phase" + }, + { + "type": "null" + } + ], + "description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`." + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + }, + "default_settings": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "subscription_schedule" + ], + "type": "string" + }, + "phases": { + "description": "Configuration for the subscription schedule's phases.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_phase_configuration" + }, + "type": "array" + }, + "released_at": { + "description": "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "released_subscription": { + "description": "ID of the subscription once managed by the subscription schedule (if it is released).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "status": { + "description": "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "enum": [ + "active", + "canceled", + "completed", + "not_started", + "released" + ], + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/subscription" + }, + { + "type": "null" + } + ], + "description": "ID of the subscription managed by the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscription" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "customer", + "default_settings", + "end_behavior", + "id", + "livemode", + "object", + "phases", + "status" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule" + }, + "subscription_schedule_add_invoice_item": { + "description": "An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.", + "properties": { + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "The quantity of the invoice item.", + "type": [ + "integer", + "null" + ] + }, + "tax_rates": { + "description": "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": [ + "price", + "tax_rates" + ] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.", + "type": [ + "object", + "null" + ] + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/price" + }, + { + "$ref": "#/components/schemas/deleted_price" + } + ] + } + }, + "quantity": { + "description": "Quantity of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "tax_rates": { + "description": "The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + } + }, + "required": [ + "price" + ], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": [ + "billing_thresholds", + "price", + "tax_rates" + ] + }, + "subscription_schedule_current_phase": { + "description": "", + "properties": { + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end_date", + "start_date" + ], + "title": "SubscriptionScheduleCurrentPhase", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule_phase_configuration": { + "description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.", + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/schedules_phase_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start", + null + ], + "type": [ + "string", + "null" + ] + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + }, + { + "type": "null" + } + ], + "description": "ID of the coupon to use during this phase of the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/coupon" + }, + { + "$ref": "#/components/schemas/deleted_coupon" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": [ + "array", + "null" + ] + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The invoice settings applicable during this phase." + }, + "items": { + "description": "Subscription items to configure the subscription to during this phase of the subscription schedule.", + "items": { + "$ref": "#/components/schemas/subscription_schedule_configuration_item" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.", + "type": [ + "object", + "null" + ] + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "proration_behavior": { + "description": "If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "When the trial ends within the phase.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "add_invoice_items", + "currency", + "end_date", + "items", + "proration_behavior", + "start_date" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "coupon", + "default_payment_method", + "default_tax_rates", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings": { + "description": "", + "properties": { + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": [ + "number", + "null" + ] + }, + "automatic_tax": { + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_method" + } + ] + } + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule's default invoice settings." + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + } + }, + "required": [ + "billing_cycle_anchor" + ], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": [ + "number", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "subscriptions_resource_pause_collection": { + "description": "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.", + "properties": { + "behavior": { + "description": "The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.", + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "behavior" + ], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription." + }, + "card": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscription_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription." + } + }, + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to invoices created by the subscription." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": [ + "array", + "null" + ] + }, + "save_default_payment_method": { + "description": "Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.", + "enum": [ + "off", + "on_subscription", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": [ + "payment_method_options" + ] + }, + "subscriptions_resource_pending_update": { + "description": "Pending Updates store the changes pending from a previous update that will be applied\nto the Subscription upon successful payment.", + "properties": { + "billing_cycle_anchor": { + "description": "If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "expires_at": { + "description": "The point after which the changes reflected by this update will be discarded and no longer applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription_items": { + "description": "List of subscription items, each with an attached plan, that will be set if the update is applied.", + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": [ + "array", + "null" + ] + }, + "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", + "type": [ + "integer", + "null" + ] + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "expires_at" + ], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": [ + "subscription_items" + ] + }, + "subscriptions_trials_resource_end_behavior": { + "description": "Defines how a subscription behaves when a free trial ends.", + "properties": { + "missing_payment_method": { + "description": "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.", + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "SubscriptionsTrialsResourceEndBehavior", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_trials_resource_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { + "$ref": "#/components/schemas/subscriptions_trials_resource_end_behavior" + } + }, + "required": [ + "end_behavior" + ], + "title": "SubscriptionsTrialsResourceTrialSettings", + "type": "object", + "x-expandableFields": [ + "end_behavior" + ] + }, + "tax_code": { + "description": "[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.", + "properties": { + "description": { + "description": "A detailed description of which types of products the tax code represents.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "A short name for the tax code.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_code" + ], + "type": "string" + } + }, + "required": [ + "description", + "id", + "name", + "object" + ], + "title": "TaxProductResourceTaxCode", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_code" + }, + "tax_deducted_at_source": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_deducted_at_source" + ], + "type": "string" + }, + "period_end": { + "description": "The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "tax_deduction_account_number": { + "description": "The TAN that was supplied to Stripe when TDS was assessed", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "id", + "object", + "period_end", + "period_start", + "tax_deduction_account_number" + ], + "title": "TaxDeductedAtSource", + "type": "object", + "x-expandableFields": [] + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.\n\nRelated guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country of the tax ID.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_id" + ], + "type": "string" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "Value of the tax ID.", + "maxLength": 5000, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_id_verification" + }, + { + "type": "null" + } + ], + "description": "Tax ID verification information." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "type", + "value" + ], + "title": "tax_id", + "type": "object", + "x-expandableFields": [ + "customer", + "verification" + ], + "x-resourceId": "tax_id" + }, + "tax_id_verification": { + "description": "", + "properties": { + "status": { + "description": "Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.", + "enum": [ + "pending", + "unavailable", + "unverified", + "verified" + ], + "type": "string" + }, + "verified_address": { + "description": "Verified address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "verified_name": { + "description": "Verified name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "status" + ], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [] + }, + "tax_rate": { + "description": "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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" + }, + "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, + "type": [ + "string", + "null" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax_rate" + ], + "type": "string" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "active", + "created", + "display_name", + "id", + "inclusive", + "livemode", + "object", + "percentage" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_rate" + }, + "terminal.configuration": { + "description": "A Configurations object represents how features should be configured for terminal readers.", + "properties": { + "bbpos_wisepos_e": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_account_default": { + "description": "Whether this Configuration is the default for your account", + "type": [ + "boolean", + "null" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.configuration" + ], + "type": "string" + }, + "tipping": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_tipping" + }, + "verifone_p400": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + } + }, + "required": [ + "id", + "livemode", + "object" + ], + "title": "TerminalConfigurationConfiguration", + "type": "object", + "x-expandableFields": [ + "bbpos_wisepos_e", + "tipping", + "verifone_p400" + ], + "x-resourceId": "terminal.configuration" + }, + "terminal.connection_token": { + "description": "A Connection Token is used by the Stripe Terminal SDK to connect to a reader.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).", + "properties": { + "location": { + "description": "The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.connection_token" + ], + "type": "string" + }, + "secret": { + "description": "Your application should pass this token to the Stripe Terminal SDK.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "object", + "secret" + ], + "title": "TerminalConnectionToken", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "terminal.connection_token" + }, + "terminal.location": { + "description": "A Location represents a grouping of readers.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the location.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.location" + ], + "type": "string" + } + }, + "required": [ + "address", + "display_name", + "id", + "livemode", + "metadata", + "object" + ], + "title": "TerminalLocationLocation", + "type": "object", + "x-expandableFields": [ + "address" + ], + "x-resourceId": "terminal.location" + }, + "terminal.reader": { + "description": "A Reader represents a physical device for accepting payment details.\n\nRelated guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).", + "properties": { + "action": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal_reader_reader_resource_reader_action" + }, + { + "type": "null" + } + ], + "description": "The most recent action performed by the reader." + }, + "device_sw_version": { + "description": "The current software version of the reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "device_type": { + "description": "Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`.", + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "simulated_wisepos_e", + "stripe_m2", + "verifone_P400" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The local IP address of the reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "label": { + "description": "Custom label given to the reader for easier identification.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "location": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "type": "null" + } + ], + "description": "The location identifier of the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/terminal.location" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "terminal.reader" + ], + "type": "string" + }, + "serial_number": { + "description": "Serial number of the reader.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The networking status of the reader.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "device_type", + "id", + "label", + "livemode", + "metadata", + "object", + "serial_number" + ], + "title": "TerminalReaderReader", + "type": "object", + "x-expandableFields": [ + "action", + "location" + ], + "x-resourceId": "terminal.reader" + }, + "terminal_configuration_configuration_resource_currency_specific_config": { + "description": "", + "properties": { + "fixed_amounts": { + "description": "Fixed amounts displayed when collecting a tip", + "items": { + "type": "integer" + }, + "type": [ + "array", + "null" + ] + }, + "percentages": { + "description": "Percentages displayed when collecting a tip", + "items": { + "type": "integer" + }, + "type": [ + "array", + "null" + ] + }, + "smart_tip_threshold": { + "description": "Below this amount, fixed amounts will be displayed; above it, percentages will be displayed", + "type": "integer" + } + }, + "title": "TerminalConfigurationConfigurationResourceCurrencySpecificConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_configuration_configuration_resource_device_type_specific_config": { + "description": "", + "properties": { + "splashscreen": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/file" + } + ], + "description": "A File ID representing an image you would like displayed on the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/file" + } + ] + } + } + }, + "title": "TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig", + "type": "object", + "x-expandableFields": [ + "splashscreen" + ] + }, + "terminal_configuration_configuration_resource_tipping": { + "description": "", + "properties": { + "aud": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "cad": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "chf": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "czk": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "dkk": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "eur": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "gbp": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "hkd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "myr": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nok": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nzd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sek": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sgd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + }, + "usd": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + } + }, + "title": "TerminalConfigurationConfigurationResourceTipping", + "type": "object", + "x-expandableFields": [ + "aud", + "cad", + "chf", + "czk", + "dkk", + "eur", + "gbp", + "hkd", + "myr", + "nok", + "nzd", + "sek", + "sgd", + "usd" + ] + }, + "terminal_reader_reader_resource_cart": { + "description": "Represents a cart to be displayed on the reader", + "properties": { + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "line_items": { + "description": "List of line items in the cart.", + "items": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_line_item" + }, + "type": "array" + }, + "tax": { + "description": "Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": [ + "integer", + "null" + ] + }, + "total": { + "description": "Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "required": [ + "currency", + "line_items", + "total" + ], + "title": "TerminalReaderReaderResourceCart", + "type": "object", + "x-expandableFields": [ + "line_items" + ] + }, + "terminal_reader_reader_resource_line_item": { + "description": "Represents a line item to be displayed on the reader", + "properties": { + "amount": { + "description": "The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "description": { + "description": "Description of the line item.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The quantity of the line item.", + "type": "integer" + } + }, + "required": [ + "amount", + "description", + "quantity" + ], + "title": "TerminalReaderReaderResourceLineItem", + "type": "object", + "x-expandableFields": [] + }, + "terminal_reader_reader_resource_process_config": { + "description": "Represents a per-transaction override of a reader configuration", + "properties": { + "skip_tipping": { + "description": "Override showing a tipping selection screen on this transaction.", + "type": "boolean" + }, + "tipping": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_tipping_config" + } + }, + "title": "TerminalReaderReaderResourceProcessConfig", + "type": "object", + "x-expandableFields": [ + "tipping" + ] + }, + "terminal_reader_reader_resource_process_payment_intent_action": { + "description": "Represents a reader action to process a payment intent", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "Most recent PaymentIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "process_config": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_config" + } + }, + "required": [ + "payment_intent" + ], + "title": "TerminalReaderReaderResourceProcessPaymentIntentAction", + "type": "object", + "x-expandableFields": [ + "payment_intent", + "process_config" + ] + }, + "terminal_reader_reader_resource_process_setup_intent_action": { + "description": "Represents a reader action to process a setup intent", + "properties": { + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/setup_intent" + } + ], + "description": "Most recent SetupIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/setup_intent" + } + ] + } + } + }, + "required": [ + "setup_intent" + ], + "title": "TerminalReaderReaderResourceProcessSetupIntentAction", + "type": "object", + "x-expandableFields": [ + "setup_intent" + ] + }, + "terminal_reader_reader_resource_reader_action": { + "description": "Represents an action performed by the reader", + "properties": { + "failure_code": { + "description": "Failure code, only set if status is `failed`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Detailed failure message, only set if status is `failed`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "process_payment_intent": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_payment_intent_action" + }, + "process_setup_intent": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_setup_intent_action" + }, + "refund_payment": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_refund_payment_action" + }, + "set_reader_display": { + "$ref": "#/components/schemas/terminal_reader_reader_resource_set_reader_display_action" + }, + "status": { + "description": "Status of the action performed by the reader.", + "enum": [ + "failed", + "in_progress", + "succeeded" + ], + "type": "string" + }, + "type": { + "description": "Type of action performed by the reader.", + "enum": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "status", + "type" + ], + "title": "TerminalReaderReaderResourceReaderAction", + "type": "object", + "x-expandableFields": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ] + }, + "terminal_reader_reader_resource_refund_payment_action": { + "description": "Represents a reader action to refund a payment", + "properties": { + "amount": { + "description": "The amount being refunded.", + "type": "integer" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "Charge that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/payment_intent" + } + ], + "description": "Payment intent that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason for the refund.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "type": "string" + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + } + ], + "description": "Unique identifier for the refund object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.", + "type": "boolean" + } + }, + "title": "TerminalReaderReaderResourceRefundPaymentAction", + "type": "object", + "x-expandableFields": [ + "charge", + "payment_intent", + "refund" + ] + }, + "terminal_reader_reader_resource_set_reader_display_action": { + "description": "Represents a reader action to set the reader display", + "properties": { + "cart": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal_reader_reader_resource_cart" + }, + { + "type": "null" + } + ], + "description": "Cart object to be displayed by the reader." + }, + "type": { + "description": "Type of information to be displayed by the reader.", + "enum": [ + "cart" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "TerminalReaderReaderResourceSetReaderDisplayAction", + "type": "object", + "x-expandableFields": [ + "cart" + ] + }, + "terminal_reader_reader_resource_tipping_config": { + "description": "Represents a per-transaction tipping configuration", + "properties": { + "amount_eligible": { + "description": "Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).", + "type": "integer" + } + }, + "title": "TerminalReaderReaderResourceTippingConfig", + "type": "object", + "x-expandableFields": [] + }, + "test_helpers.test_clock": { + "description": "A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,\nyou can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deletes_after": { + "description": "Time at which this clock is scheduled to auto delete.", + "format": "unix-time", + "type": "integer" + }, + "frozen_time": { + "description": "Time at which all objects belonging to this clock are frozen.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "The custom name supplied at creation.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "object", + "status" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "test_helpers.test_clock" + }, + "three_d_secure_details": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": [ + "challenge", + "frictionless", + null + ], + "type": [ + "string", + "null" + ] + }, + "result": { + "description": "Indicates the outcome of 3D Secure authentication.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + null + ], + "type": [ + "string", + "null" + ] + }, + "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", + null + ], + "type": [ + "string", + "null" + ] + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": [ + "1.0.2", + "2.1.0", + "2.2.0", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_usage": { + "description": "", + "properties": { + "supported": { + "description": "Whether 3D Secure is supported on this card.", + "type": "boolean" + } + }, + "required": [ + "supported" + ], + "title": "three_d_secure_usage", + "type": "object", + "x-expandableFields": [] + }, + "token": { + "description": "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. You should use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\nclient-side. This ensures that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you cannot use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. Keep in mind that if\nyour integration uses this method, you are responsible for any PCI compliance\nthat may be required, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information is not sent directly to\nStripe, so we cannot determine how it is handled or stored.\n\nTokens cannot be stored or used more than once. To store card or bank account\ninformation for later use, you can create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.\n\nRelated guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)", + "properties": { + "bank_account": { + "$ref": "#/components/schemas/bank_account" + }, + "card": { + "$ref": "#/components/schemas/card" + }, + "client_ip": { + "description": "IP address of the client that generated the token.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "token" + ], + "type": "string" + }, + "type": { + "description": "Type of the token: `account`, `bank_account`, `card`, or `pii`.", + "maxLength": 5000, + "type": "string" + }, + "used": { + "description": "Whether this token has already been used (tokens can be used only once).", + "type": "boolean" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "type", + "used" + ], + "title": "Token", + "type": "object", + "x-expandableFields": [ + "bank_account", + "card" + ], + "x-resourceId": "token" + }, + "topup": { + "description": "To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).", + "properties": { + "amount": { + "description": "Amount transferred.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "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.", + "type": [ + "integer", + "null" + ] + }, + "failure_code": { + "description": "Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_message": { + "description": "Message to user further explaining reason for top-up failure if available.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "topup" + ], + "type": "string" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/source" + }, + { + "type": "null" + } + ], + "description": "For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account." + }, + "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, + "type": [ + "string", + "null" + ] + }, + "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, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "status" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "source" + ], + "x-resourceId": "topup" + }, + "transfer": { + "description": "A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).", + "properties": { + "amount": { + "description": "Amount in %s to be transferred.", + "type": "integer" + }, + "amount_reversed": { + "description": "Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time that this record of the transfer was first created.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + }, + { + "type": "null" + } + ], + "description": "ID of the Stripe account the transfer was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "destination_payment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + } + ], + "description": "If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer" + ], + "type": "string" + }, + "reversals": { + "description": "A list of reversals that have been applied to the transfer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "reversed": { + "description": "Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.", + "type": "boolean" + }, + "source_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/charge" + } + ] + } + }, + "source_type": { + "description": "The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "amount", + "amount_reversed", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer" + }, + "transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The account (if any) the payment will be attributed to for tax\nreporting, and where funds from the payment will be transferred to upon\npayment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + } + }, + "required": [ + "destination" + ], + "title": "transfer_data", + "type": "object", + "x-expandableFields": [ + "destination" + ] + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/balance_transaction" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination_payment_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "Linked payment refund for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "transfer_reversal" + ], + "type": "string" + }, + "source_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/refund" + }, + { + "type": "null" + } + ], + "description": "ID of the refund responsible for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/refund" + } + ] + } + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/transfer" + } + ], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/transfer" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "object", + "transfer" + ], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal" + }, + "transfer_schedule": { + "description": "", + "properties": { + "delay_days": { + "description": "The number of days charges for the account will be held before being paid out.", + "type": "integer" + }, + "interval": { + "description": "How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.", + "maxLength": 5000, + "type": "string" + }, + "monthly_anchor": { + "description": "The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.", + "type": "integer" + }, + "weekly_anchor": { + "description": "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "delay_days", + "interval" + ], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [] + }, + "transform_quantity": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "TransformQuantity", + "type": "object", + "x-expandableFields": [] + }, + "transform_usage": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "TransformUsage", + "type": "object", + "x-expandableFields": [] + }, + "treasury.credit_reversal": { + "description": "You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": [ + "ach", + "stripe" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.credit_reversal" + ], + "type": "string" + }, + "received_credit": { + "description": "The ReceivedCredit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the CreditReversal", + "enum": [ + "canceled", + "posted", + "processing" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_received_credits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "financial_account", + "id", + "livemode", + "metadata", + "network", + "object", + "received_credit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedCreditsResourceCreditReversal", + "type": "object", + "x-expandableFields": [ + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.credit_reversal" + }, + "treasury.debit_reversal": { + "description": "You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_debits_resource_debit_reversal_linked_flows" + }, + { + "type": "null" + } + ], + "description": "Other flows linked to a DebitReversal." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": [ + "ach", + "card" + ], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.debit_reversal" + ], + "type": "string" + }, + "received_debit": { + "description": "The ReceivedDebit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the DebitReversal", + "enum": [ + "failed", + "processing", + "succeeded" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_received_debits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "network", + "object", + "received_debit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedDebitsResourceDebitReversal", + "type": "object", + "x-expandableFields": [ + "linked_flows", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.debit_reversal" + }, + "treasury.financial_account": { + "description": "Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.\nFinancialAccounts serve as the source and destination of Treasury’s money movement APIs.", + "properties": { + "active_features": { + "description": "The array of paths to active Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "balance": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_balance" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "features": { + "$ref": "#/components/schemas/treasury.financial_account_features" + }, + "financial_addresses": { + "description": "The set of credentials that resolve to a FinancialAccount.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_address" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": [ + "object", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.financial_account" + ], + "type": "string" + }, + "pending_features": { + "description": "The array of paths to pending Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "platform_restrictions": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_platform_restrictions" + }, + { + "type": "null" + } + ], + "description": "The set of functionalities that the platform can restrict on the FinancialAccount." + }, + "restricted_features": { + "description": "The array of paths to restricted Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "status": { + "description": "The enum specifying what state the account is in.", + "enum": [ + "closed", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_details": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_status_details" + }, + "supported_currencies": { + "description": "The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "balance", + "country", + "created", + "financial_addresses", + "id", + "livemode", + "object", + "status", + "status_details", + "supported_currencies" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccount", + "type": "object", + "x-expandableFields": [ + "balance", + "features", + "financial_addresses", + "platform_restrictions", + "status_details" + ], + "x-resourceId": "treasury.financial_account" + }, + "treasury.financial_account_features": { + "description": "Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.\nStripe or the platform can control Features via the requested field.", + "properties": { + "card_issuing": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "deposit_insurance": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "financial_addresses": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_addresses_features" + }, + "inbound_transfers": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_inbound_transfers" + }, + "intra_stripe_flows": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.financial_account_features" + ], + "type": "string" + }, + "outbound_payments": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_payments" + }, + "outbound_transfers": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_transfers" + } + }, + "required": [ + "object" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccountFeatures", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "deposit_insurance", + "financial_addresses", + "inbound_transfers", + "intra_stripe_flows", + "outbound_payments", + "outbound_transfers" + ], + "x-resourceId": "treasury.financial_account_features" + }, + "treasury.inbound_transfer": { + "description": "Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the InboundTransfer is able to be canceled.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "failure_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_failure_details" + }, + { + "type": "null" + } + ], + "description": "Details about this InboundTransfer's failure. Only set when status is `failed`." + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.inbound_transfer" + ], + "type": "string" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for an InboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "origin_payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/inbound_transfers" + }, + { + "type": "null" + } + ], + "description": "Details about the PaymentMethod for an InboundTransfer." + }, + "returned": { + "description": "Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.", + "type": [ + "boolean", + "null" + ] + }, + "statement_descriptor": { + "description": "Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been \"confirmed\" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.", + "enum": [ + "canceled", + "failed", + "processing", + "succeeded" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "financial_account", + "id", + "linked_flows", + "livemode", + "metadata", + "object", + "origin_payment_method", + "statement_descriptor", + "status", + "status_transitions" + ], + "title": "TreasuryInboundTransfersResourceInboundTransfer", + "type": "object", + "x-expandableFields": [ + "failure_details", + "linked_flows", + "origin_payment_method_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.inbound_transfer" + }, + "treasury.outbound_payment": { + "description": "Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).\n\nSimulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination_payment_method": { + "description": "The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination_payment_method_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/outbound_payments_payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Details about the PaymentMethod for an OutboundPayment." + }, + "end_user_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details" + }, + { + "type": "null" + } + ], + "description": "Details about the end user." + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.outbound_payment" + ], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_returned_status" + }, + { + "type": "null" + } + ], + "description": "Details about a returned OutboundPayment. Only set when the status is `returned`." + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been \"confirmed\" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.", + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPayment", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "end_user_details", + "returned_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.outbound_payment" + }, + "treasury.outbound_transfer": { + "description": "Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.\n\nSimulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination_payment_method": { + "description": "The PaymentMethod used as the payment instrument for an OutboundTransfer.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "destination_payment_method_details": { + "$ref": "#/components/schemas/outbound_transfers_payment_method_details" + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.outbound_transfer" + ], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_returned_details" + }, + { + "type": "null" + } + ], + "description": "Details about a returned OutboundTransfer. Only set when the status is `returned`." + }, + "statement_descriptor": { + "description": "Information about the OutboundTransfer to be sent to the recipient account.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been \"confirmed\" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.", + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "destination_payment_method_details", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundTransfersResourceOutboundTransfer", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "returned_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.outbound_transfer" + }, + "treasury.received_credit": { + "description": "ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.", + "enum": [ + "account_closed", + "account_frozen", + "other", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_received_credits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The rails used to send the funds.", + "enum": [ + "ach", + "card", + "stripe", + "us_domestic_wire" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.received_credit" + ], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_credits_resource_reversal_details" + }, + { + "type": "null" + } + ], + "description": "Details describing when a ReceivedCredit may be reversed." + }, + "status": { + "description": "Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.", + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "initiating_payment_method_details", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedCreditsResourceReceivedCredit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_credit" + }, + "treasury.received_debit": { + "description": "ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.", + "enum": [ + "account_closed", + "account_frozen", + "insufficient_funds", + "other", + null + ], + "type": [ + "string", + "null" + ] + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/components/schemas/treasury_received_debits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The network used for the ReceivedDebit.", + "enum": [ + "ach", + "card", + "stripe" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.received_debit" + ], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_debits_resource_reversal_details" + }, + { + "type": "null" + } + ], + "description": "Details describing when a ReceivedDebit might be reversed." + }, + "status": { + "description": "Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.", + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedDebitsResourceReceivedDebit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_debit" + }, + "treasury.transaction": { + "description": "Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "balance_impact": { + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "entries": { + "description": "A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": [ + "object", + "null" + ], + "x-expandableFields": [ + "data" + ] + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "ID of the flow that created the Transaction.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + }, + { + "type": "null" + } + ], + "description": "Details of the flow that created the Transaction." + }, + "flow_type": { + "description": "Type of the flow that created the Transaction.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.transaction" + ], + "type": "string" + }, + "status": { + "description": "Status of the Transaction.", + "enum": [ + "open", + "posted", + "void" + ], + "type": "string" + }, + "status_transitions": { + "$ref": "#/components/schemas/treasury_transactions_resource_abstract_transaction_resource_status_transitions" + } + }, + "required": [ + "amount", + "balance_impact", + "created", + "currency", + "description", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "status", + "status_transitions" + ], + "title": "TreasuryTransactionsResourceTransaction", + "type": "object", + "x-expandableFields": [ + "balance_impact", + "entries", + "flow_details", + "status_transitions" + ], + "x-resourceId": "treasury.transaction" + }, + "treasury.transaction_entry": { + "description": "TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).", + "properties": { + "balance_impact": { + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "effective_at": { + "description": "When the TransactionEntry will impact the FinancialAccount's balance.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "Token of the flow associated with the TransactionEntry.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + }, + { + "type": "null" + } + ], + "description": "Details of the flow associated with the TransactionEntry." + }, + "flow_type": { + "description": "Type of the flow associated with the TransactionEntry.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "treasury.transaction_entry" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + }, + "type": { + "description": "The specific money movement that generated the TransactionEntry.", + "enum": [ + "credit_reversal", + "credit_reversal_posting", + "debit_reversal", + "inbound_transfer", + "inbound_transfer_return", + "issuing_authorization_hold", + "issuing_authorization_release", + "other", + "outbound_payment", + "outbound_payment_cancellation", + "outbound_payment_failure", + "outbound_payment_posting", + "outbound_payment_return", + "outbound_transfer", + "outbound_transfer_cancellation", + "outbound_transfer_failure", + "outbound_transfer_posting", + "outbound_transfer_return", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": [ + "balance_impact", + "created", + "currency", + "effective_at", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "transaction", + "type" + ], + "title": "TreasuryTransactionsResourceTransactionEntry", + "type": "object", + "x-expandableFields": [ + "balance_impact", + "flow_details", + "transaction" + ], + "x-resourceId": "treasury.transaction_entry" + }, + "treasury_financial_accounts_resource_aba_record": { + "description": "ABA Records contain U.S. bank account details per the ABA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "account_number_last4": { + "description": "The last four characters of the account number.", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number for the account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number_last4", + "bank_name", + "routing_number" + ], + "title": "TreasuryFinancialAccountsResourceABARecord", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_ach_toggle_settings": { + "description": "Toggle settings for enabling/disabling an ACH specific feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": [ + "active", + "pending", + "restricted" + ], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": [ + "requested", + "status", + "status_details" + ], + "title": "TreasuryFinancialAccountsResourceAchToggleSettings", + "type": "object", + "x-expandableFields": [ + "status_details" + ] + }, + "treasury_financial_accounts_resource_balance": { + "description": "Balance information for the FinancialAccount", + "properties": { + "cash": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds the user can spend right now.", + "type": "object" + }, + "inbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds not spendable yet, but will become available at a later time.", + "type": "object" + }, + "outbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "object" + } + }, + "required": [ + "cash", + "inbound_pending", + "outbound_pending" + ], + "title": "TreasuryFinancialAccountsResourceBalance", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_closed_status_details": { + "description": "", + "properties": { + "reasons": { + "description": "The array that contains reasons for a FinancialAccount closure.", + "items": { + "enum": [ + "account_rejected", + "closed_by_platform", + "other" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "reasons" + ], + "title": "TreasuryFinancialAccountsResourceClosedStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "aba": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_aba_record" + }, + "supported_networks": { + "description": "The list of networks that the address supports", + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": [ + "aba" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAddress", + "type": "object", + "x-expandableFields": [ + "aba" + ] + }, + "treasury_financial_accounts_resource_financial_addresses_features": { + "description": "Settings related to Financial Addresses features on a Financial Account", + "properties": { + "aba": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceFinancialAddressesFeatures", + "type": "object", + "x-expandableFields": [ + "aba" + ] + }, + "treasury_financial_accounts_resource_inbound_transfers": { + "description": "InboundTransfers contains inbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_ach_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceInboundTransfers", + "type": "object", + "x-expandableFields": [ + "ach" + ] + }, + "treasury_financial_accounts_resource_outbound_payments": { + "description": "Settings related to Outbound Payments features on a Financial Account", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundPayments", + "type": "object", + "x-expandableFields": [ + "ach", + "us_domestic_wire" + ] + }, + "treasury_financial_accounts_resource_outbound_transfers": { + "description": "OutboundTransfers contains outbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundTransfers", + "type": "object", + "x-expandableFields": [ + "ach", + "us_domestic_wire" + ] + }, + "treasury_financial_accounts_resource_platform_restrictions": { + "description": "Restrictions that a Connect Platform has placed on this FinancialAccount.", + "properties": { + "inbound_flows": { + "description": "Restricts all inbound money movement.", + "enum": [ + "restricted", + "unrestricted", + null + ], + "type": [ + "string", + "null" + ] + }, + "outbound_flows": { + "description": "Restricts all outbound money movement.", + "enum": [ + "restricted", + "unrestricted", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryFinancialAccountsResourcePlatformRestrictions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_status_details": { + "description": "", + "properties": { + "closed": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_closed_status_details" + }, + { + "type": "null" + } + ], + "description": "Details related to the closure of this FinancialAccount" + } + }, + "title": "TreasuryFinancialAccountsResourceStatusDetails", + "type": "object", + "x-expandableFields": [ + "closed" + ] + }, + "treasury_financial_accounts_resource_toggle_settings": { + "description": "Toggle settings for enabling/disabling a feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": [ + "active", + "pending", + "restricted" + ], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": [ + "requested", + "status", + "status_details" + ], + "title": "TreasuryFinancialAccountsResourceToggleSettings", + "type": "object", + "x-expandableFields": [ + "status_details" + ] + }, + "treasury_financial_accounts_resource_toggles_setting_status_details": { + "description": "Additional details on the FinancialAccount Features information.", + "properties": { + "code": { + "description": "Represents the reason why the status is `pending` or `restricted`.", + "enum": [ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "resolution": { + "description": "Represents what the user should do, if anything, to activate the Feature.", + "enum": [ + "contact_stripe", + "provide_information", + "remove_restriction", + null + ], + "type": [ + "string", + "null" + ], + "x-stripeBypassValidation": true + }, + "restriction": { + "description": "The `platform_restrictions` that are restricting this Feature.", + "enum": [ + "inbound_flows", + "outbound_flows" + ], + "type": "string" + } + }, + "required": [ + "code" + ], + "title": "TreasuryFinancialAccountsResourceTogglesSettingStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_failure_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the failure.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "required": [ + "code" + ], + "title": "TreasuryInboundTransfersResourceFailureDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows": { + "description": "", + "properties": { + "received_debit": { + "description": "If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `canceled`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "failed_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `failed`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "succeeded_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `succeeded`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_end_user_details": { + "description": "", + "properties": { + "ip_address": { + "description": "IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "present": { + "description": "`true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.", + "type": "boolean" + } + }, + "required": [ + "present" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `canceled`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "failed_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `failed`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "posted_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `posted`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "returned_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `returned`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_returned_status": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "code", + "transaction" + ], + "title": "TreasuryOutboundPaymentsResourceReturnedStatus", + "type": "object", + "x-expandableFields": [ + "transaction" + ] + }, + "treasury_outbound_transfers_resource_returned_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/treasury.transaction" + } + ] + } + } + }, + "required": [ + "code", + "transaction" + ], + "title": "TreasuryOutboundTransfersResourceReturnedDetails", + "type": "object", + "x-expandableFields": [ + "transaction" + ] + }, + "treasury_outbound_transfers_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `canceled`", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "failed_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `failed`", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "posted_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `posted`", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "returned_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `returned`", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "TreasuryOutboundTransfersResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_linked_flows": { + "description": "", + "properties": { + "credit_reversal": { + "description": "The CreditReversal created as a result of this ReceivedCredit being reversed.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "issuing_authorization": { + "description": "Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "issuing_transaction": { + "description": "Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "source_flow": { + "description": "ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "source_flow_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/treasury_received_credits_resource_source_flows_details" + }, + { + "type": "null" + } + ], + "description": "The expandable object of the source flow." + }, + "source_flow_type": { + "description": "The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryReceivedCreditsResourceLinkedFlows", + "type": "object", + "x-expandableFields": [ + "source_flow_details" + ] + }, + "treasury_received_credits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedCredit can be reversed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "restricted_reason": { + "description": "Set if a ReceivedCredit cannot be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryReceivedCreditsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_source_flows_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "outbound_payment": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "payout": { + "$ref": "#/components/schemas/payout" + }, + "type": { + "description": "The type of the source flow that originated the ReceivedCredit.", + "enum": [ + "credit_reversal", + "other", + "outbound_payment", + "payout" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "TreasuryReceivedCreditsResourceSourceFlowsDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "outbound_payment", + "payout" + ] + }, + "treasury_received_credits_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the CreditReversal changed status to `posted`", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "TreasuryReceivedCreditsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_debit_reversal_linked_flows": { + "description": "", + "properties": { + "issuing_dispute": { + "description": "Set if there is an Issuing dispute associated with the DebitReversal.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryReceivedDebitsResourceDebitReversalLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_linked_flows": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The DebitReversal created as a result of this ReceivedDebit being reversed.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "inbound_transfer": { + "description": "Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "issuing_authorization": { + "description": "Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "issuing_transaction": { + "description": "Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryReceivedDebitsResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedDebit can be reversed.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "restricted_reason": { + "description": "Set if a ReceivedDebit can't be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted", + null + ], + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasuryReceivedDebitsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_status_transitions": { + "description": "", + "properties": { + "completed_at": { + "description": "Timestamp describing when the DebitReversal changed status to `completed`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "TreasuryReceivedDebitsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_shared_resource_billing_details": { + "description": "", + "properties": { + "address": { + "$ref": "#/components/schemas/address" + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "address" + ], + "title": "TreasurySharedResourceBillingDetails", + "type": "object", + "x-expandableFields": [ + "address" + ] + }, + "treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details": { + "description": "", + "properties": { + "balance": { + "description": "Set when `type` is `balance`.", + "enum": [ + "payments" + ], + "type": "string" + }, + "billing_details": { + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/components/schemas/received_payment_method_details_financial_account" + }, + "issuing_card": { + "description": "Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.", + "enum": [ + "balance", + "financial_account", + "issuing_card", + "stripe", + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_us_bank_account" + } + }, + "required": [ + "billing_details", + "type" + ], + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "treasury_shared_resource_initiating_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "bank_name": { + "description": "Bank name.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "routing_number": { + "description": "The routing number for the bank account.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + } + }, + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_abstract_transaction_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the Transaction changed status to `posted`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + }, + "void_at": { + "description": "Timestamp describing when the Transaction changed status to `void`.", + "format": "unix-time", + "type": [ + "integer", + "null" + ] + } + }, + "title": "TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_balance_impact": { + "description": "Change to a FinancialAccount's balance", + "properties": { + "cash": { + "description": "The change made to funds the user can spend right now.", + "type": "integer" + }, + "inbound_pending": { + "description": "The change made to funds that are not spendable yet, but will become available at a later time.", + "type": "integer" + }, + "outbound_pending": { + "description": "The change made to funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "integer" + } + }, + "required": [ + "cash", + "inbound_pending", + "outbound_pending" + ], + "title": "TreasuryTransactionsResourceBalanceImpact", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_flow_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "debit_reversal": { + "$ref": "#/components/schemas/treasury.debit_reversal" + }, + "inbound_transfer": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + }, + "issuing_authorization": { + "$ref": "#/components/schemas/issuing.authorization" + }, + "outbound_payment": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "outbound_transfer": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "received_credit": { + "$ref": "#/components/schemas/treasury.received_credit" + }, + "received_debit": { + "$ref": "#/components/schemas/treasury.received_debit" + }, + "type": { + "description": "Type of the flow that created the Transaction. Set to the same value as `flow_type`.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "TreasuryTransactionsResourceFlowDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ] + }, + "us_bank_account_networks": { + "description": "", + "properties": { + "preferred": { + "description": "The preferred network.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "supported": { + "description": "All supported networks.", + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "supported" + ], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [] + }, + "usage_record": { + "description": "Usage records allow you to report customer usage and metrics to Stripe for\nmetered billing of subscription prices.\n\nRelated guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing).", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "usage_record" + ], + "type": "string" + }, + "quantity": { + "description": "The usage quantity for the specified date.", + "type": "integer" + }, + "subscription_item": { + "description": "The ID of the subscription item this usage record contains data for.", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "The timestamp when this usage occurred.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "quantity", + "subscription_item", + "timestamp" + ], + "title": "UsageRecord", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "usage_record" + }, + "usage_record_summary": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice in which this usage period has been billed for.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "usage_record_summary" + ], + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/period" + }, + "subscription_item": { + "description": "The ID of the subscription item this summary is describing.", + "maxLength": 5000, + "type": "string" + }, + "total_usage": { + "description": "The total usage within this usage period.", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "period", + "subscription_item", + "total_usage" + ], + "title": "UsageRecordSummary", + "type": "object", + "x-expandableFields": [ + "period" + ], + "x-resourceId": "usage_record_summary" + }, + "verification_session_redaction": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether this object and its related objects have been redacted or not.", + "enum": [ + "processing", + "redacted" + ], + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "verification_session_redaction", + "type": "object", + "x-expandableFields": [] + }, + "webhook_endpoint": { + "description": "You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).", + "properties": { + "api_version": { + "description": "The API version events are rendered as for this webhook endpoint.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "application": { + "description": "The ID of the associated Connect application.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "webhook_endpoint" + ], + "type": "string" + }, + "secret": { + "description": "The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the webhook. It can be `enabled` or `disabled`.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the webhook endpoint.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "enabled_events", + "id", + "livemode", + "metadata", + "object", + "status", + "url" + ], + "title": "NotificationWebhookEndpoint", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "webhook_endpoint" + } + }, + "securitySchemes": { + "basicAuth": { + "description": "Basic HTTP authentication. Allowed headers-- Authorization: Basic | Authorization: Basic ", + "scheme": "basic", + "type": "http" + }, + "bearerAuth": { + "bearerFormat": "auth-scheme", + "description": "Bearer HTTP authentication. Allowed headers-- Authorization: Bearer ", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "dev-platform@stripe.com", + "name": "Stripe Dev Platform Team", + "url": "https://stripe.com" + }, + "description": "The Stripe REST API. Please see https://stripe.com/docs/api for more details.", + "termsOfService": "https://stripe.com/us/terms/", + "title": "Stripe API", + "version": "2022-11-15", + "x-stripeSpecFilename": "spec3" + }, + "openapi": "3.0.0", + "paths": { + "/v1/account": { + "get": { + "description": "

Retrieves the details of an account.

", + "operationId": "GetAccount", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/account_links": { + "post": { + "description": "

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

", + "operationId": "PostAccountLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "The identifier of the account to create an account link for.", + "maxLength": 5000, + "type": "string" + }, + "collect": { + "description": "Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.", + "enum": [ + "currently_due", + "eventually_due" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "refresh_url": { + "description": "The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.", + "type": "string" + }, + "return_url": { + "description": "The URL that the user will be redirected to upon leaving or completing the linked flow.", + "type": "string" + }, + "type": { + "description": "The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.", + "enum": [ + "account_onboarding", + "account_update" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "account", + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts": { + "get": { + "description": "

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

", + "operationId": "GetAccounts", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "AccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

If you’ve already collected information for your connected accounts, you can pre-fill that information when\ncreating the account. Connect Onboarding won’t ask for the pre-filled information during account onboarding.\nYou can pre-fill any information on the account.

", + "operationId": "PostAccounts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "capabilities": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + }, + "tos_acceptance": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_token": { + "description": "An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "business_profile": { + "description": "Business information about the account.", + "properties": { + "mcc": { + "maxLength": 4, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 40000, + "type": "string" + }, + "support_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "support_email": { + "type": "string" + }, + "support_phone": { + "maxLength": 5000, + "type": "string" + }, + "support_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "business_profile_specs", + "type": "object" + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "description": "Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.", + "properties": { + "acss_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "affirm_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "afterpay_clearpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "au_becs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bacs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bancontact_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "blik_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "boleto_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cartes_bancaires_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "eps_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "fpx_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "giropay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "grabpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "ideal_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "india_international_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jcb_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "klarna_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "konbini_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "legacy_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "link_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "oxxo_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "p24_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "paynow_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "promptpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sofort_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_k": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_misc": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "transfers": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "treasury": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_account_ach_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + } + }, + "title": "capabilities_param", + "type": "object" + }, + "company": { + "description": "Information about the company or business. This field is available for any `business_type`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "executives_provided": { + "type": "boolean" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "company_specs", + "type": "object" + }, + "country": { + "description": "The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.", + "maxLength": 5000, + "type": "string" + }, + "default_currency": { + "description": "Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).", + "type": "string" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_license": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_memorandum_of_association": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_ministerial_decree": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_registration_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_tax_id_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_registration": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "documents_specs", + "type": "object" + }, + "email": { + "description": "The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "individual": { + "description": "Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "settings": { + "description": "Options for customizing how the account functions within Stripe.", + "properties": { + "branding": { + "properties": { + "icon": { + "maxLength": 5000, + "type": "string" + }, + "logo": { + "maxLength": 5000, + "type": "string" + }, + "primary_color": { + "maxLength": 5000, + "type": "string" + }, + "secondary_color": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "branding_settings_specs", + "type": "object" + }, + "card_issuing": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "card_issuing_settings_specs", + "type": "object" + }, + "card_payments": { + "properties": { + "decline_on": { + "properties": { + "avs_failure": { + "type": "boolean" + }, + "cvc_failure": { + "type": "boolean" + } + }, + "title": "decline_charge_on_specs", + "type": "object" + }, + "statement_descriptor_prefix": { + "maxLength": 10, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_prefix_kanji": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "card_payments_settings_specs", + "type": "object" + }, + "payments": { + "properties": { + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kanji": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payments_settings_specs", + "type": "object" + }, + "payouts": { + "properties": { + "debit_negative_balances": { + "type": "boolean" + }, + "schedule": { + "properties": { + "delay_days": { + "anyOf": [ + { + "enum": [ + "minimum" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "interval": { + "enum": [ + "daily", + "manual", + "monthly", + "weekly" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "monthly_anchor": { + "type": "integer" + }, + "weekly_anchor": { + "enum": [ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "transfer_schedule_specs", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payout_settings_specs", + "type": "object" + }, + "treasury": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "treasury_settings_specs", + "type": "object" + } + }, + "title": "settings_specs", + "type": "object" + }, + "tos_acceptance": { + "description": "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).", + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "service_agreement": { + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "tos_acceptance_specs", + "type": "object" + }, + "type": { + "description": "The type of Stripe account to create. May be one of `custom`, `express` or `standard`.", + "enum": [ + "custom", + "express", + "standard" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}": { + "delete": { + "description": "

With Connect, you can delete accounts you manage.

\n\n

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

\n\n

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

", + "operationId": "DeleteAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the details of an account.

", + "operationId": "GetAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.

\n\n

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

", + "operationId": "PostAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "capabilities": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + }, + "tos_acceptance": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_token": { + "description": "An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.", + "maxLength": 5000, + "type": "string" + }, + "business_profile": { + "description": "Business information about the account.", + "properties": { + "mcc": { + "maxLength": 4, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 40000, + "type": "string" + }, + "support_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "support_email": { + "type": "string" + }, + "support_phone": { + "maxLength": 5000, + "type": "string" + }, + "support_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "business_profile_specs", + "type": "object" + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "capabilities": { + "description": "Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.", + "properties": { + "acss_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "affirm_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "afterpay_clearpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "au_becs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bacs_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bancontact_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "bank_transfer_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "blik_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "boleto_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "card_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "cartes_bancaires_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "eps_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "fpx_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "giropay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "grabpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "ideal_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "india_international_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "jcb_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "klarna_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "konbini_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "legacy_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "link_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "oxxo_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "p24_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "paynow_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "promptpay_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sepa_debit_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "sofort_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_k": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "tax_reporting_us_1099_misc": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "transfers": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "treasury": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + }, + "us_bank_account_ach_payments": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "title": "capability_param", + "type": "object" + } + }, + "title": "capabilities_param", + "type": "object" + }, + "company": { + "description": "Information about the company or business. This field is available for any `business_type`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "executives_provided": { + "type": "boolean" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "company_specs", + "type": "object" + }, + "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).", + "type": "string" + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "bank_account_ownership_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_license": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_memorandum_of_association": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_ministerial_decree": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_registration_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "company_tax_id_verification": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "proof_of_registration": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "documents_specs", + "type": "object" + }, + "email": { + "description": "The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "individual": { + "description": "Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "settings": { + "description": "Options for customizing how the account functions within Stripe.", + "properties": { + "branding": { + "properties": { + "icon": { + "maxLength": 5000, + "type": "string" + }, + "logo": { + "maxLength": 5000, + "type": "string" + }, + "primary_color": { + "maxLength": 5000, + "type": "string" + }, + "secondary_color": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "branding_settings_specs", + "type": "object" + }, + "card_issuing": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "card_issuing_settings_specs", + "type": "object" + }, + "card_payments": { + "properties": { + "decline_on": { + "properties": { + "avs_failure": { + "type": "boolean" + }, + "cvc_failure": { + "type": "boolean" + } + }, + "title": "decline_charge_on_specs", + "type": "object" + }, + "statement_descriptor_prefix": { + "maxLength": 10, + "type": "string" + }, + "statement_descriptor_prefix_kana": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_prefix_kanji": { + "anyOf": [ + { + "maxLength": 10, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "card_payments_settings_specs", + "type": "object" + }, + "payments": { + "properties": { + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_kanji": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payments_settings_specs", + "type": "object" + }, + "payouts": { + "properties": { + "debit_negative_balances": { + "type": "boolean" + }, + "schedule": { + "properties": { + "delay_days": { + "anyOf": [ + { + "enum": [ + "minimum" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "interval": { + "enum": [ + "daily", + "manual", + "monthly", + "weekly" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "monthly_anchor": { + "type": "integer" + }, + "weekly_anchor": { + "enum": [ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "transfer_schedule_specs", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + } + }, + "title": "payout_settings_specs", + "type": "object" + }, + "treasury": { + "properties": { + "tos_acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "settings_terms_of_service_specs", + "type": "object" + } + }, + "title": "treasury_settings_specs", + "type": "object" + } + }, + "title": "settings_specs_update", + "type": "object" + }, + "tos_acceptance": { + "description": "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).", + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "service_agreement": { + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "tos_acceptance_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/bank_accounts": { + "post": { + "description": "

Create an external account for a given account.

", + "operationId": "PostAccountsAccountBankAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "default_for_currency": { + "description": "When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/bank_accounts/{id}": { + "delete": { + "description": "

Delete a specified external account for a given account.

", + "operationId": "DeleteAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve a specified external account for a given account.

", + "operationId": "GetAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

\n\n

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

", + "operationId": "PostAccountsAccountBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "", + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "default_for_currency": { + "description": "When set to true, this becomes the default external account for its currency.", + "type": "boolean" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/capabilities": { + "get": { + "description": "

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

", + "operationId": "GetAccountsAccountCapabilities", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/capability" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ListAccountCapability", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/capabilities/{capability}": { + "get": { + "description": "

Retrieves information about the specified Account Capability.

", + "operationId": "GetAccountsAccountCapabilitiesCapability", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "capability", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/capability" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing Account Capability.

", + "operationId": "PostAccountsAccountCapabilitiesCapability", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "capability", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "requested": { + "description": "Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/capability" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/external_accounts": { + "get": { + "description": "

List external accounts for an account.

", + "operationId": "GetAccountsAccountExternalAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create an external account for a given account.

", + "operationId": "PostAccountsAccountExternalAccounts", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "external_account_payout_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "default_for_currency": { + "description": "When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "external_account": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/external_accounts/{id}": { + "delete": { + "description": "

Delete a specified external account for a given account.

", + "operationId": "DeleteAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve a specified external account for a given account.

", + "operationId": "GetAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

\n\n

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

", + "operationId": "PostAccountsAccountExternalAccountsId", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "", + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "description": "The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.", + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "default_for_currency": { + "description": "When set to true, this becomes the default external account for its currency.", + "type": "boolean" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/login_links": { + "post": { + "description": "

Creates a single-use login link for an Express account to access their Stripe dashboard.

\n\n

You may only create login links for Express accounts connected to your platform.

", + "operationId": "PostAccountsAccountLoginLinks", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/login_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/people": { + "get": { + "description": "

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

", + "operationId": "GetAccountsAccountPeople", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filters on the list of people returned based on the person's relationship to the account's company.", + "explode": true, + "in": "query", + "name": "relationship", + "required": false, + "schema": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "representative": { + "type": "boolean" + } + }, + "title": "all_people_relationship_specs", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/person" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PersonList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new person.

", + "operationId": "PostAccountsAccountPeople", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/people/{person}": { + "delete": { + "description": "

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

", + "operationId": "DeleteAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves an existing person.

", + "operationId": "GetAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing person.

", + "operationId": "PostAccountsAccountPeoplePerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/persons": { + "get": { + "description": "

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

", + "operationId": "GetAccountsAccountPersons", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filters on the list of people returned based on the person's relationship to the account's company.", + "explode": true, + "in": "query", + "name": "relationship", + "required": false, + "schema": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "representative": { + "type": "boolean" + } + }, + "title": "all_people_relationship_specs", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/person" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PersonList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new person.

", + "operationId": "PostAccountsAccountPersons", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/persons/{person}": { + "delete": { + "description": "

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

", + "operationId": "DeleteAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves an existing person.

", + "operationId": "GetAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing person.

", + "operationId": "PostAccountsAccountPersonsPerson", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "person", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "address_kana": { + "explode": true, + "style": "deepObject" + }, + "address_kanji": { + "explode": true, + "style": "deepObject" + }, + "dob": { + "explode": true, + "style": "deepObject" + }, + "documents": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "full_name_aliases": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "registered_address": { + "explode": true, + "style": "deepObject" + }, + "relationship": { + "explode": true, + "style": "deepObject" + }, + "verification": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The person's address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "description": "The Kana variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "description": "The Kanji variation of the person's address (Japan only).", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The person's date of birth." + }, + "documents": { + "description": "Documents that may be submitted to satisfy various informational requests.", + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "description": "The person's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of alternate names or aliases that the person is known by." + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": "string" + }, + "id_number": { + "description": "The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "description": "The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).", + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nationality": { + "description": "The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or \"XX\" if unavailable.", + "maxLength": 5000, + "type": "string" + }, + "person_token": { + "description": "A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The person's phone number.", + "type": "string" + }, + "political_exposure": { + "description": "Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.", + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "description": "The person's registered address.", + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "description": "The relationship that this person has with the account's legal entity.", + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "description": "The last four digits of the person's Social Security number (U.S. only).", + "type": "string" + }, + "verification": { + "description": "The person's verification status.", + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/accounts/{account}/reject": { + "post": { + "description": "

With Connect, you may flag accounts as suspicious.

\n\n

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

", + "operationId": "PostAccountsAccountReject", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reason": { + "description": "The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apple_pay/domains": { + "get": { + "description": "

List apple pay domains.

", + "operationId": "GetApplePayDomains", + "parameters": [ + { + "in": "query", + "name": "domain_name", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/apple_pay_domain" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/apple_pay/domains", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApplePayDomainList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create an apple pay domain.

", + "operationId": "PostApplePayDomains", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "domain_name": { + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "domain_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apple_pay/domains/{domain}": { + "delete": { + "description": "

Delete an apple pay domain.

", + "operationId": "DeleteApplePayDomainsDomain", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve an apple pay domain.

", + "operationId": "GetApplePayDomainsDomain", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apple_pay_domain" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees": { + "get": { + "description": "

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

", + "operationId": "GetApplicationFees", + "parameters": [ + { + "description": "Only return application fees for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/application_fee" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/application_fees", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PlatformEarningList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{fee}/refunds/{id}": { + "get": { + "description": "

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

", + "operationId": "GetApplicationFeesFeeRefundsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "fee", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request only accepts metadata as an argument.

", + "operationId": "PostApplicationFeesFeeRefundsId", + "parameters": [ + { + "in": "path", + "name": "fee", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}": { + "get": { + "description": "

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

", + "operationId": "GetApplicationFeesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_fee" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}/refund": { + "post": { + "description": "", + "operationId": "PostApplicationFeesIdRefund", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "directive": { + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_fee" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/application_fees/{id}/refunds": { + "get": { + "description": "

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

", + "operationId": "GetApplicationFeesIdRefunds", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Refunds an application fee that has previously been collected but not yet refunded.\nFunds will be refunded to the Stripe account from which the fee was originally collected.

\n\n

You can optionally refund only part of an application fee.\nYou can do so multiple times, until the entire fee has been refunded.

\n\n

Once entirely refunded, an application fee can’t be refunded again.\nThis method will raise an error when called on an already-refunded application fee,\nor when trying to refund more money than is left on an application fee.

", + "operationId": "PostApplicationFeesIdRefunds", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fee_refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apps/secrets": { + "get": { + "description": "

List all secrets stored on the given scope.

", + "operationId": "GetAppsSecrets", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "explode": true, + "in": "query", + "name": "scope", + "required": true, + "schema": { + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/apps.secret" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/apps/secrets", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SecretServiceResourceSecretList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create or replace a secret in the secret store.

", + "operationId": "PostAppsSecrets", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "scope": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "type": "integer" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "type": "string" + }, + "scope": { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + } + }, + "required": [ + "name", + "payload", + "scope" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apps/secrets/delete": { + "post": { + "description": "

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

", + "operationId": "PostAppsSecretsDelete", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "scope": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "scope": { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + } + }, + "required": [ + "name", + "scope" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/apps/secrets/find": { + "get": { + "description": "

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

", + "operationId": "GetAppsSecretsFind", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A name for the secret that's unique within the scope.", + "in": "query", + "name": "name", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.", + "explode": true, + "in": "query", + "name": "scope", + "required": true, + "schema": { + "properties": { + "type": { + "enum": [ + "account", + "user" + ], + "type": "string" + }, + "user": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "scope_param", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apps.secret" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance": { + "get": { + "description": "

Retrieves the current account balance, based on the authentication that was used to make the request.\n For a sample request, see Accounting for negative balances.

", + "operationId": "GetBalance", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance/history": { + "get": { + "description": "

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

\n\n

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

", + "operationId": "GetBalanceHistory", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.", + "in": "query", + "name": "payout", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns the original transaction.", + "in": "query", + "name": "source", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/balance_transactions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BalanceTransactionsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance/history/{id}": { + "get": { + "description": "

Retrieves the balance transaction with the given ID.

\n\n

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

", + "operationId": "GetBalanceHistoryId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance_transactions": { + "get": { + "description": "

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

\n\n

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

", + "operationId": "GetBalanceTransactions", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.", + "in": "query", + "name": "payout", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns the original transaction.", + "in": "query", + "name": "source", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/balance_transactions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BalanceTransactionsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/balance_transactions/{id}": { + "get": { + "description": "

Retrieves the balance transaction with the given ID.

\n\n

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

", + "operationId": "GetBalanceTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/billing_portal/configurations": { + "get": { + "description": "

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

", + "operationId": "GetBillingPortalConfigurations", + "parameters": [ + { + "description": "Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).", + "in": "query", + "name": "is_default", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/billing_portal.configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/billing_portal/configurations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PortalConfigurationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostBillingPortalConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "default_return_url": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "login_page": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "business_profile": { + "description": "The business information shown to customers in the portal.", + "properties": { + "headline": { + "maxLength": 60, + "type": "string" + }, + "privacy_policy_url": { + "type": "string" + }, + "terms_of_service_url": { + "type": "string" + } + }, + "title": "business_profile_create_param", + "type": "object" + }, + "default_return_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Information about the features available in the portal.", + "properties": { + "customer_update": { + "properties": { + "allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "customer_update_creation_param", + "type": "object" + }, + "invoice_history": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_list_param", + "type": "object" + }, + "payment_method_update": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_update_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "cancellation_reason": { + "properties": { + "enabled": { + "type": "boolean" + }, + "options": { + "anyOf": [ + { + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "required": [ + "enabled", + "options" + ], + "title": "subscription_cancellation_reason_creation_param", + "type": "object" + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "enum": [ + "at_period_end", + "immediately" + ], + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "enabled" + ], + "title": "subscription_cancel_creation_param", + "type": "object" + }, + "subscription_pause": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "subscription_pause_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "default_allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "products": { + "anyOf": [ + { + "items": { + "properties": { + "prices": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "prices", + "product" + ], + "title": "subscription_update_product_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "required": [ + "default_allowed_updates", + "enabled", + "products" + ], + "title": "subscription_update_creation_param", + "type": "object" + } + }, + "title": "features_creation_param", + "type": "object" + }, + "login_page": { + "description": "The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "login_page_create_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "required": [ + "business_profile", + "features" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/billing_portal/configurations/{configuration}": { + "get": { + "description": "

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

", + "operationId": "GetBillingPortalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostBillingPortalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "business_profile": { + "explode": true, + "style": "deepObject" + }, + "default_return_url": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "login_page": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "business_profile": { + "description": "The business information shown to customers in the portal.", + "properties": { + "headline": { + "maxLength": 60, + "type": "string" + }, + "privacy_policy_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "terms_of_service_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "business_profile_update_param", + "type": "object" + }, + "default_return_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Information about the features available in the portal.", + "properties": { + "customer_update": { + "properties": { + "allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + } + }, + "title": "customer_update_updating_param", + "type": "object" + }, + "invoice_history": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_list_param", + "type": "object" + }, + "payment_method_update": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "payment_method_update_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "cancellation_reason": { + "properties": { + "enabled": { + "type": "boolean" + }, + "options": { + "anyOf": [ + { + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "required": [ + "enabled" + ], + "title": "subscription_cancellation_reason_updating_param", + "type": "object" + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "enum": [ + "at_period_end", + "immediately" + ], + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "title": "subscription_cancel_updating_param", + "type": "object" + }, + "subscription_pause": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "subscription_pause_param", + "type": "object" + }, + "subscription_update": { + "properties": { + "default_allowed_updates": { + "anyOf": [ + { + "items": { + "enum": [ + "price", + "promotion_code", + "quantity" + ], + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "products": { + "anyOf": [ + { + "items": { + "properties": { + "prices": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "prices", + "product" + ], + "title": "subscription_update_product_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "title": "subscription_update_updating_param", + "type": "object" + } + }, + "title": "features_updating_param", + "type": "object" + }, + "login_page": { + "description": "The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "login_page_update_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/billing_portal/sessions": { + "post": { + "description": "

Creates a session of the customer portal.

", + "operationId": "PostBillingPortalSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "configuration": { + "description": "The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_data": { + "description": "Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.", + "properties": { + "after_completion": { + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_hosted_confirmation_param", + "type": "object" + }, + "redirect": { + "properties": { + "return_url": { + "type": "string" + } + }, + "required": [ + "return_url" + ], + "title": "after_completion_redirect_param", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "portal_homepage", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "flow_data_after_completion_param", + "type": "object" + }, + "subscription_cancel": { + "properties": { + "subscription": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "subscription" + ], + "title": "flow_data_subscription_cancel_param", + "type": "object" + }, + "type": { + "enum": [ + "payment_method_update", + "subscription_cancel" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "flow_data_param", + "type": "object" + }, + "locale": { + "description": "The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW" + ], + "type": "string" + }, + "on_behalf_of": { + "description": "The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.", + "type": "string" + }, + "return_url": { + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website.", + "type": "string" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing_portal.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges": { + "get": { + "description": "

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

", + "operationId": "GetCharges", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return charges for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return charges for this transfer group.", + "in": "query", + "name": "transfer_group", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/charge" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/charges", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ChargeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

", + "operationId": "PostCharges", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card": { + "explode": true, + "style": "deepObject" + }, + "destination": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "application_fee": { + "type": "integer" + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees).", + "type": "integer" + }, + "capture": { + "description": "Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.", + "type": "boolean" + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer that will be charged in this request.", + "maxLength": 500, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.", + "maxLength": 40000, + "type": "string" + }, + "destination": { + "anyOf": [ + { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "amount": { + "type": "integer" + } + }, + "required": [ + "account" + ], + "title": "destination_specs", + "type": "object" + }, + { + "type": "string" + } + ] + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "description": "The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of).", + "maxLength": 5000, + "type": "string" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "receipt_email": { + "description": "The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).", + "type": "string" + }, + "shipping": { + "description": "Shipping information for the charge. Helps prevent fraud on charges for physical goods.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + "source": { + "description": "A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options).", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/search": { + "get": { + "description": "

Search for charges you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetChargesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/charge" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}": { + "get": { + "description": "

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

", + "operationId": "GetChargesCharge", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostChargesCharge", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fraud_details": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fraud_details": { + "description": "A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.", + "properties": { + "user_report": { + "enum": [ + "", + "fraudulent", + "safe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "user_report" + ], + "title": "fraud_details", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "description": "Shipping information for the charge. Helps prevent fraud on charges for physical goods.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/capture": { + "post": { + "description": "

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

\n\n

Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

", + "operationId": "PostChargesChargeCapture", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.", + "type": "integer" + }, + "application_fee": { + "description": "An application fee to add on to this charge.", + "type": "integer" + }, + "application_fee_amount": { + "description": "An application fee amount to add on to this charge, which must be less than or equal to the original amount.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "receipt_email": { + "description": "The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.", + "type": "string" + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_specs", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/dispute": { + "get": { + "description": "

Retrieve a dispute for a specified charge.

", + "operationId": "GetChargesChargeDispute", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "", + "operationId": "PostChargesChargeDispute", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "evidence": { + "description": "Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.", + "properties": { + "access_activity_log": { + "maxLength": 20000, + "type": "string" + }, + "billing_address": { + "maxLength": 5000, + "type": "string" + }, + "cancellation_policy": { + "type": "string" + }, + "cancellation_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "cancellation_rebuttal": { + "maxLength": 20000, + "type": "string" + }, + "customer_communication": { + "type": "string" + }, + "customer_email_address": { + "maxLength": 5000, + "type": "string" + }, + "customer_name": { + "maxLength": 5000, + "type": "string" + }, + "customer_purchase_ip": { + "maxLength": 5000, + "type": "string" + }, + "customer_signature": { + "type": "string" + }, + "duplicate_charge_documentation": { + "type": "string" + }, + "duplicate_charge_explanation": { + "maxLength": 20000, + "type": "string" + }, + "duplicate_charge_id": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 20000, + "type": "string" + }, + "receipt": { + "type": "string" + }, + "refund_policy": { + "type": "string" + }, + "refund_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "refund_refusal_explanation": { + "maxLength": 20000, + "type": "string" + }, + "service_date": { + "maxLength": 5000, + "type": "string" + }, + "service_documentation": { + "type": "string" + }, + "shipping_address": { + "maxLength": 5000, + "type": "string" + }, + "shipping_carrier": { + "maxLength": 5000, + "type": "string" + }, + "shipping_date": { + "maxLength": 5000, + "type": "string" + }, + "shipping_documentation": { + "type": "string" + }, + "shipping_tracking_number": { + "maxLength": 5000, + "type": "string" + }, + "uncategorized_file": { + "type": "string" + }, + "uncategorized_text": { + "maxLength": 20000, + "type": "string" + } + }, + "title": "dispute_evidence_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "submit": { + "description": "Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/dispute/close": { + "post": { + "description": "", + "operationId": "PostChargesChargeDisputeClose", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refund": { + "post": { + "description": "

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

\n\n

Creating a new refund will refund a charge that has previously been created but not yet refunded.\nFunds will be refunded to the credit or debit card that was originally charged.

\n\n

You can optionally refund only part of a charge.\nYou can do so multiple times, until the entire charge has been refunded.

\n\n

Once entirely refunded, a charge can’t be refunded again.\nThis method will raise an error when called on an already-refunded charge,\nor when trying to refund more money than is left on a charge.

", + "operationId": "PostChargesChargeRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_intent": { + "maxLength": 5000, + "type": "string" + }, + "reason": { + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "type": "boolean" + }, + "reverse_transfer": { + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/charge" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refunds": { + "get": { + "description": "

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

", + "operationId": "GetChargesChargeRefunds", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create a refund.

", + "operationId": "PostChargesChargeRefunds", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to refund.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "Customer whose customer balance to refund from.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "Address to send refund email, use customer email if not specified", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "origin": { + "description": "Origin of the refund", + "enum": [ + "customer_balance" + ], + "type": "string" + }, + "payment_intent": { + "maxLength": 5000, + "type": "string" + }, + "reason": { + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "type": "boolean" + }, + "reverse_transfer": { + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/charges/{charge}/refunds/{refund}": { + "get": { + "description": "

Retrieves the details of an existing refund.

", + "operationId": "GetChargesChargeRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified refund.

", + "operationId": "PostChargesChargeRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "charge", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions": { + "get": { + "description": "

Returns a list of Checkout Sessions.

", + "operationId": "GetCheckoutSessions", + "parameters": [ + { + "description": "Only return the Checkout Sessions for the Customer specified.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions for the Customer details specified.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "email": { + "type": "string" + } + }, + "required": [ + "email" + ], + "title": "customer_details_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Session for the PaymentIntent specified.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Sessions for the Payment Link specified.", + "in": "query", + "name": "payment_link", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return the Checkout Session for the subscription specified.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/checkout.session" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a Session object.

", + "operationId": "PostCheckoutSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_expiration": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "consent_collection": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "customer_update": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "setup_intent_data": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_options": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "after_expiration": { + "description": "Configure actions after a Checkout Session has expired.", + "properties": { + "recovery": { + "properties": { + "allow_promotion_codes": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "recovery_params", + "type": "object" + } + }, + "title": "after_expiration_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Specify whether Checkout should collect the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "type": "string" + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nsession with your internal systems.", + "maxLength": 200, + "type": "string" + }, + "consent_collection": { + "description": "Configure fields for the Checkout Session to gather active consent from customers.", + "properties": { + "promotions": { + "enum": [ + "auto", + "none" + ], + "type": "string" + }, + "terms_of_service": { + "enum": [ + "none", + "required" + ], + "type": "string" + } + }, + "title": "consent_collection_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "custom", + "type" + ], + "title": "custom_field_label_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "type": { + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "type" + ], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer": { + "description": "ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card\npayment method will be used to prefill the email, name, card details, and billing address\non the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)\nwill be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.\n\nIf the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.\nIf the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.\n\nIf blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow.\n\nYou can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.", + "maxLength": 5000, + "type": "string" + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.\n\nWhen a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout\nwith [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).\n\nSessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)\nin the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.\n\nCan only be set in `payment` and `setup` mode.", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once a session is\ncomplete, use the `customer` field.", + "type": "string" + }, + "customer_update": { + "description": "Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.", + "properties": { + "address": { + "enum": [ + "auto", + "never" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "name": { + "enum": [ + "auto", + "never" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "enum": [ + "auto", + "never" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "customer_update_params", + "type": "object" + }, + "discounts": { + "description": "The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.", + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "promotion_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discount_params", + "type": "object" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.", + "format": "unix-time", + "type": "integer" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "invoice_data_params", + "type": "object" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_creation_params", + "type": "object" + }, + "line_items": { + "description": "A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).\n\nFor `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.\n\nFor `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "adjustable_quantity_params", + "type": "object" + }, + "dynamic_tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "properties": { + "description": { + "maxLength": 40000, + "type": "string" + }, + "images": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "product_data", + "type": "object" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency" + ], + "title": "price_data_with_product_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "line_item_params", + "type": "object" + }, + "type": "array" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "mode": { + "description": "The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.", + "enum": [ + "payment", + "setup", + "subscription" + ], + "type": "string" + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "application_fee_amount": { + "type": "integer" + }, + "capture_method": { + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "receipt_email": { + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "line1" + ], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "shipping", + "type": "object" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_params", + "type": "object" + }, + "transfer_group": { + "type": "string" + } + }, + "title": "payment_intent_data_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.\nThis may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "affirm": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "alipay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "bancontact": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "boleto": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "installments_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "maxLength": 17, + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "customer_balance": { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "eps": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "fpx": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "giropay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "grabpay": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "ideal": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "klarna": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "konbini": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "oxxo": { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "p24": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "paynow": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "pix": { + "properties": { + "expires_after_seconds": { + "type": "integer" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "sofort": { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "wechat_pay": { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.\n\nIn `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).\nIt is required in `setup` mode.\n\nRead more about the supported payment methods and their requirements in our [payment\nmethod details guide](/docs/payments/checkout/payment-methods).\n\nIf multiple payment methods are passed, Checkout will dynamically reorder them to\nprioritize the most relevant payment methods based on the customer's location and\nother characteristics.", + "items": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "phone_number_collection": { + "description": "Controls phone number collection settings for the session.\n\nWe recommend that you review your privacy policy and check with your legal contacts\nbefore using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "phone_number_collection_params", + "type": "object" + }, + "setup_intent_data": { + "description": "A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.", + "properties": { + "description": { + "maxLength": 1000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + } + }, + "title": "setup_intent_data_param", + "type": "object" + }, + "shipping_address_collection": { + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer.", + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "shipping_address_collection_params", + "type": "object" + }, + "shipping_options": { + "description": "The shipping rate options to apply to this Session.", + "items": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_option_params", + "type": "object" + }, + "type": "array" + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "description": "A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "default_tax_rates": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "format": "unix-time", + "type": "integer" + }, + "trial_period_days": { + "type": "integer" + }, + "trial_settings": { + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "title": "subscription_data_params", + "type": "object" + }, + "success_url": { + "description": "The URL to which Stripe should send customers when payment or setup\nis complete.\nIf you’d like to use information from the successful Checkout Session on your page,\nread the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "description": "Controls tax ID collection settings for the session.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "tax_id_collection_params", + "type": "object" + } + }, + "required": [ + "success_url" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions/{session}": { + "get": { + "description": "

Retrieves a Session object.

", + "operationId": "GetCheckoutSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 66, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions/{session}/expire": { + "post": { + "description": "

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

\n\n

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

", + "operationId": "PostCheckoutSessionsSessionExpire", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/checkout.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/checkout/sessions/{session}/line_items": { + "get": { + "description": "

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetCheckoutSessionsSessionLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/country_specs": { + "get": { + "description": "

Lists all Country Spec objects available in the API.

", + "operationId": "GetCountrySpecs", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/country_spec" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/country_specs", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CountrySpecList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/country_specs/{country}": { + "get": { + "description": "

Returns a Country Spec for a given Country code.

", + "operationId": "GetCountrySpecsCountry", + "parameters": [ + { + "in": "path", + "name": "country", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/country_spec" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/coupons": { + "get": { + "description": "

Returns a list of your coupons.

", + "operationId": "GetCoupons", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/coupon" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/coupons", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CouponsResourceCouponList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

\n\n

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

", + "operationId": "PostCoupons", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "applies_to": { + "explode": true, + "style": "deepObject" + }, + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_off": { + "description": "A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).", + "type": "integer" + }, + "applies_to": { + "description": "A hash containing directions for what this Coupon will apply discounts to.", + "properties": { + "products": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "title": "applies_to_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount_off": { + "type": "integer" + } + }, + "required": [ + "amount_off" + ], + "title": "currency_option", + "type": "object" + }, + "description": "Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.", + "maxLength": 5000, + "type": "string" + }, + "max_redemptions": { + "description": "A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.", + "maxLength": 40, + "type": "string" + }, + "percent_off": { + "description": "A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).", + "type": "number" + }, + "redeem_by": { + "description": "Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/coupons/{coupon}": { + "delete": { + "description": "

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

", + "operationId": "DeleteCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the coupon with the given ID.

", + "operationId": "GetCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostCouponsCoupon", + "parameters": [ + { + "in": "path", + "name": "coupon", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "amount_off": { + "type": "integer" + } + }, + "required": [ + "amount_off" + ], + "title": "currency_option", + "type": "object" + }, + "description": "Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.", + "maxLength": 40, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/coupon" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes": { + "get": { + "description": "

Returns a list of credit notes.

", + "operationId": "GetCreditNotes", + "parameters": [ + { + "description": "Only return credit notes for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return credit notes for the invoice specified by this invoice ID.", + "in": "query", + "name": "invoice", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/credit_note" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNotesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n
    \n
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • \n
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • \n
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • \n
\n\n

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

\n\n

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

", + "operationId": "PostCreditNotes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "lines": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "type": "integer" + }, + "credit_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice": { + "description": "ID of the invoice.", + "maxLength": 5000, + "type": "string" + }, + "lines": { + "description": "Line items that make up the credit note.", + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "type": { + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "memo": { + "description": "The credit note's memo appears on the credit note PDF.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "out_of_band_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "type": "integer" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "refund": { + "description": "ID of an existing refund to link this credit note to.", + "type": "string" + }, + "refund_amount": { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "type": "integer" + }, + "shipping_cost": { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + } + }, + "required": [ + "invoice" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/preview": { + "get": { + "description": "

Get a preview of a credit note without creating it.

", + "operationId": "GetCreditNotesPreview", + "parameters": [ + { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "in": "query", + "name": "amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "in": "query", + "name": "credit_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "ID of the invoice.", + "in": "query", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Line items that make up the credit note.", + "explode": true, + "in": "query", + "name": "lines", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "type": { + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The credit note's memo appears on the credit note PDF.", + "in": "query", + "name": "memo", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "explode": true, + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "in": "query", + "name": "out_of_band_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "in": "query", + "name": "reason", + "required": false, + "schema": { + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "ID of an existing refund to link this credit note to.", + "in": "query", + "name": "refund", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "in": "query", + "name": "refund_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "explode": true, + "in": "query", + "name": "shipping_cost", + "required": false, + "schema": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/preview/lines": { + "get": { + "description": "

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

", + "operationId": "GetCreditNotesPreviewLines", + "parameters": [ + { + "description": "The integer amount in cents (or local equivalent) representing the total amount of the credit note.", + "in": "query", + "name": "amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.", + "in": "query", + "name": "credit_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "ID of the invoice.", + "in": "query", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Line items that make up the credit note.", + "explode": true, + "in": "query", + "name": "lines", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "type": { + "enum": [ + "custom_line_item", + "invoice_line_item" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "credit_note_line_item_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The credit note's memo appears on the credit note PDF.", + "in": "query", + "name": "memo", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "explode": true, + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.", + "in": "query", + "name": "out_of_band_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "in": "query", + "name": "reason", + "required": false, + "schema": { + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "ID of an existing refund to link this credit note to.", + "in": "query", + "name": "refund", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.", + "in": "query", + "name": "refund_amount", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.", + "explode": true, + "in": "query", + "name": "shipping_cost", + "required": false, + "schema": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "credit_note_shipping_cost", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/{credit_note}/lines": { + "get": { + "description": "

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetCreditNotesCreditNoteLines", + "parameters": [ + { + "in": "path", + "name": "credit_note", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/{id}": { + "get": { + "description": "

Retrieves the credit note object with the given identifier.

", + "operationId": "GetCreditNotesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing credit note.

", + "operationId": "PostCreditNotesId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "memo": { + "description": "Credit note memo.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/credit_notes/{id}/void": { + "post": { + "description": "

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

", + "operationId": "PostCreditNotesIdVoid", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/credit_note" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers": { + "get": { + "description": "

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

", + "operationId": "GetCustomers", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.", + "in": "query", + "name": "email", + "required": false, + "schema": { + "maxLength": 512, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/customer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/customers", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerResourceCustomerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new customer object.

", + "operationId": "PostCustomers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "cash_balance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "tax": { + "explode": true, + "style": "deepObject" + }, + "tax_id_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.", + "type": "integer" + }, + "cash_balance": { + "description": "Balance information and default balance settings for this customer.", + "properties": { + "settings": { + "properties": { + "reconciliation_mode": { + "enum": [ + "automatic", + "manual", + "merchant_default" + ], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "title": "cash_balance_param", + "type": "object" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "email": { + "description": "Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.", + "maxLength": 512, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "description": "Default invoice settings for this customer.", + "properties": { + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "customer_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 256, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The sequence to be used on the customer's next invoice. Defaults to 1.", + "type": "integer" + }, + "payment_method": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 20, + "type": "string" + }, + "preferred_locales": { + "description": "Customer's preferred languages, ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's shipping information. Appears on invoices emailed to this customer." + }, + "source": { + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "tax": { + "description": "Tax details about the customer.", + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "description": "The customer's tax exemption. One of `none`, `exempt`, or `reverse`.", + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + }, + "tax_id_data": { + "description": "The customer's tax IDs.", + "items": { + "properties": { + "type": { + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + }, + "test_clock": { + "description": "ID of the test clock to attach to the customer.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/search": { + "get": { + "description": "

Search for customers you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetCustomersSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/customer" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}": { + "delete": { + "description": "

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

", + "operationId": "DeleteCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Customer object.

", + "operationId": "GetCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "$ref": "#/components/schemas/deleted_customer" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

\n\n

This request accepts mostly the same arguments as the customer creation call.

", + "operationId": "PostCustomersCustomer", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cash_balance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "preferred_locales": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "tax": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.", + "type": "integer" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "cash_balance": { + "description": "Balance information and default balance settings for this customer.", + "properties": { + "settings": { + "properties": { + "reconciliation_mode": { + "enum": [ + "automatic", + "manual", + "merchant_default" + ], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "title": "cash_balance_param", + "type": "object" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_alipay_account": { + "description": "ID of Alipay account to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_bank_account": { + "description": "ID of bank account to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_card": { + "description": "ID of card to make the customer's new default for invoice payments.", + "maxLength": 500, + "type": "string" + }, + "default_source": { + "description": "If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.\n\nProvide the ID of a payment source already attached to this customer to make it this customer's default payment source.\n\nIf you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.", + "maxLength": 500, + "type": "string" + }, + "description": { + "description": "An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.", + "maxLength": 5000, + "type": "string" + }, + "email": { + "description": "Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.", + "maxLength": 512, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.", + "maxLength": 5000, + "type": "string" + }, + "invoice_settings": { + "description": "Default invoice settings for this customer.", + "properties": { + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "customer_param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 256, + "type": "string" + }, + "next_invoice_sequence": { + "description": "The sequence to be used on the customer's next invoice. Defaults to 1.", + "type": "integer" + }, + "phone": { + "description": "The customer's phone number.", + "maxLength": 20, + "type": "string" + }, + "preferred_locales": { + "description": "Customer's preferred languages, ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.", + "maxLength": 5000, + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The customer's shipping information. Appears on invoices emailed to this customer." + }, + "source": { + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "tax": { + "description": "Tax details about the customer.", + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "description": "The customer's tax exemption. One of `none`, `exempt`, or `reverse`.", + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/balance_transactions": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/customer_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerBalanceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostCustomersCustomerBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 350, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/balance_transactions/{transaction}": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostCustomersCustomerBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 350, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts": { + "get": { + "deprecated": true, + "description": "

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

", + "operationId": "GetCustomersCustomerBankAccounts", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/bank_account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerBankAccounts", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "deprecated": true, + "description": "

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

", + "operationId": "GetCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerBankAccountsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/bank_accounts/{id}/verify": { + "post": { + "description": "

Verify a specified bank account for a given customer.

", + "operationId": "PostCustomersCustomerBankAccountsIdVerify", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cards": { + "get": { + "deprecated": true, + "description": "

You can see a list of the cards belonging to a customer.\nNote that the 10 most recent sources are always available on the Customer object.\nIf you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

", + "operationId": "GetCustomersCustomerCards", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/card" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CardList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerCards", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cards/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "deprecated": true, + "description": "

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

", + "operationId": "GetCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerCardsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance": { + "get": { + "description": "

Retrieves a customer’s cash balance.

", + "operationId": "GetCustomersCustomerCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cash_balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Changes the settings on a customer’s cash balance.

", + "operationId": "PostCustomersCustomerCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "settings": { + "description": "A hash of settings for this cash balance.", + "properties": { + "reconciliation_mode": { + "enum": [ + "automatic", + "manual", + "merchant_default" + ], + "type": "string" + } + }, + "title": "balance_settings_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cash_balance" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance_transactions": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerCashBalanceTransactions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerCashBalanceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/cash_balance_transactions/{transaction}": { + "get": { + "description": "

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

", + "operationId": "GetCustomersCustomerCashBalanceTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a customer.

", + "operationId": "DeleteCustomersCustomerDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "", + "operationId": "GetCustomersCustomerDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/funding_instructions": { + "post": { + "description": "

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new\nfunding instructions will be created. If funding instructions have already been created for a given customer, the same\nfunding instructions will be retrieved. In other words, we will return the same funding instructions each time.

", + "operationId": "PostCustomersCustomerFundingInstructions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_transfer": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bank_transfer": { + "description": "Additional parameters for `bank_transfer` funding types", + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_account_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "funding_type": { + "description": "The `funding_type` to get the instructions for.", + "enum": [ + "bank_transfer" + ], + "type": "string" + } + }, + "required": [ + "bank_transfer", + "currency", + "funding_type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/funding_instructions" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/payment_methods": { + "get": { + "description": "

Returns a list of PaymentMethods for a given Customer

", + "operationId": "GetCustomersCustomerPaymentMethods", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "CustomerPaymentMethodResourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/payment_methods/{payment_method}": { + "get": { + "description": "

Retrieves a PaymentMethod object for a given Customer.

", + "operationId": "GetCustomersCustomerPaymentMethodsPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources": { + "get": { + "description": "

List sources for a specified customer.

", + "operationId": "GetCustomersCustomerSources", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter sources according to a particular object type.", + "in": "query", + "name": "object", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new credit card, you must specify a customer or recipient on which to create it.

\n\n

If the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.

", + "operationId": "PostCustomersCustomerSources", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alipay_account": { + "description": "A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details.", + "maxLength": 5000, + "type": "string" + }, + "bank_account": { + "anyOf": [ + { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "object": { + "enum": [ + "bank_account" + ], + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "customer_payment_source_bank_account", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details." + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + }, + "object": { + "enum": [ + "card" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "customer_payment_source_card", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js).", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source": { + "description": "Please refer to full [documentation](https://stripe.com/docs/api) instead.", + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources/{id}": { + "delete": { + "description": "

Delete a specified source for a given customer.

", + "operationId": "DeleteCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_source" + }, + { + "$ref": "#/components/schemas/deleted_payment_source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieve a specified source for a given customer.

", + "operationId": "GetCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Update a specified source for a given customer.

", + "operationId": "PostCustomersCustomerSourcesId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "Two digit number representing the card’s expiration month.", + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "description": "Four digit number representing the card’s expiration year.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/card" + }, + { + "$ref": "#/components/schemas/bank_account" + }, + { + "$ref": "#/components/schemas/source" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/sources/{id}/verify": { + "post": { + "description": "

Verify a specified bank account for a given customer.

", + "operationId": "PostCustomersCustomerSourcesIdVerify", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bank_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/subscriptions": { + "get": { + "description": "

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

", + "operationId": "GetCustomersCustomerSubscriptions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new subscription on an existing customer.

", + "operationId": "PostCustomersCustomerSubscriptions", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "backdate_start_date": { + "description": "For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor": { + "description": "A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "type": "integer", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.", + "format": "unix-time", + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "payment_behavior": { + "description": "Only applies to subscriptions with `collection_method=charge_automatically`.\n\nUse `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state.\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.\n\n`pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.\n\nSubscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.", + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "integer" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/subscriptions/{subscription_exposed_id}": { + "delete": { + "description": "

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

\n\n

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

\n\n

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

", + "operationId": "DeleteCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.", + "type": "boolean" + }, + "prorate": { + "description": "Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the subscription with the given ID.

", + "operationId": "GetCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

", + "operationId": "PostCustomersCustomerSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "cancel_at": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pause_collection": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "pause_collection": { + "anyOf": [ + { + "properties": { + "behavior": { + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "behavior" + ], + "title": "pause_collection_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value." + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a customer.

", + "operationId": "DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "", + "operationId": "GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/tax_ids": { + "get": { + "description": "

Returns a list of tax IDs for a customer.

", + "operationId": "GetCustomersCustomerTaxIds", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new TaxID object for a customer.

", + "operationId": "PostCustomersCustomerTaxIds", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "description": "Value of the tax ID.", + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/customers/{customer}/tax_ids/{id}": { + "delete": { + "description": "

Deletes an existing TaxID object.

", + "operationId": "DeleteCustomersCustomerTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the TaxID object with the given identifier.

", + "operationId": "GetCustomersCustomerTaxIdsId", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_id" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/disputes": { + "get": { + "description": "

Returns a list of your disputes.

", + "operationId": "GetDisputes", + "parameters": [ + { + "description": "Only return disputes associated to the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/dispute" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/disputes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "DisputeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/disputes/{dispute}": { + "get": { + "description": "

Retrieves the dispute with the given ID.

", + "operationId": "GetDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

\n\n

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

", + "operationId": "PostDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "evidence": { + "description": "Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.", + "properties": { + "access_activity_log": { + "maxLength": 20000, + "type": "string" + }, + "billing_address": { + "maxLength": 5000, + "type": "string" + }, + "cancellation_policy": { + "type": "string" + }, + "cancellation_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "cancellation_rebuttal": { + "maxLength": 20000, + "type": "string" + }, + "customer_communication": { + "type": "string" + }, + "customer_email_address": { + "maxLength": 5000, + "type": "string" + }, + "customer_name": { + "maxLength": 5000, + "type": "string" + }, + "customer_purchase_ip": { + "maxLength": 5000, + "type": "string" + }, + "customer_signature": { + "type": "string" + }, + "duplicate_charge_documentation": { + "type": "string" + }, + "duplicate_charge_explanation": { + "maxLength": 20000, + "type": "string" + }, + "duplicate_charge_id": { + "maxLength": 5000, + "type": "string" + }, + "product_description": { + "maxLength": 20000, + "type": "string" + }, + "receipt": { + "type": "string" + }, + "refund_policy": { + "type": "string" + }, + "refund_policy_disclosure": { + "maxLength": 20000, + "type": "string" + }, + "refund_refusal_explanation": { + "maxLength": 20000, + "type": "string" + }, + "service_date": { + "maxLength": 5000, + "type": "string" + }, + "service_documentation": { + "type": "string" + }, + "shipping_address": { + "maxLength": 5000, + "type": "string" + }, + "shipping_carrier": { + "maxLength": 5000, + "type": "string" + }, + "shipping_date": { + "maxLength": 5000, + "type": "string" + }, + "shipping_documentation": { + "type": "string" + }, + "shipping_tracking_number": { + "maxLength": 5000, + "type": "string" + }, + "uncategorized_file": { + "type": "string" + }, + "uncategorized_text": { + "maxLength": 20000, + "type": "string" + } + }, + "title": "dispute_evidence_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "submit": { + "description": "Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/disputes/{dispute}/close": { + "post": { + "description": "

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

\n\n

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

", + "operationId": "PostDisputesDisputeClose", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/ephemeral_keys": { + "post": { + "description": "

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

", + "operationId": "PostEphemeralKeys", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of the Customer you'd like to modify using the resulting ephemeral key.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "issuing_card": { + "description": "The ID of the Issuing Card you'd like to access using the resulting ephemeral key.", + "maxLength": 5000, + "type": "string" + }, + "verification_session": { + "description": "The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ephemeral_key" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/ephemeral_keys/{key}": { + "delete": { + "description": "

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

", + "operationId": "DeleteEphemeralKeysKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ephemeral_key" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/events": { + "get": { + "description": "

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

", + "operationId": "GetEvents", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.", + "in": "query", + "name": "delivery_success", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.", + "explode": true, + "in": "query", + "name": "types", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/event" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/events", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "NotificationEventList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/events/{id}": { + "get": { + "description": "

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

", + "operationId": "GetEventsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/event" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/exchange_rates": { + "get": { + "description": "

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

", + "operationId": "GetExchangeRates", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/exchange_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/exchange_rates", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ExchangeRateList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/exchange_rates/{rate_id}": { + "get": { + "description": "

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

", + "operationId": "GetExchangeRatesRateId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "rate_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/exchange_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/file_links": { + "get": { + "description": "

Returns a list of file links.

", + "operationId": "GetFileLinks", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Filter links by their expiration status. By default, all links are returned.", + "in": "query", + "name": "expired", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return links for the given file.", + "in": "query", + "name": "file", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/file_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/file_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileLinkList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new file link object.

", + "operationId": "PostFileLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp after which the link will no longer be usable.", + "format": "unix-time", + "type": "integer" + }, + "file": { + "description": "The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/file_links/{link}": { + "get": { + "description": "

Retrieves the file link with the given ID.

", + "operationId": "GetFileLinksLink", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "link", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostFileLinksLink", + "parameters": [ + { + "in": "path", + "name": "link", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "expires_at": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/files": { + "get": { + "description": "

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

", + "operationId": "GetFiles", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The file purpose to filter queries by. If none is provided, files will not be filtered by purpose.", + "in": "query", + "name": "purpose", + "required": false, + "schema": { + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/file" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/files", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FileFileList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

\n\n

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

", + "operationId": "PostFiles", + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "file_link_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "file": { + "description": "A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol).", + "type": "string" + }, + "file_link_data": { + "description": "Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.", + "properties": { + "create": { + "type": "boolean" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "required": [ + "create" + ], + "title": "file_link_creation_params", + "type": "object" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "identity_document", + "pci_document", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "file", + "purpose" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + }, + "servers": [ + { + "url": "https://files.stripe.com/" + } + ] + } + }, + "/v1/files/{file}": { + "get": { + "description": "

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

", + "operationId": "GetFilesFile", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "file", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/file" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts": { + "get": { + "description": "

Returns a list of Financial Connections Account objects.

", + "operationId": "GetFinancialConnectionsAccounts", + "parameters": [ + { + "description": "If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.", + "explode": true, + "in": "query", + "name": "account_holder", + "required": false, + "schema": { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "accountholder_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If present, only return accounts that were collected as part of the given session.", + "in": "query", + "name": "session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}": { + "get": { + "description": "

Retrieves the details of an Financial Connections Account.

", + "operationId": "GetFinancialConnectionsAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}/disconnect": { + "post": { + "description": "

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

", + "operationId": "PostFinancialConnectionsAccountsAccountDisconnect", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}/owners": { + "get": { + "description": "

Lists all owners for a given Account

", + "operationId": "GetFinancialConnectionsAccountsAccountOwners", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ID of the ownership object to fetch owners from.", + "in": "query", + "name": "ownership", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/accounts/{account}/refresh": { + "post": { + "description": "

Refreshes the data associated with a Financial Connections Account.

", + "operationId": "PostFinancialConnectionsAccountsAccountRefresh", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features that you would like to refresh.", + "items": { + "enum": [ + "balance", + "ownership" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": [ + "features" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/sessions": { + "post": { + "description": "

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

", + "operationId": "PostFinancialConnectionsSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_holder": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "filters": { + "explode": true, + "style": "deepObject" + }, + "permissions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder": { + "description": "The account holder to link accounts for.", + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "account", + "customer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "accountholder_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "filters": { + "description": "Filters to restrict the kinds of accounts to collect.", + "properties": { + "countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "countries" + ], + "title": "filters_params", + "type": "object" + }, + "permissions": { + "description": "List of data features that you would like to request access to.\n\nPossible values are `balances`, `transactions`, `ownership`, and `payment_method`.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder", + "permissions" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/financial_connections/sessions/{session}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Session

", + "operationId": "GetFinancialConnectionsSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_reports": { + "get": { + "description": "

List all verification reports.

", + "operationId": "GetIdentityVerificationReports", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationReports of this type", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.", + "in": "query", + "name": "verification_session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/identity.verification_report" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/identity/verification_reports", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "GelatoVerificationReportList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_reports/{report}": { + "get": { + "description": "

Retrieves an existing VerificationReport

", + "operationId": "GetIdentityVerificationReportsReport", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_report" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions": { + "get": { + "description": "

Returns a list of VerificationSessions

", + "operationId": "GetIdentityVerificationSessions", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "processing", + "requires_input", + "verified" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/identity.verification_session" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/identity/verification_sessions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "GelatoVerificationSessionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a VerificationSession object.

\n\n

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

\n\n

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

\n\n

Related guide: Verify your users’ identity documents.

", + "operationId": "PostIdentityVerificationSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "options": { + "description": "A set of options for the session’s verification checks.", + "properties": { + "document": { + "anyOf": [ + { + "properties": { + "allowed_types": { + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "type": "boolean" + }, + "require_live_capture": { + "type": "boolean" + }, + "require_matching_selfie": { + "type": "boolean" + } + }, + "title": "document_options", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "session_options_param", + "type": "object" + }, + "return_url": { + "description": "The URL that the user will be redirected to upon completing the verification flow.", + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions/{session}": { + "get": { + "description": "

Retrieves the details of a VerificationSession that was previously created.

\n\n

When the session status is requires_input, you can use this method to retrieve a valid\nclient_secret or url to allow re-submission.

", + "operationId": "GetIdentityVerificationSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a VerificationSession object.

\n\n

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

", + "operationId": "PostIdentityVerificationSessionsSession", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "options": { + "description": "A set of options for the session’s verification checks.", + "properties": { + "document": { + "anyOf": [ + { + "properties": { + "allowed_types": { + "items": { + "enum": [ + "driving_license", + "id_card", + "passport" + ], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "type": "boolean" + }, + "require_live_capture": { + "type": "boolean" + }, + "require_matching_selfie": { + "type": "boolean" + } + }, + "title": "document_options", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "session_options_param", + "type": "object" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": [ + "document", + "id_number" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions/{session}/cancel": { + "post": { + "description": "

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

\n\n

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

", + "operationId": "PostIdentityVerificationSessionsSessionCancel", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/identity/verification_sessions/{session}/redact": { + "post": { + "description": "

Redact a VerificationSession to remove all collected information from Stripe. This will redact\nthe VerificationSession and all objects related to it, including VerificationReports, Events,\nrequest logs, etc.

\n\n

A VerificationSession object can be redacted when it is in requires_input or verified\nstatus. Redacting a VerificationSession in requires_action\nstate will automatically cancel it.

\n\n

The redaction process may take up to four days. When the redaction process is in progress, the\nVerificationSession’s redaction.status field will be set to processing; when the process is\nfinished, it will change to redacted and an identity.verification_session.redacted event\nwill be emitted.

\n\n

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the\nfields that contain personal data will be replaced by the string [redacted] or a similar\nplaceholder. The metadata field will also be erased. Redacted objects cannot be updated or\nused for any purpose.

\n\n

Learn more.

", + "operationId": "PostIdentityVerificationSessionsSessionRedact", + "parameters": [ + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identity.verification_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoiceitems": { + "get": { + "description": "

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

", + "operationId": "GetInvoiceitems", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.", + "in": "query", + "name": "invoice", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.", + "in": "query", + "name": "pending", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoiceitem" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/invoiceitems", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoicesItemsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

", + "operationId": "PostInvoiceitems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the invoice item or invoice line item." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice": { + "description": "The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the invoice item.", + "type": "integer" + }, + "subscription": { + "description": "The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "tax_rates": { + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "unit_amount": { + "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoiceitems/{invoiceitem}": { + "delete": { + "description": "

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

", + "operationId": "DeleteInvoiceitemsInvoiceitem", + "parameters": [ + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the invoice item with the given ID.

", + "operationId": "GetInvoiceitemsInvoiceitem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

", + "operationId": "PostInvoiceitemsInvoiceitem", + "parameters": [ + { + "in": "path", + "name": "invoiceitem", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "period": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.", + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "period": { + "description": "The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "description": "Non-negative integer. The quantity of units for the invoice item.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates." + }, + "unit_amount": { + "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoiceitem" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices": { + "get": { + "description": "

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

", + "operationId": "GetInvoices", + "parameters": [ + { + "description": "The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.", + "in": "query", + "name": "collection_method", + "required": false, + "schema": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return invoices for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "due_date", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "draft", + "open", + "paid", + "uncollectible", + "void" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return invoices for the subscription specified by this subscription ID.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoice" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/invoices", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoicesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostInvoices", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_tax_ids": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "from_invoice": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "rendering_options": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + }, + "shipping_details": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft." + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).", + "type": "integer" + }, + "auto_advance": { + "description": "Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "currency": { + "description": "The currency to create this invoice in. Defaults to that of `customer` if not specified.", + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of up to 4 custom fields to be displayed on the invoice." + }, + "customer": { + "description": "The ID of the customer who will be billed.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 1500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts." + }, + "due_date": { + "description": "The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.", + "format": "unix-time", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": "string" + }, + "from_invoice": { + "description": "Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.", + "properties": { + "action": { + "enum": [ + "revision" + ], + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "action", + "invoice" + ], + "title": "from_invoice", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "type": "string" + }, + "payment_settings": { + "description": "Configuration settings for the PaymentIntent that is generated when the invoice is finalized.", + "properties": { + "default_mandate": { + "maxLength": 5000, + "type": "string" + }, + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_items_behavior": { + "description": "How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted.", + "enum": [ + "exclude", + "include", + "include_and_require" + ], + "type": "string" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "description": "Settings for the cost of shipping for this invoice.", + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_cost", + "type": "object" + }, + "shipping_details": { + "description": "Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + }, + "statement_descriptor": { + "description": "Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.", + "maxLength": 22, + "type": "string" + }, + "subscription": { + "description": "The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.", + "maxLength": 5000, + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/search": { + "get": { + "description": "

Search for invoices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetInvoicesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/invoice" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/upcoming": { + "get": { + "description": "

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

\n\n

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

\n\n

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

", + "operationId": "GetInvoicesUpcoming", + "parameters": [ + { + "description": "Settings for automatic tax lookup for this invoice preview.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Details about the customer you want to invoice or overrides for an existing customer.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.", + "explode": true, + "in": "query", + "name": "discounts", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "List of invoice items to add or update in the upcoming invoice preview.", + "explode": true, + "in": "query", + "name": "invoice_items", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "in": "query", + "name": "schedule", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.", + "explode": true, + "in": "query", + "name": "subscription_billing_cycle_anchor", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.", + "explode": true, + "in": "query", + "name": "subscription_cancel_at", + "required": false, + "schema": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "in": "query", + "name": "subscription_cancel_at_period_end", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "This simulates the subscription being canceled or expired immediately.", + "in": "query", + "name": "subscription_cancel_now", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.", + "explode": true, + "in": "query", + "name": "subscription_default_tax_rates", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A list of up to 20 subscription items, each with an attached price.", + "explode": true, + "in": "query", + "name": "subscription_items", + "required": false, + "schema": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "in": "query", + "name": "subscription_proration_behavior", + "required": false, + "schema": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.", + "in": "query", + "name": "subscription_proration_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.", + "in": "query", + "name": "subscription_resume_at", + "required": false, + "schema": { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Date a subscription is intended to start (can be future or past)", + "in": "query", + "name": "subscription_start_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.", + "explode": true, + "in": "query", + "name": "subscription_trial_end", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "in": "query", + "name": "subscription_trial_from_plan", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/upcoming/lines": { + "get": { + "description": "

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetInvoicesUpcomingLines", + "parameters": [ + { + "description": "Settings for automatic tax lookup for this invoice preview.", + "explode": true, + "in": "query", + "name": "automatic_tax", + "required": false, + "schema": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Details about the customer you want to invoice or overrides for an existing customer.", + "explode": true, + "in": "query", + "name": "customer_details", + "required": false, + "schema": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "customer_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax": { + "properties": { + "ip_address": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "tax_param", + "type": "object" + }, + "tax_exempt": { + "enum": [ + "", + "exempt", + "none", + "reverse" + ], + "type": "string" + }, + "tax_ids": { + "items": { + "properties": { + "type": { + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + } + }, + "title": "customer_details_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.", + "explode": true, + "in": "query", + "name": "discounts", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "List of invoice items to add or update in the upcoming invoice preview.", + "explode": true, + "in": "query", + "name": "invoice_items", + "required": false, + "schema": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "discountable": { + "type": "boolean" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "invoiceitem": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "period": { + "properties": { + "end": { + "format": "unix-time", + "type": "integer" + }, + "start": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "end", + "start" + ], + "title": "period", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "invoice_item_preview_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.", + "in": "query", + "name": "schedule", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.", + "in": "query", + "name": "subscription", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.", + "explode": true, + "in": "query", + "name": "subscription_billing_cycle_anchor", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.", + "explode": true, + "in": "query", + "name": "subscription_cancel_at", + "required": false, + "schema": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "in": "query", + "name": "subscription_cancel_at_period_end", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "This simulates the subscription being canceled or expired immediately.", + "in": "query", + "name": "subscription_cancel_now", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.", + "explode": true, + "in": "query", + "name": "subscription_default_tax_rates", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A list of up to 20 subscription items, each with an attached price.", + "explode": true, + "in": "query", + "name": "subscription_items", + "required": false, + "schema": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "in": "query", + "name": "subscription_proration_behavior", + "required": false, + "schema": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.", + "in": "query", + "name": "subscription_proration_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.", + "in": "query", + "name": "subscription_resume_at", + "required": false, + "schema": { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Date a subscription is intended to start (can be future or past)", + "in": "query", + "name": "subscription_start_date", + "required": false, + "schema": { + "format": "unix-time", + "type": "integer" + }, + "style": "form" + }, + { + "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.", + "explode": true, + "in": "query", + "name": "subscription_trial_end", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "in": "query", + "name": "subscription_trial_from_plan", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}": { + "delete": { + "description": "

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

", + "operationId": "DeleteInvoicesInvoice", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the invoice with the given ID.

", + "operationId": "GetInvoicesInvoice", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Draft invoices are fully editable. Once an invoice is finalized,\nmonetary values, as well as collection_method, become uneditable.

\n\n

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,\nsending reminders for, or automatically reconciling invoices, pass\nauto_advance=false.

", + "operationId": "PostInvoicesInvoice", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_tax_ids": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "rendering_options": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + }, + "shipping_details": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account tax IDs associated with the invoice. Only editable when the invoice is a draft." + }, + "application_fee_amount": { + "description": "A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).", + "type": "integer" + }, + "auto_advance": { + "description": "Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this invoice.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields." + }, + "days_until_due": { + "description": "The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates." + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.", + "maxLength": 1500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts." + }, + "due_date": { + "description": "The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.", + "format": "unix-time", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details." + }, + "payment_settings": { + "description": "Configuration settings for the PaymentIntent that is generated when the invoice is finalized.", + "properties": { + "default_mandate": { + "maxLength": 5000, + "type": "string" + }, + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_settings", + "type": "object" + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "anyOf": [ + { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + }, + "shipping_rate_data": { + "properties": { + "delivery_estimate": { + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "maxLength": 100, + "type": "string" + }, + "fixed_amount": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "type": "string" + }, + "type": { + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "title": "method_params", + "type": "object" + } + }, + "title": "shipping_cost", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Settings for the cost of shipping for this invoice." + }, + "shipping_details": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "recipient_shipping_with_optional_fields_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer." + }, + "statement_descriptor": { + "description": "Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/finalize": { + "post": { + "description": "

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

", + "operationId": "PostInvoicesInvoiceFinalize", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "auto_advance": { + "description": "Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/lines": { + "get": { + "description": "

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetInvoicesInvoiceLines", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/mark_uncollectible": { + "post": { + "description": "

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

", + "operationId": "PostInvoicesInvoiceMarkUncollectible", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/pay": { + "post": { + "description": "

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

", + "operationId": "PostInvoicesInvoicePay", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "forgive": { + "description": "In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. \n\nPassing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.", + "type": "boolean" + }, + "mandate": { + "description": "ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.", + "maxLength": 5000, + "type": "string" + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.", + "type": "boolean" + }, + "payment_method": { + "description": "A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/send": { + "post": { + "description": "

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

\n\n

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

", + "operationId": "PostInvoicesInvoiceSend", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/invoices/{invoice}/void": { + "post": { + "description": "

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

", + "operationId": "PostInvoicesInvoiceVoid", + "parameters": [ + { + "in": "path", + "name": "invoice", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/invoice" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations": { + "get": { + "description": "

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingAuthorizations", + "parameters": [ + { + "description": "Only return authorizations that belong to the given card.", + "in": "query", + "name": "card", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations that belong to the given cardholder.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "closed", + "pending", + "reversed" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.authorization" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/authorizations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingAuthorizationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations/{authorization}": { + "get": { + "description": "

Retrieves an Issuing Authorization object.

", + "operationId": "GetIssuingAuthorizationsAuthorization", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingAuthorizationsAuthorization", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations/{authorization}/approve": { + "post": { + "description": "

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow. \nYou can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.

", + "operationId": "PostIssuingAuthorizationsAuthorizationApprove", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/authorizations/{authorization}/decline": { + "post": { + "description": "

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.\nYou can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.

", + "operationId": "PostIssuingAuthorizationsAuthorizationDecline", + "parameters": [ + { + "in": "path", + "name": "authorization", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.authorization" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cardholders": { + "get": { + "description": "

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingCardholders", + "parameters": [ + { + "description": "Only return cardholders that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return cardholders that have the given email address.", + "in": "query", + "name": "email", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given phone number.", + "in": "query", + "name": "phone_number", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "blocked", + "inactive" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cardholders that have the given type. One of `individual` or `company`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.cardholder" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/cardholders", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingCardholderList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingCardholders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing": { + "description": "The cardholder's billing address.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "postal_code" + ], + "title": "required_address", + "type": "object" + } + }, + "required": [ + "address" + ], + "title": "billing_specs", + "type": "object" + }, + "company": { + "description": "Additional information about a `company` cardholder.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_param", + "type": "object" + }, + "email": { + "description": "The cardholder's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "individual": { + "description": "Additional information about an `individual` cardholder.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 5000, + "type": "string" + }, + "front": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "person_verification_document_param", + "type": "object" + } + }, + "title": "person_verification_param", + "type": "object" + } + }, + "title": "individual_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.", + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "type": "string" + }, + "spending_controls": { + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + }, + "spending_limits_currency": { + "type": "string" + } + }, + "title": "authorization_controls_param_v2", + "type": "object" + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.", + "enum": [ + "active", + "inactive" + ], + "type": "string" + }, + "type": { + "description": "One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.", + "enum": [ + "company", + "individual" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "name", + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cardholders/{cardholder}": { + "get": { + "description": "

Retrieves an Issuing Cardholder object.

", + "operationId": "GetIssuingCardholdersCardholder", + "parameters": [ + { + "in": "path", + "name": "cardholder", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingCardholdersCardholder", + "parameters": [ + { + "in": "path", + "name": "cardholder", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing": { + "explode": true, + "style": "deepObject" + }, + "company": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "individual": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing": { + "description": "The cardholder's billing address.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "postal_code" + ], + "title": "required_address", + "type": "object" + } + }, + "required": [ + "address" + ], + "title": "billing_specs", + "type": "object" + }, + "company": { + "description": "Additional information about a `company` cardholder.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_param", + "type": "object" + }, + "email": { + "description": "The cardholder's email address.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "individual": { + "description": "Additional information about an `individual` cardholder.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 5000, + "type": "string" + }, + "front": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "person_verification_document_param", + "type": "object" + } + }, + "title": "person_verification_param", + "type": "object" + } + }, + "title": "individual_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.", + "type": "string" + }, + "spending_controls": { + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + }, + "spending_limits_currency": { + "type": "string" + } + }, + "title": "authorization_controls_param_v2", + "type": "object" + }, + "status": { + "description": "Specifies whether to permit authorizations on this cardholder's cards.", + "enum": [ + "active", + "inactive" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.cardholder" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cards": { + "get": { + "description": "

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingCards", + "parameters": [ + { + "description": "Only return cards belonging to the Cardholder with the provided ID.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that were issued during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given expiration month.", + "in": "query", + "name": "exp_month", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given expiration year.", + "in": "query", + "name": "exp_year", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return cards that have the given last four digits.", + "in": "query", + "name": "last4", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Only return cards that have the given type. One of `virtual` or `physical`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "physical", + "virtual" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.card" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/cards", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingCardList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an Issuing Card object.

", + "operationId": "PostIssuingCards", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cardholder": { + "description": "The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "The currency for the card.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "replacement_for": { + "description": "The card this is meant to be a replacement for (if any).", + "maxLength": 5000, + "type": "string" + }, + "replacement_reason": { + "description": "If `replacement_for` is specified, this should indicate why that card is being replaced.", + "enum": [ + "damaged", + "expired", + "lost", + "stolen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "shipping": { + "description": "The address where the card will be shipped.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "postal_code" + ], + "title": "required_address", + "type": "object" + }, + "customs": { + "properties": { + "eori_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "customs_param", + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "require_signature": { + "type": "boolean" + }, + "service": { + "enum": [ + "express", + "priority", + "standard" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "enum": [ + "bulk", + "individual" + ], + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "shipping_specs", + "type": "object" + }, + "spending_controls": { + "description": "Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "authorization_controls_param", + "type": "object" + }, + "status": { + "description": "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.", + "enum": [ + "active", + "inactive" + ], + "type": "string" + }, + "type": { + "description": "The type of card to issue. Possible values are `physical` or `virtual`.", + "enum": [ + "physical", + "virtual" + ], + "type": "string" + } + }, + "required": [ + "currency", + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/cards/{card}": { + "get": { + "description": "

Retrieves an Issuing Card object.

", + "operationId": "GetIssuingCardsCard", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingCardsCard", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "pin": { + "explode": true, + "style": "deepObject" + }, + "spending_controls": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason why the `status` of this card is `canceled`.", + "enum": [ + "lost", + "stolen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "pin": { + "description": "The desired new PIN for this card.", + "properties": { + "encrypted_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "encrypted_pin_param", + "type": "object" + }, + "spending_controls": { + "description": "Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.", + "properties": { + "allowed_categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "blocked_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", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "spending_limits": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "categories": { + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards" + ], + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interval": { + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": [ + "amount", + "interval" + ], + "title": "spending_limits_param", + "type": "object" + }, + "type": "array" + } + }, + "title": "authorization_controls_param", + "type": "object" + }, + "status": { + "description": "Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.", + "enum": [ + "active", + "canceled", + "inactive" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/disputes": { + "get": { + "description": "

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingDisputes", + "parameters": [ + { + "description": "Select Issuing disputes that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Select Issuing disputes with the given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "expired", + "lost", + "submitted", + "unsubmitted", + "won" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Select the Issuing dispute for the given transaction.", + "in": "query", + "name": "transaction", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.dispute" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/disputes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingDisputeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

", + "operationId": "PostIssuingDisputes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "treasury": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.", + "type": "integer" + }, + "evidence": { + "description": "Evidence provided for the dispute.", + "properties": { + "canceled": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_policy_provided": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "canceled", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "duplicate": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_statement": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cash_receipt": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "check_image": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "original_transaction": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "duplicate", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fraudulent": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + } + }, + "title": "fraudulent", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "merchandise_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "return_description": { + "maxLength": 1500, + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "merchandise_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "not_received": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "not_received", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "other": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "other", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "reason": { + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "service_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "evidence_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "transaction": { + "description": "The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.", + "maxLength": 5000, + "type": "string" + }, + "treasury": { + "description": "Params for disputes related to Treasury FinancialAccounts", + "properties": { + "received_debit": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "title": "treasury_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/disputes/{dispute}": { + "get": { + "description": "

Retrieves an Issuing Dispute object.

", + "operationId": "GetIssuingDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

", + "operationId": "PostIssuingDisputesDispute", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "evidence": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "evidence": { + "description": "Evidence provided for the dispute.", + "properties": { + "canceled": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_policy_provided": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "canceled", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "duplicate": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_statement": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cash_receipt": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "check_image": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "original_transaction": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "duplicate", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fraudulent": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + } + }, + "title": "fraudulent", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "merchandise_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "return_description": { + "maxLength": 1500, + "type": "string" + }, + "return_status": { + "enum": [ + "", + "merchant_rejected", + "successful" + ], + "type": "string" + }, + "returned_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "merchandise_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "not_received": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expected_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "not_received", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "other": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "product_description": { + "maxLength": 1500, + "type": "string" + }, + "product_type": { + "enum": [ + "", + "merchandise", + "service" + ], + "type": "string" + } + }, + "title": "other", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "reason": { + "enum": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "anyOf": [ + { + "properties": { + "additional_documentation": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "canceled_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "cancellation_reason": { + "maxLength": 1500, + "type": "string" + }, + "explanation": { + "maxLength": 1500, + "type": "string" + }, + "received_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "service_not_as_described", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "evidence_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/disputes/{dispute}/submit": { + "post": { + "description": "

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

", + "operationId": "PostIssuingDisputesDisputeSubmit", + "parameters": [ + { + "in": "path", + "name": "dispute", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.dispute" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/settlements": { + "get": { + "description": "

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingSettlements", + "parameters": [ + { + "description": "Only return issuing settlements that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.settlement" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/settlements", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingSettlementList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/settlements/{settlement}": { + "get": { + "description": "

Retrieves an Issuing Settlement object.

", + "operationId": "GetIssuingSettlementsSettlement", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingSettlementsSettlement", + "parameters": [ + { + "in": "path", + "name": "settlement", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.settlement" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/transactions": { + "get": { + "description": "

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetIssuingTransactions", + "parameters": [ + { + "description": "Only return transactions that belong to the given card.", + "in": "query", + "name": "card", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that belong to the given cardholder.", + "in": "query", + "name": "cardholder", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transactions that have the given type. One of `capture` or `refund`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "capture", + "refund" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/issuing.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/issuing/transactions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "IssuingTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/issuing/transactions/{transaction}": { + "get": { + "description": "

Retrieves an Issuing Transaction object.

", + "operationId": "GetIssuingTransactionsTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostIssuingTransactionsTransaction", + "parameters": [ + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/link_account_sessions": { + "post": { + "description": "

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

", + "operationId": "PostLinkAccountSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account_holder": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "filters": { + "explode": true, + "style": "deepObject" + }, + "permissions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account_holder": { + "description": "The account holder to link accounts for.", + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "account", + "customer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "accountholder_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "filters": { + "description": "Filters to restrict the kinds of accounts to collect.", + "properties": { + "countries": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "countries" + ], + "title": "filters_params", + "type": "object" + }, + "permissions": { + "description": "List of data features that you would like to request access to.\n\nPossible values are `balances`, `transactions`, `ownership`, and `payment_method`.", + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder", + "permissions" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/link_account_sessions/{session}": { + "get": { + "description": "

Retrieves the details of a Financial Connections Session

", + "operationId": "GetLinkAccountSessionsSession", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "session", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts": { + "get": { + "description": "

Returns a list of Financial Connections Account objects.

", + "operationId": "GetLinkedAccounts", + "parameters": [ + { + "description": "If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.", + "explode": true, + "in": "query", + "name": "account_holder", + "required": false, + "schema": { + "properties": { + "account": { + "maxLength": 5000, + "type": "string" + }, + "customer": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "accountholder_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "If present, only return accounts that were collected as part of the given session.", + "in": "query", + "name": "session", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}": { + "get": { + "description": "

Retrieves the details of an Financial Connections Account.

", + "operationId": "GetLinkedAccountsAccount", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}/disconnect": { + "post": { + "description": "

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

", + "operationId": "PostLinkedAccountsAccountDisconnect", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}/owners": { + "get": { + "description": "

Lists all owners for a given Account

", + "operationId": "GetLinkedAccountsAccountOwners", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ID of the ownership object to fetch owners from.", + "in": "query", + "name": "ownership", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/linked_accounts/{account}/refresh": { + "post": { + "description": "

Refreshes the data associated with a Financial Connections Account.

", + "operationId": "PostLinkedAccountsAccountRefresh", + "parameters": [ + { + "in": "path", + "name": "account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "The list of account features that you would like to refresh.", + "items": { + "enum": [ + "balance", + "ownership" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "required": [ + "features" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/financial_connections.account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/mandates/{mandate}": { + "get": { + "description": "

Retrieves a Mandate object.

", + "operationId": "GetMandatesMandate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "mandate", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mandate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents": { + "get": { + "description": "

Returns a list of PaymentIntents.

", + "operationId": "GetPaymentIntents", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return PaymentIntents for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_intent" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_intents", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsPaymentIntentList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a PaymentIntent object.

\n\n

After the PaymentIntent is created, attach a payment method and confirm\nto continue the payment. You can read more about the different payment flows\navailable via the Payment Intents API here.

\n\n

When confirm=true is used during creation, it is equivalent to creating\nand confirming the PaymentIntent in the same call. You may use any parameters\navailable in the confirm API when confirm=true\nis supplied.

", + "operationId": "PostPaymentIntents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "automatic_payment_methods": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "off_session": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "automatic_payment_methods": { + "description": "When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_payment_methods_param", + "type": "object" + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "confirm": { + "description": "Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided.", + "type": "boolean" + }, + "confirmation_method": { + "enum": [ + "automatic", + "manual" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "error_on_requires_action": { + "description": "Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "maxLength": 5000, + "type": "string" + }, + "mandate_data": { + "description": "This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "off_session": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "one_off", + "recurring" + ], + "maxLength": 5000, + "type": "string" + } + ], + "description": "Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm)." + }, + "on_behalf_of": { + "description": "The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "string" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.\n\nIf this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "maxLength": 11, + "type": "string" + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 22, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "persistent_token": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to [\"card\"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "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).", + "type": "string" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "description": "Shipping information for this PaymentIntent.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment succeeds.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_creation_params", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "type": "string" + }, + "use_stripe_sdk": { + "description": "Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.", + "type": "boolean" + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/search": { + "get": { + "description": "

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetPaymentIntentsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_intent" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}": { + "get": { + "description": "

Retrieves the details of a PaymentIntent that has previously been created.

\n\n

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

\n\n

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

", + "operationId": "GetPaymentIntentsIntent", + "parameters": [ + { + "description": "The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates properties on a PaymentIntent object without confirming.

\n\n

Depending on which properties you update, you may need to confirm the\nPaymentIntent again. For example, updating the payment_method will\nalways require you to confirm the PaymentIntent again. If you prefer to\nupdate and confirm at the same time, we recommend updating properties via\nthe confirm API instead.

", + "operationId": "PostPaymentIntentsIntent", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "receipt_email": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)." + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "maxLength": 11, + "type": "string" + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 22, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "persistent_token": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "receipt_email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails)." + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).\n\nIf `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.", + "enum": [ + "", + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/apply_customer_balance": { + "post": { + "description": "

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

", + "operationId": "PostPaymentIntentsIntentApplyCustomerBalance", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount intended to be applied to this PaymentIntent from the customer’s cash balance.\n\nA positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).\n\nThe maximum amount is the amount of the PaymentIntent.\n\nWhen omitted, the amount defaults to the remaining amount requested on the PaymentIntent.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/cancel": { + "post": { + "description": "

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.

\n\n

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

\n\n

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.

", + "operationId": "PostPaymentIntentsIntentCancel", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`", + "enum": [ + "abandoned", + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/capture": { + "post": { + "description": "

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

\n\n

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

\n\n

Learn more about separate authorization and capture.

", + "operationId": "PostPaymentIntentsIntentCapture", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount_to_capture": { + "description": "The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided.", + "type": "integer" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment\nis captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/confirm": { + "post": { + "description": "

Confirm that your customer intends to pay with current or provided\npayment method. Upon confirmation, the PaymentIntent will attempt to initiate\na payment.\nIf the selected payment method requires additional authentication steps, the\nPaymentIntent will transition to the requires_action status and\nsuggest additional actions via next_action. If payment fails,\nthe PaymentIntent will transition to the requires_payment_method status. If\npayment succeeds, the PaymentIntent will transition to the succeeded\nstatus (or requires_capture, if capture_method is set to manual).\nIf the confirmation_method is automatic, payment may be attempted\nusing our client SDKs\nand the PaymentIntent’s client_secret.\nAfter next_actions are handled by the client, no additional\nconfirmation is required to complete the payment.\nIf the confirmation_method is manual, all payment attempts must be\ninitiated using a secret key.\nIf any actions are required for the payment, the PaymentIntent will\nreturn to the requires_confirmation state\nafter those actions are completed. Your server needs to then\nexplicitly re-confirm the PaymentIntent to initiate the next payment\nattempt. Read the expanded documentation\nto learn more about manual confirmation.

", + "operationId": "PostPaymentIntentsIntentConfirm", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "off_session": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "receipt_email": { + "explode": true, + "style": "deepObject" + }, + "shipping": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of the PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "error_on_requires_action": { + "description": "Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "ID of the mandate to be used for this payment.", + "maxLength": 5000, + "type": "string" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + { + "properties": { + "customer_acceptance": { + "properties": { + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "online", + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "client_key_param", + "type": "object" + } + ], + "description": "This hash contains details about the Mandate to create" + }, + "off_session": { + "anyOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "one_off", + "recurring" + ], + "maxLength": 5000, + "type": "string" + } + ], + "description": "Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards)." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear\nin the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)\nproperty on the PaymentIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this PaymentIntent.", + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "affirm": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "reference": { + "maxLength": 128, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "alipay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "blik": { + "anyOf": [ + { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "boleto": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "cvc_token": { + "maxLength": 5000, + "type": "string" + }, + "installments": { + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "properties": { + "count": { + "type": "integer" + }, + "interval": { + "enum": [ + "month" + ], + "type": "string" + }, + "type": { + "enum": [ + "fixed_count" + ], + "type": "string" + } + }, + "required": [ + "count", + "interval", + "type" + ], + "title": "installment_plan", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "installments_param", + "type": "object" + }, + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "anyOf": [ + { + "maxLength": 22, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "statement_descriptor_suffix_kanji": { + "anyOf": [ + { + "maxLength": 17, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_intent_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card_present": { + "anyOf": [ + { + "properties": { + "request_extended_authorization": { + "type": "boolean" + }, + "request_incremental_authorization_support": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_params", + "type": "object" + }, + "requested_address_types": { + "items": { + "enum": [ + "iban", + "sepa", + "sort_code", + "spei", + "zengin" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "type" + ], + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "enum": [ + "bank_transfer" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "eps": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "fpx": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "giropay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "ideal": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "properties": {}, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "klarna": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "preferred_locale": { + "enum": [ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sv-FI", + "sv-SE" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": { + "confirmation_number": { + "maxLength": 11, + "type": "string" + }, + "expires_after_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "expires_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "product_description": { + "maxLength": 22, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "link": { + "anyOf": [ + { + "properties": { + "capture_method": { + "enum": [ + "", + "manual" + ], + "type": "string" + }, + "persistent_token": { + "maxLength": 5000, + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "properties": { + "expires_after_days": { + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "p24": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "paynow": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "pix": { + "anyOf": [ + { + "properties": { + "expires_after_seconds": { + "type": "integer" + }, + "expires_at": { + "format": "unix-time", + "type": "integer" + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "properties": { + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "sofort": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "", + "de", + "en", + "es", + "fr", + "it", + "nl", + "pl" + ], + "type": "string" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "setup_future_usage": { + "enum": [ + "", + "none", + "off_session", + "on_session" + ], + "type": "string" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "properties": { + "app_id": { + "maxLength": 5000, + "type": "string" + }, + "client": { + "enum": [ + "android", + "ios", + "web" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "none" + ], + "type": "string" + } + }, + "required": [ + "client" + ], + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "receipt_email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails)." + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.\nIf you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.\nThis parameter is only used for cards and other redirect-based payment methods.", + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).\n\nIf `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.", + "enum": [ + "", + "off_session", + "on_session" + ], + "type": "string" + }, + "shipping": { + "anyOf": [ + { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address", + "name" + ], + "title": "optional_fields_shipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "use_stripe_sdk": { + "description": "Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/increment_authorization": { + "post": { + "description": "

Perform an incremental authorization on an eligible\nPaymentIntent. To be eligible, the\nPaymentIntent’s status must be requires_capture and\nincremental_authorization_supported\nmust be true.

\n\n

Incremental authorizations attempt to increase the authorized amount on\nyour customer’s card to the new, higher amount provided. As with the\ninitial authorization, incremental authorizations may be declined. A\nsingle PaymentIntent can call this endpoint multiple times to further\nincrease the authorized amount.

\n\n

If the incremental authorization succeeds, the PaymentIntent object is\nreturned with the updated\namount.\nIf the incremental authorization fails, a\ncard_declined error is returned, and no\nfields on the PaymentIntent or Charge are updated. The PaymentIntent\nobject remains capturable for the previously authorized amount.

\n\n

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.\nOnce captured, a PaymentIntent can no longer be incremented.

\n\n

Learn more about incremental authorizations.

", + "operationId": "PostPaymentIntentsIntentIncrementAuthorization", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.", + "type": "integer" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 22, + "type": "string" + }, + "transfer_data": { + "description": "The parameters used to automatically create a Transfer when the payment is captured.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "properties": { + "amount": { + "type": "integer" + } + }, + "title": "transfer_data_update_params", + "type": "object" + } + }, + "required": [ + "amount" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_intents/{intent}/verify_microdeposits": { + "post": { + "description": "

Verifies microdeposits on a PaymentIntent object.

", + "operationId": "PostPaymentIntentsIntentVerifyMicrodeposits", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret of the PaymentIntent.", + "maxLength": 5000, + "type": "string" + }, + "descriptor_code": { + "description": "A six-character code starting with SM present in the microdeposit sent to the bank account.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_links": { + "get": { + "description": "

Returns a list of your payment links.

", + "operationId": "GetPaymentLinks", + "parameters": [ + { + "description": "Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_link" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_links", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourcePaymentLinkList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a payment link.

", + "operationId": "PostPaymentLinks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_completion": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "consent_collection": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_intent_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "phone_number_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + }, + "shipping_options": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "tax_id_collection": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "after_completion": { + "description": "Behavior after the purchase is complete.", + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_confirmation_page_params", + "type": "object" + }, + "redirect": { + "properties": { + "url": { + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "after_completion_redirect_params", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "after_completion_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.", + "type": "integer" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.", + "type": "number" + }, + "automatic_tax": { + "description": "Configuration for automatic tax collection.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "consent_collection": { + "description": "Configure fields to gather active consent from customers.", + "properties": { + "promotions": { + "enum": [ + "auto", + "none" + ], + "type": "string" + }, + "terms_of_service": { + "enum": [ + "none", + "required" + ], + "type": "string" + } + }, + "title": "consent_collection_params", + "type": "object" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price.", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "custom", + "type" + ], + "title": "custom_field_label_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "type": { + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "type" + ], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer_creation": { + "description": "Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "invoice_settings_params", + "type": "object" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_creation_create_params", + "type": "object" + }, + "line_items": { + "description": "The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "adjustable_quantity_params", + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": [ + "price", + "quantity" + ], + "title": "line_items_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "type": "object" + }, + "on_behalf_of": { + "description": "The account on behalf of which to charge.", + "type": "string" + }, + "payment_intent_data": { + "description": "A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.", + "properties": { + "capture_method": { + "enum": [ + "automatic", + "manual" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + } + }, + "title": "payment_intent_data_params", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "phone_number_collection": { + "description": "Controls phone number collection settings during checkout.\n\nWe recommend that you review your privacy policy and check with your legal contacts.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "phone_number_collection_params", + "type": "object" + }, + "shipping_address_collection": { + "description": "Configuration for collecting the customer's shipping address.", + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "shipping_address_collection_params", + "type": "object" + }, + "shipping_options": { + "description": "The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "items": { + "properties": { + "shipping_rate": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "shipping_option_params", + "type": "object" + }, + "type": "array" + }, + "submit_type": { + "description": "Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).", + "enum": [ + "auto", + "book", + "donate", + "pay" + ], + "type": "string" + }, + "subscription_data": { + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "trial_period_days": { + "type": "integer" + } + }, + "title": "subscription_data_params", + "type": "object" + }, + "tax_id_collection": { + "description": "Controls tax ID collection during checkout.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "tax_id_collection_params", + "type": "object" + }, + "transfer_data": { + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.", + "properties": { + "amount": { + "type": "integer" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_params", + "type": "object" + } + }, + "required": [ + "line_items" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_links/{payment_link}": { + "get": { + "description": "

Retrieve a payment link.

", + "operationId": "GetPaymentLinksPaymentLink", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a payment link.

", + "operationId": "PostPaymentLinksPaymentLink", + "parameters": [ + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "after_completion": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "custom_fields": { + "explode": true, + "style": "deepObject" + }, + "custom_text": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_creation": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "shipping_address_collection": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "description": "Behavior after the purchase is complete.", + "properties": { + "hosted_confirmation": { + "properties": { + "custom_message": { + "maxLength": 500, + "type": "string" + } + }, + "title": "after_completion_confirmation_page_params", + "type": "object" + }, + "redirect": { + "properties": { + "url": { + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "after_completion_redirect_params", + "type": "object" + }, + "type": { + "enum": [ + "hosted_confirmation", + "redirect" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "after_completion_params", + "type": "object" + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": "boolean" + }, + "automatic_tax": { + "description": "Configuration for automatic tax collection.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_params", + "type": "object" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": [ + "auto", + "required" + ], + "type": "string" + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "dropdown": { + "properties": { + "options": { + "items": { + "properties": { + "label": { + "maxLength": 100, + "type": "string" + }, + "value": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "title": "custom_field_option_param", + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "options" + ], + "title": "custom_field_dropdown_param", + "type": "object" + }, + "key": { + "maxLength": 200, + "type": "string" + }, + "label": { + "properties": { + "custom": { + "maxLength": 50, + "type": "string" + }, + "type": { + "enum": [ + "custom" + ], + "type": "string" + } + }, + "required": [ + "custom", + "type" + ], + "title": "custom_field_label_param", + "type": "object" + }, + "optional": { + "type": "boolean" + }, + "type": { + "enum": [ + "dropdown", + "numeric", + "text" + ], + "type": "string" + } + }, + "required": [ + "key", + "label", + "type" + ], + "title": "custom_field_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported." + }, + "custom_text": { + "description": "Display additional text for your customers using custom text.", + "properties": { + "shipping_address": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "submit": { + "anyOf": [ + { + "properties": { + "message": { + "maxLength": 1000, + "type": "string" + } + }, + "required": [ + "message" + ], + "title": "custom_text_position_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "custom_text_param", + "type": "object" + }, + "customer_creation": { + "description": "Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_creation": { + "description": "Generate a post-purchase Invoice for one-time payments.", + "properties": { + "enabled": { + "type": "boolean" + }, + "invoice_data": { + "properties": { + "account_tax_ids": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "custom_fields": { + "anyOf": [ + { + "items": { + "properties": { + "name": { + "maxLength": 30, + "type": "string" + }, + "value": { + "maxLength": 30, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "title": "custom_field_params", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 1500, + "type": "string" + }, + "footer": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "rendering_options": { + "anyOf": [ + { + "properties": { + "amount_tax_display": { + "enum": [ + "", + "exclude_tax", + "include_inclusive_tax" + ], + "type": "string" + } + }, + "title": "rendering_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "invoice_settings_params", + "type": "object" + } + }, + "required": [ + "enabled" + ], + "title": "invoice_creation_update_params", + "type": "object" + }, + "line_items": { + "description": "The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.", + "items": { + "properties": { + "adjustable_quantity": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "adjustable_quantity_params", + "type": "object" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": [ + "id" + ], + "title": "line_items_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.", + "type": "object" + }, + "payment_method_collection": { + "description": "Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.\n\nCan only be set in `subscription` mode.\n\nIf you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).", + "enum": [ + "always", + "if_required" + ], + "type": "string" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods)." + }, + "shipping_address_collection": { + "anyOf": [ + { + "properties": { + "allowed_countries": { + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "allowed_countries" + ], + "title": "shipping_address_collection_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Configuration for collecting the customer's shipping address." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_link" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_links/{payment_link}/line_items": { + "get": { + "description": "

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetPaymentLinksPaymentLinkLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "payment_link", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods": { + "get": { + "description": "

Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods API instead.

", + "operationId": "GetPaymentMethods", + "parameters": [ + { + "description": "The ID of the customer whose PaymentMethods will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payment_method" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payment_methods", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsPaymentMethodList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

\n\n

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

", + "operationId": "PostPaymentMethods", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "acss_debit": { + "explode": true, + "style": "deepObject" + }, + "affirm": { + "explode": true, + "style": "deepObject" + }, + "afterpay_clearpay": { + "explode": true, + "style": "deepObject" + }, + "alipay": { + "explode": true, + "style": "deepObject" + }, + "au_becs_debit": { + "explode": true, + "style": "deepObject" + }, + "bacs_debit": { + "explode": true, + "style": "deepObject" + }, + "bancontact": { + "explode": true, + "style": "deepObject" + }, + "billing_details": { + "explode": true, + "style": "deepObject" + }, + "blik": { + "explode": true, + "style": "deepObject" + }, + "boleto": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "customer_balance": { + "explode": true, + "style": "deepObject" + }, + "eps": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fpx": { + "explode": true, + "style": "deepObject" + }, + "giropay": { + "explode": true, + "style": "deepObject" + }, + "grabpay": { + "explode": true, + "style": "deepObject" + }, + "ideal": { + "explode": true, + "style": "deepObject" + }, + "interac_present": { + "explode": true, + "style": "deepObject" + }, + "klarna": { + "explode": true, + "style": "deepObject" + }, + "konbini": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "oxxo": { + "explode": true, + "style": "deepObject" + }, + "p24": { + "explode": true, + "style": "deepObject" + }, + "paynow": { + "explode": true, + "style": "deepObject" + }, + "pix": { + "explode": true, + "style": "deepObject" + }, + "promptpay": { + "explode": true, + "style": "deepObject" + }, + "radar_options": { + "explode": true, + "style": "deepObject" + }, + "sepa_debit": { + "explode": true, + "style": "deepObject" + }, + "sofort": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + }, + "wechat_pay": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "acss_debit": { + "description": "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "description": "If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "description": "If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "description": "If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "description": "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "description": "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.", + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "description": "If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "description": "Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "description": "If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "description": "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.", + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "card": { + "anyOf": [ + { + "properties": { + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + }, + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "card_details_params", + "type": "object" + }, + { + "properties": { + "token": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "token" + ], + "title": "token_params", + "type": "object" + } + ], + "description": "If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: \"tok_visa\"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.", + "x-stripeBypassValidation": true + }, + "customer": { + "description": "The `Customer` to whom the original PaymentMethod is attached.", + "maxLength": 5000, + "type": "string" + }, + "customer_balance": { + "description": "If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "description": "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.", + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fpx": { + "description": "If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.", + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "description": "If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "description": "If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "description": "If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.", + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "description": "If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "description": "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.", + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "description": "If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "description": "If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "oxxo": { + "description": "If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "description": "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.", + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "payment_method": { + "description": "The PaymentMethod to share.", + "maxLength": 5000, + "type": "string" + }, + "paynow": { + "description": "If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "description": "If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "description": "If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "description": "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.", + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "description": "If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.", + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "description": "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.", + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "description": "If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.", + "properties": {}, + "title": "param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods/{payment_method}": { + "get": { + "description": "

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

", + "operationId": "GetPaymentMethodsPaymentMethod", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

", + "operationId": "PostPaymentMethodsPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_details": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "link": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "us_bank_account": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_details": { + "description": "Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.", + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "card": { + "description": "If this is a `card` PaymentMethod, this hash contains the user's card details.", + "properties": { + "exp_month": { + "type": "integer" + }, + "exp_year": { + "type": "integer" + } + }, + "title": "update_api_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "link": { + "description": "If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.", + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "us_bank_account": { + "description": "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.", + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + } + }, + "title": "update_param", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods/{payment_method}/attach": { + "post": { + "description": "

Attaches a PaymentMethod object to a Customer.

\n\n

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent\nor a PaymentIntent with setup_future_usage.\nThese approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach\nendpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for\nfuture use, which makes later declines and payment friction more likely.\nSee Optimizing cards for future payments for more information about setting up\nfuture payments.

\n\n

To use this PaymentMethod as the default for invoice or subscription payments,\nset invoice_settings.default_payment_method,\non the Customer to the PaymentMethod’s ID.

", + "operationId": "PostPaymentMethodsPaymentMethodAttach", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The ID of the customer to which to attach the PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payment_methods/{payment_method}/detach": { + "post": { + "description": "

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

", + "operationId": "PostPaymentMethodsPaymentMethodDetach", + "parameters": [ + { + "in": "path", + "name": "payment_method", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payment_method" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts": { + "get": { + "description": "

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

", + "operationId": "GetPayouts", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "arrival_date", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The ID of an external account - only return payouts sent to this external account.", + "in": "query", + "name": "destination", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/payout" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/payouts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PayoutList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

\n\n

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

\n\n

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

", + "operationId": "PostPayouts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents representing how much to payout.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination": { + "description": "The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).)", + "enum": [ + "instant", + "standard" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "source_type": { + "description": "The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`.", + "enum": [ + "bank_account", + "card", + "fpx" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "statement_descriptor": { + "description": "A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all.", + "maxLength": 22, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts/{payout}": { + "get": { + "description": "

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

", + "operationId": "GetPayoutsPayout", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

", + "operationId": "PostPayoutsPayout", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts/{payout}/cancel": { + "post": { + "description": "

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

", + "operationId": "PostPayoutsPayoutCancel", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/payouts/{payout}/reverse": { + "post": { + "description": "

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

\n\n

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

", + "operationId": "PostPayoutsPayoutReverse", + "parameters": [ + { + "in": "path", + "name": "payout", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/payout" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/plans": { + "get": { + "description": "

Returns a list of your plans.

", + "operationId": "GetPlans", + "parameters": [ + { + "description": "Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return plans for the given product.", + "in": "query", + "name": "product", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/plan" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/plans", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PlanList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

", + "operationId": "PostPlans", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "product": { + "explode": true, + "style": "deepObject" + }, + "tiers": { + "explode": true, + "style": "deepObject" + }, + "transform_usage": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the plan is currently available for new subscriptions. Defaults to `true`.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "type": "string" + }, + "amount": { + "description": "A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.", + "type": "integer" + }, + "amount_decimal": { + "description": "Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.", + "format": "decimal", + "type": "string" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "Specifies billing frequency. Either `day`, `week`, `month` or `year`.", + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).", + "type": "integer" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "anyOf": [ + { + "description": "The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a [service product](https://stripe.com/docs/api#product_object-type).", + "properties": { + "active": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + }, + "unit_label": { + "maxLength": 12, + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "inline_product_params", + "type": "object" + }, + { + "description": "The ID of the product whose pricing the created plan will represent.", + "maxLength": 5000, + "type": "string" + } + ] + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.", + "enum": [ + "graduated", + "volume" + ], + "type": "string" + }, + "transform_usage": { + "description": "Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.", + "properties": { + "divide_by": { + "type": "integer" + }, + "round": { + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "transform_usage_param", + "type": "object" + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "type": "integer" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "currency", + "interval" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/plans/{plan}": { + "delete": { + "description": "

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

", + "operationId": "DeletePlansPlan", + "parameters": [ + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the plan with the given ID.

", + "operationId": "GetPlansPlan", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

", + "operationId": "PostPlansPlan", + "parameters": [ + { + "in": "path", + "name": "plan", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the plan is currently available for new subscriptions.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "description": "The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.", + "maxLength": 5000, + "type": "string" + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/prices": { + "get": { + "description": "

Returns a list of your prices.

", + "operationId": "GetPrices", + "parameters": [ + { + "description": "Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return prices for the given currency.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return the price with these lookup_keys, if any exist.", + "explode": true, + "in": "query", + "name": "lookup_keys", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return prices for the given product.", + "in": "query", + "name": "product", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return prices with these recurring fields.", + "explode": true, + "in": "query", + "name": "recurring", + "required": false, + "schema": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "usage_type": { + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "title": "all_prices_recurring_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return prices of type `recurring` or `one_time`.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "one_time", + "recurring" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/price" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/prices", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PriceList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new price for an existing product. The price can be recurring or one-time.

", + "operationId": "PostPrices", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "custom_unit_amount": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "product_data": { + "explode": true, + "style": "deepObject" + }, + "recurring": { + "explode": true, + "style": "deepObject" + }, + "tiers": { + "explode": true, + "style": "deepObject" + }, + "transform_quantity": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the price can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": [ + "per_unit", + "tiered" + ], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "custom_unit_amount": { + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.", + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "product": { + "description": "The ID of the product that this price will belong to.", + "maxLength": 5000, + "type": "string" + }, + "product_data": { + "description": "These fields can be used to create a new product that this price will belong to.", + "properties": { + "active": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "maxLength": 5000, + "type": "string" + }, + "unit_label": { + "maxLength": 12, + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "inline_product_params", + "type": "object" + }, + "recurring": { + "description": "The recurring components of a price such as `interval` and `usage_type`.", + "properties": { + "aggregate_usage": { + "enum": [ + "last_during_period", + "last_ever", + "max", + "sum" + ], + "type": "string" + }, + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "usage_type": { + "enum": [ + "licensed", + "metered" + ], + "type": "string" + } + }, + "required": [ + "interval" + ], + "title": "recurring", + "type": "object" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.", + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "tiers_mode": { + "description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.", + "enum": [ + "graduated", + "volume" + ], + "type": "string" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.", + "type": "boolean" + }, + "transform_quantity": { + "description": "Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.", + "properties": { + "divide_by": { + "type": "integer" + }, + "round": { + "enum": [ + "down", + "up" + ], + "type": "string" + } + }, + "required": [ + "divide_by", + "round" + ], + "title": "transform_usage_param", + "type": "object" + }, + "unit_amount": { + "description": "A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`.", + "type": "integer" + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/prices/search": { + "get": { + "description": "

Search for prices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetPricesSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/price" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/prices/{price}": { + "get": { + "description": "

Retrieves the price with the given ID.

", + "operationId": "GetPricesPrice", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "price", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

", + "operationId": "PostPricesPrice", + "parameters": [ + { + "in": "path", + "name": "price", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "currency_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the price can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "currency_options": { + "anyOf": [ + { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies)." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 200, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "transfer_lookup_key": { + "description": "If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/price" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/products": { + "get": { + "description": "

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

", + "operationId": "GetProducts", + "parameters": [ + { + "description": "Only return products that are active or inactive (e.g., pass `false` to list all inactive products).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return products that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).", + "explode": true, + "in": "query", + "name": "ids", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return products that can be shipped (i.e., physical, not digital products).", + "in": "query", + "name": "shippable", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return products with the given url.", + "in": "query", + "name": "url", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/product" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/products", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ProductList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new product object.

", + "operationId": "PostProducts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_price_data": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "images": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "package_dimensions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the product is currently available for purchase. Defaults to `true`.", + "type": "boolean" + }, + "default_price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.", + "properties": { + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "custom_unit_amount": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maximum": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "preset": { + "type": "integer" + } + }, + "required": [ + "enabled" + ], + "title": "custom_unit_amount", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tiers": { + "items": { + "properties": { + "flat_amount": { + "type": "integer" + }, + "flat_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + }, + "up_to": { + "anyOf": [ + { + "enum": [ + "inf" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "up_to" + ], + "title": "tier", + "type": "object" + }, + "type": "array" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency" + ], + "title": "price_data_without_product", + "type": "object" + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "package_dimensions": { + "description": "The dimensions of this product for shipping purposes.", + "properties": { + "height": { + "type": "number" + }, + "length": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": [ + "height", + "length", + "weight", + "width" + ], + "title": "package_dimensions_specs", + "type": "object" + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": "boolean" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.\n\nThis may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `\"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.\n It must contain at least one letter.", + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "type": "string" + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 12, + "type": "string" + }, + "url": { + "description": "A URL of a publicly-accessible webpage for this product.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/products/search": { + "get": { + "description": "

Search for products you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetProductsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/product" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/products/{id}": { + "delete": { + "description": "

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

", + "operationId": "DeleteProductsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

", + "operationId": "GetProductsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

", + "operationId": "PostProductsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "images": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "package_dimensions": { + "explode": true, + "style": "deepObject" + }, + "tax_code": { + "explode": true, + "style": "deepObject" + }, + "url": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the product is available for purchase.", + "type": "boolean" + }, + "default_price": { + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.", + "maxLength": 40000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "images": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "properties": { + "height": { + "type": "number" + }, + "length": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": [ + "height", + "length", + "weight", + "width" + ], + "title": "package_dimensions_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": "boolean" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.\n\nThis may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `\"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.\n It must contain at least one letter. May only be set if `type=service`.", + "maxLength": 22, + "type": "string" + }, + "tax_code": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.", + "maxLength": 12, + "type": "string" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A URL of a publicly-accessible webpage for this product." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/product" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/promotion_codes": { + "get": { + "description": "

Returns a list of your promotion codes.

", + "operationId": "GetPromotionCodes", + "parameters": [ + { + "description": "Filter promotion codes by whether they are active.", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Only return promotion codes that have this case-insensitive code.", + "in": "query", + "name": "code", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return promotion codes for this coupon.", + "in": "query", + "name": "coupon", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return promotion codes that are restricted to this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/promotion_code" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/promotion_codes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PromotionCodesResourcePromotionCodeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

", + "operationId": "PostPromotionCodes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the promotion code is currently active.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.", + "maxLength": 500, + "type": "string" + }, + "coupon": { + "description": "The coupon for this promotion code.", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.", + "format": "unix-time", + "type": "integer" + }, + "max_redemptions": { + "description": "A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.", + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "restrictions": { + "description": "Settings that restrict the redemption of the promotion code.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "minimum_amount": { + "type": "integer" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + }, + "first_time_transaction": { + "type": "boolean" + }, + "minimum_amount": { + "type": "integer" + }, + "minimum_amount_currency": { + "type": "string" + } + }, + "title": "restrictions_params", + "type": "object" + } + }, + "required": [ + "coupon" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/promotion_codes/{promotion_code}": { + "get": { + "description": "

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

", + "operationId": "GetPromotionCodesPromotionCode", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "promotion_code", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

", + "operationId": "PostPromotionCodesPromotionCode", + "parameters": [ + { + "in": "path", + "name": "promotion_code", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "restrictions": { + "description": "Settings that restrict the redemption of the promotion code.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "minimum_amount": { + "type": "integer" + } + }, + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "title": "restrictions_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/promotion_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes": { + "get": { + "description": "

Returns a list of your quotes.

", + "operationId": "GetQuotes", + "parameters": [ + { + "description": "The ID of the customer whose quotes will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the quote.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "accepted", + "canceled", + "draft", + "open" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/quote" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/quotes", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceQuoteList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

", + "operationId": "PostQuotes", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "from_quote": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field." + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field." + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "customer": { + "description": "The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set." + }, + "description": { + "description": "A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "maxLength": 500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The discounts applied to the quote. You can only set up to one discount." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "maxLength": 500, + "type": "string" + }, + "from_quote": { + "description": "Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.", + "properties": { + "is_revision": { + "type": "boolean" + }, + "quote": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "quote" + ], + "title": "from_quote_params", + "type": "object" + }, + "header": { + "description": "A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.", + "maxLength": 50, + "type": "string" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "quote_param", + "type": "object" + }, + "line_items": { + "description": "A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "line_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge." + }, + "subscription_data": { + "description": "When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "effective_date": { + "anyOf": [ + { + "enum": [ + "current_period_end" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_data_create_params", + "type": "object" + }, + "test_clock": { + "description": "ID of the test clock to attach to the quote.", + "maxLength": 5000, + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The data with which to automatically create a Transfer for each of the invoices." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}": { + "get": { + "description": "

Retrieves the quote with the given ID.

", + "operationId": "GetQuotesQuote", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A quote models prices and services for a customer.

", + "operationId": "PostQuotesQuote", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "application_fee_amount": { + "explode": true, + "style": "deepObject" + }, + "application_fee_percent": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "discounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "invoice_settings": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "subscription_data": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "application_fee_amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field." + }, + "application_fee_percent": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field." + }, + "automatic_tax": { + "description": "Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_param", + "type": "object" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "customer": { + "description": "The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any line item that does not have `tax_rates` set." + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 500, + "type": "string" + }, + "discounts": { + "anyOf": [ + { + "items": { + "properties": { + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "discount": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "discounts_data_param", + "type": "object" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The discounts applied to the quote. You can only set up to one discount." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 500, + "type": "string" + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 50, + "type": "string" + }, + "invoice_settings": { + "description": "All invoices will be billed using the specified settings.", + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "quote_param", + "type": "object" + }, + "line_items": { + "description": "A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.", + "items": { + "properties": { + "id": { + "maxLength": 5000, + "type": "string" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "line_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge." + }, + "subscription_data": { + "description": "When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.", + "properties": { + "description": { + "maxLength": 500, + "type": "string" + }, + "effective_date": { + "anyOf": [ + { + "enum": [ + "current_period_end" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "trial_period_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_data_update_params", + "type": "object" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount": { + "type": "integer" + }, + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The data with which to automatically create a Transfer for each of the invoices." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/accept": { + "post": { + "description": "

Accepts the specified quote.

", + "operationId": "PostQuotesQuoteAccept", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/cancel": { + "post": { + "description": "

Cancels the quote.

", + "operationId": "PostQuotesQuoteCancel", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/computed_upfront_line_items": { + "get": { + "description": "

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

", + "operationId": "GetQuotesQuoteComputedUpfrontLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/finalize": { + "post": { + "description": "

Finalizes the quote.

", + "operationId": "PostQuotesQuoteFinalize", + "parameters": [ + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "expires_at": { + "description": "A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/quote" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/line_items": { + "get": { + "description": "

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

", + "operationId": "GetQuotesQuoteLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/quotes/{quote}/pdf": { + "get": { + "description": "

Download the PDF for a finalized quote

", + "operationId": "GetQuotesQuotePdf", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "quote", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/pdf": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/early_fraud_warnings": { + "get": { + "description": "

Returns a list of early fraud warnings.

", + "operationId": "GetRadarEarlyFraudWarnings", + "parameters": [ + { + "description": "Only return early fraud warnings for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.early_fraud_warning" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/early_fraud_warnings", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarEarlyFraudWarningList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/early_fraud_warnings/{early_fraud_warning}": { + "get": { + "description": "

Retrieves the details of an early fraud warning that has previously been created.

\n\n

Please refer to the early fraud warning object reference for more details.

", + "operationId": "GetRadarEarlyFraudWarningsEarlyFraudWarning", + "parameters": [ + { + "in": "path", + "name": "early_fraud_warning", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.early_fraud_warning" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_list_items": { + "get": { + "description": "

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetRadarValueListItems", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Return items belonging to the parent list whose value matches the specified value (using an \"is like\" match).", + "in": "query", + "name": "value", + "required": false, + "schema": { + "maxLength": 800, + "type": "string" + }, + "style": "form" + }, + { + "description": "Identifier for the parent value list this item belongs to.", + "in": "query", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/value_list_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new ValueListItem object, which is added to the specified parent value list.

", + "operationId": "PostRadarValueListItems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "value": { + "description": "The value of the item (whose type must match the type of the parent value list).", + "maxLength": 800, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list which the created item will be added to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "value", + "value_list" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_list_items/{item}": { + "delete": { + "description": "

Deletes a ValueListItem object, removing it from its parent value list.

", + "operationId": "DeleteRadarValueListItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a ValueListItem object.

", + "operationId": "GetRadarValueListItemsItem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_lists": { + "get": { + "description": "

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetRadarValueLists", + "parameters": [ + { + "description": "The alias used to reference the value list when writing rules.", + "in": "query", + "name": "alias", + "required": false, + "schema": { + "maxLength": 100, + "type": "string" + }, + "style": "form" + }, + { + "description": "A value contained within a value list - returns all value lists containing this value.", + "in": "query", + "name": "contains", + "required": false, + "schema": { + "maxLength": 800, + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/radar.value_list" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/radar/value_lists", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarListListList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new ValueList object, which can then be referenced in rules.

", + "operationId": "PostRadarValueLists", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "item_type": { + "description": "Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "string" + ], + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The human-readable name of the value list.", + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "alias", + "name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/radar/value_lists/{value_list}": { + "delete": { + "description": "

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

", + "operationId": "DeleteRadarValueListsValueList", + "parameters": [ + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a ValueList object.

", + "operationId": "GetRadarValueListsValueList", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

", + "operationId": "PostRadarValueListsValueList", + "parameters": [ + { + "in": "path", + "name": "value_list", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "name": { + "description": "The human-readable name of the value list.", + "maxLength": 100, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/radar.value_list" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/refunds": { + "get": { + "description": "

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

", + "operationId": "GetRefunds", + "parameters": [ + { + "description": "Only return refunds for the charge specified by this charge ID.", + "in": "query", + "name": "charge", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return refunds for the PaymentIntent specified by this ID.", + "in": "query", + "name": "payment_intent", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/refunds", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "APIMethodRefundList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Create a refund.

", + "operationId": "PostRefunds", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to refund.", + "type": "integer" + }, + "charge": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "Customer whose customer balance to refund from.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "instructions_email": { + "description": "Address to send refund email, use customer email if not specified", + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "origin": { + "description": "Origin of the refund", + "enum": [ + "customer_balance" + ], + "type": "string" + }, + "payment_intent": { + "maxLength": 5000, + "type": "string" + }, + "reason": { + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "type": "boolean" + }, + "reverse_transfer": { + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/refunds/{refund}": { + "get": { + "description": "

Retrieves the details of an existing refund.

", + "operationId": "GetRefundsRefund", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request only accepts metadata as an argument.

", + "operationId": "PostRefundsRefund", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/refunds/{refund}/cancel": { + "post": { + "description": "

Cancels a refund with a status of requires_action.

\n\n

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

", + "operationId": "PostRefundsRefundCancel", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_runs": { + "get": { + "description": "

Returns a list of Report Runs, with the most recent appearing first.

", + "operationId": "GetReportingReportRuns", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/reporting.report_run" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/reporting/report_runs", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FinancialReportingFinanceReportRunList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

", + "operationId": "PostReportingReportRuns", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "parameters": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "parameters": { + "description": "Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.", + "properties": { + "columns": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "interval_end": { + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "format": "unix-time", + "type": "integer" + }, + "payout": { + "type": "string" + }, + "reporting_category": { + "enum": [ + "advance", + "advance_funding", + "anticipation_repayment", + "charge", + "charge_failure", + "connect_collection_transfer", + "connect_reserved_funds", + "contribution", + "dispute", + "dispute_reversal", + "fee", + "financing_paydown", + "financing_paydown_reversal", + "financing_payout", + "financing_payout_reversal", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "network_cost", + "other_adjustment", + "partial_capture_reversal", + "payout", + "payout_reversal", + "platform_earning", + "platform_earning_refund", + "refund", + "refund_failure", + "risk_reserved_funds", + "tax", + "topup", + "topup_reversal", + "transfer", + "transfer_reversal" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "timezone": { + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Ciudad_Juarez", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Factory", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Pacific-New", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "run_parameter_specs", + "type": "object" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `\"balance.summary.1\"`.", + "type": "string" + } + }, + "required": [ + "report_type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_runs/{report_run}": { + "get": { + "description": "

Retrieves the details of an existing Report Run.

", + "operationId": "GetReportingReportRunsReportRun", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report_run", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_types": { + "get": { + "description": "

Returns a full list of Report Types.

", + "operationId": "GetReportingReportTypes", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/reporting.report_type" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "FinancialReportingFinanceReportTypeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reporting/report_types/{report_type}": { + "get": { + "description": "

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

", + "operationId": "GetReportingReportTypesReportType", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "report_type", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/reporting.report_type" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reviews": { + "get": { + "description": "

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

", + "operationId": "GetReviews", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/review" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "RadarReviewList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reviews/{review}": { + "get": { + "description": "

Retrieves a Review object.

", + "operationId": "GetReviewsReview", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "review", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/review" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/reviews/{review}/approve": { + "post": { + "description": "

Approves a Review object, closing it and removing it from the list of reviews.

", + "operationId": "PostReviewsReviewApprove", + "parameters": [ + { + "in": "path", + "name": "review", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/review" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_attempts": { + "get": { + "description": "

Returns a list of SetupAttempts associated with a provided SetupIntent.

", + "operationId": "GetSetupAttempts", + "parameters": [ + { + "description": "A filter on the list, based on the object `created` field. The value\ncan be a string with an integer Unix timestamp, or it can be a\ndictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return SetupAttempts created by the SetupIntent specified by\nthis ID.", + "in": "query", + "name": "setup_intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/setup_attempt" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/setup_attempts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsSetupIntentSetupAttemptList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents": { + "get": { + "description": "

Returns a list of SetupIntents.

", + "operationId": "GetSetupIntents", + "parameters": [ + { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "in": "query", + "name": "attach_to_self", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return SetupIntents for the customer specified by this customer ID.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return SetupIntents associated with the specified payment method.", + "in": "query", + "name": "payment_method", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/setup_intent" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/setup_intents", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "PaymentFlowsSetupIntentList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a SetupIntent object.

\n\n

After the SetupIntent is created, attach a payment method and confirm\nto collect any required permissions to charge the payment method later.

", + "operationId": "PostSetupIntents", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_directions": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + }, + "single_use": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "confirm": { + "description": "Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.", + "type": "boolean" + }, + "customer": { + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": "array" + }, + "mandate_data": { + "description": "This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).", + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "on_behalf_of": { + "description": "The Stripe account ID for which this SetupIntent is created.", + "type": "string" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "blik": { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "link": { + "properties": { + "persistent_token": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to [\"card\"].", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).", + "type": "string" + }, + "single_use": { + "description": "If this hash is populated, this SetupIntent will generate a single_use Mandate on success.", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "setup_intent_single_use_params", + "type": "object" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.", + "enum": [ + "off_session", + "on_session" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}": { + "get": { + "description": "

Retrieves the details of a SetupIntent that has previously been created.

\n\n

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

\n\n

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

", + "operationId": "GetSetupIntentsIntent", + "parameters": [ + { + "description": "The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a SetupIntent object.

", + "operationId": "PostSetupIntentsIntent", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "flow_directions": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "payment_method_types": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "attach_to_self": { + "description": "If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.\n\nIt can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.", + "type": "boolean" + }, + "customer": { + "description": "ID of the Customer this SetupIntent belongs to, if one exists.\n\nIf present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": [ + "inbound", + "outbound" + ], + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "blik": { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "link": { + "properties": { + "persistent_token": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to [\"card\"].", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}/cancel": { + "post": { + "description": "

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

\n\n

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

", + "operationId": "PostSetupIntentsIntentCancel", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cancellation_reason": { + "description": "Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate`", + "enum": [ + "abandoned", + "duplicate", + "requested_by_customer" + ], + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}/confirm": { + "post": { + "description": "

Confirm that your customer intends to set up the current or\nprovided payment method. For example, you would confirm a SetupIntent\nwhen a customer hits the “Save” button on a payment method management\npage on your website.

\n\n

If the selected payment method does not require any additional\nsteps from the customer, the SetupIntent will transition to the\nsucceeded status.

\n\n

Otherwise, it will transition to the requires_action status and\nsuggest additional actions via next_action. If setup fails,\nthe SetupIntent will transition to the\nrequires_payment_method status.

", + "operationId": "PostSetupIntentsIntentConfirm", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "payment_method_options": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "client_secret": { + "description": "The client secret of the SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate_data": { + "anyOf": [ + { + "properties": { + "customer_acceptance": { + "properties": { + "accepted_at": { + "format": "unix-time", + "type": "integer" + }, + "offline": { + "properties": {}, + "title": "offline_param", + "type": "object" + }, + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "ip_address", + "user_agent" + ], + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "secret_key_param", + "type": "object" + }, + { + "properties": { + "customer_acceptance": { + "properties": { + "online": { + "properties": { + "ip_address": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "online_param", + "type": "object" + }, + "type": { + "enum": [ + "online" + ], + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "online", + "type" + ], + "title": "customer_acceptance_param", + "type": "object" + } + }, + "required": [ + "customer_acceptance" + ], + "title": "client_key_param", + "type": "object" + } + ], + "description": "This hash contains details about the Mandate to create" + }, + "payment_method": { + "description": "ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "payment_method_data": { + "description": "When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)\nvalue in the SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "institution_number": { + "maxLength": 5000, + "type": "string" + }, + "transit_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "institution_number", + "transit_number" + ], + "title": "payment_method_param", + "type": "object" + }, + "affirm": { + "properties": {}, + "title": "param", + "type": "object" + }, + "afterpay_clearpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "alipay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "au_becs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "bsb_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "bsb_number" + ], + "title": "param", + "type": "object" + }, + "bacs_debit": { + "properties": { + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "sort_code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "bancontact": { + "properties": {}, + "title": "param", + "type": "object" + }, + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "blik": { + "properties": {}, + "title": "param", + "type": "object" + }, + "boleto": { + "properties": { + "tax_id": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "tax_id" + ], + "title": "param", + "type": "object" + }, + "customer_balance": { + "properties": {}, + "title": "param", + "type": "object" + }, + "eps": { + "properties": { + "bank": { + "enum": [ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "fpx": { + "properties": { + "bank": { + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "bank" + ], + "title": "param", + "type": "object" + }, + "giropay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "grabpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "ideal": { + "properties": { + "bank": { + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "param", + "type": "object" + }, + "interac_present": { + "properties": {}, + "title": "param", + "type": "object" + }, + "klarna": { + "properties": { + "dob": { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth", + "type": "object" + } + }, + "title": "param", + "type": "object" + }, + "konbini": { + "properties": {}, + "title": "param", + "type": "object" + }, + "link": { + "properties": {}, + "title": "param", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "oxxo": { + "properties": {}, + "title": "param", + "type": "object" + }, + "p24": { + "properties": { + "bank": { + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "param", + "type": "object" + }, + "paynow": { + "properties": {}, + "title": "param", + "type": "object" + }, + "pix": { + "properties": {}, + "title": "param", + "type": "object" + }, + "promptpay": { + "properties": {}, + "title": "param", + "type": "object" + }, + "radar_options": { + "properties": { + "session": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "radar_options", + "type": "object" + }, + "sepa_debit": { + "properties": { + "iban": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "iban" + ], + "title": "param", + "type": "object" + }, + "sofort": { + "properties": { + "country": { + "enum": [ + "AT", + "BE", + "DE", + "ES", + "IT", + "NL" + ], + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "param", + "type": "object" + }, + "type": { + "enum": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + }, + "wechat_pay": { + "properties": {}, + "title": "param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data_params", + "type": "object" + }, + "payment_method_options": { + "description": "Payment-method-specific configuration for this SetupIntent.", + "properties": { + "acss_debit": { + "properties": { + "currency": { + "enum": [ + "cad", + "usd" + ], + "type": "string" + }, + "mandate_options": { + "properties": { + "custom_mandate_url": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "default_for": { + "items": { + "enum": [ + "invoice", + "subscription" + ], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "maxLength": 500, + "type": "string" + }, + "payment_schedule": { + "enum": [ + "combined", + "interval", + "sporadic" + ], + "type": "string" + }, + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "blik": { + "properties": { + "code": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "card": { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "interval": { + "enum": [ + "day", + "month", + "sporadic", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + }, + "reference": { + "maxLength": 80, + "type": "string" + }, + "start_date": { + "format": "unix-time", + "type": "integer" + }, + "supported_types": { + "items": { + "enum": [ + "india" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_param", + "type": "object" + }, + "link": { + "properties": { + "persistent_token": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "sepa_debit": { + "properties": { + "mandate_options": { + "properties": {}, + "title": "payment_method_options_mandate_options_param", + "type": "object" + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + }, + "us_bank_account": { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_param", + "type": "object" + }, + "networks": { + "properties": { + "requested": { + "items": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + }, + "type": "array" + } + }, + "title": "networks_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_param", + "type": "object" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + "return_url": { + "description": "The URL to redirect your customer back to after they authenticate on the payment method's app or site.\nIf you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.\nThis parameter is only used for cards and other redirect-based payment methods.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/setup_intents/{intent}/verify_microdeposits": { + "post": { + "description": "

Verifies microdeposits on a SetupIntent object.

", + "operationId": "PostSetupIntentsIntentVerifyMicrodeposits", + "parameters": [ + { + "in": "path", + "name": "intent", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "amounts": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amounts": { + "description": "Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret of the SetupIntent.", + "maxLength": 5000, + "type": "string" + }, + "descriptor_code": { + "description": "A six-character code starting with SM present in the microdeposit sent to the bank account.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/setup_intent" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/shipping_rates": { + "get": { + "description": "

Returns a list of your shipping rates.

", + "operationId": "GetShippingRates", + "parameters": [ + { + "description": "Only return shipping rates that are active or inactive.", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return shipping rates for the given currency.", + "in": "query", + "name": "currency", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/shipping_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/shipping_rates", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ShippingResourcesShippingRateList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new shipping rate object.

", + "operationId": "PostShippingRates", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "delivery_estimate": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "fixed_amount": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "delivery_estimate": { + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "properties": { + "maximum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + }, + "minimum": { + "properties": { + "unit": { + "enum": [ + "business_day", + "day", + "hour", + "month", + "week" + ], + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "required": [ + "unit", + "value" + ], + "title": "delivery_estimate_bound", + "type": "object" + } + }, + "title": "delivery_estimate", + "type": "object" + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 100, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fixed_amount": { + "description": "Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "currency_option", + "type": "object" + }, + "type": "object" + } + }, + "required": [ + "amount", + "currency" + ], + "title": "fixed_amount", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "type": "string" + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": [ + "fixed_amount" + ], + "type": "string" + } + }, + "required": [ + "display_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/shipping_rates/{shipping_rate_token}": { + "get": { + "description": "

Returns the shipping rate object with the given ID.

", + "operationId": "GetShippingRatesShippingRateToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "shipping_rate_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing shipping rate object.

", + "operationId": "PostShippingRatesShippingRateToken", + "parameters": [ + { + "in": "path", + "name": "shipping_rate_token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "fixed_amount": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Whether the shipping rate can be used for new purchases. Defaults to `true`.", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "fixed_amount": { + "description": "Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.", + "properties": { + "currency_options": { + "additionalProperties": { + "properties": { + "amount": { + "type": "integer" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "title": "currency_option_update", + "type": "object" + }, + "type": "object" + } + }, + "title": "fixed_amount_update", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shipping_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sigma/scheduled_query_runs": { + "get": { + "description": "

Returns a list of scheduled query runs.

", + "operationId": "GetSigmaScheduledQueryRuns", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/scheduled_query_run" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/sigma/scheduled_query_runs", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SigmaScheduledQueryRunList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sigma/scheduled_query_runs/{scheduled_query_run}": { + "get": { + "description": "

Retrieves the details of an scheduled query run.

", + "operationId": "GetSigmaScheduledQueryRunsScheduledQueryRun", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "scheduled_query_run", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scheduled_query_run" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources": { + "post": { + "description": "

Creates a new source object.

", + "operationId": "PostSources", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + }, + "receiver": { + "explode": true, + "style": "deepObject" + }, + "redirect": { + "explode": true, + "style": "deepObject" + }, + "source_order": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.", + "type": "string" + }, + "customer": { + "description": "The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "flow": { + "description": "The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.", + "enum": [ + "code_verification", + "none", + "receiver", + "redirect" + ], + "maxLength": 5000, + "type": "string" + }, + "mandate": { + "description": "Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.", + "properties": { + "acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "offline": { + "properties": { + "contact_email": { + "type": "string" + } + }, + "required": [ + "contact_email" + ], + "title": "mandate_offline_acceptance_params", + "type": "object" + }, + "online": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_online_acceptance_params", + "type": "object" + }, + "status": { + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "mandate_acceptance_params", + "type": "object" + }, + "amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "currency": { + "type": "string" + }, + "interval": { + "enum": [ + "one_time", + "scheduled", + "variable" + ], + "maxLength": 5000, + "type": "string" + }, + "notification_method": { + "enum": [ + "deprecated_none", + "email", + "manual", + "none", + "stripe_email" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_params", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "original_source": { + "description": "The source to share.", + "maxLength": 5000, + "type": "string" + }, + "owner": { + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + }, + "receiver": { + "description": "Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).", + "properties": { + "refund_attributes_method": { + "enum": [ + "email", + "manual", + "none" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "receiver_params", + "type": "object" + }, + "redirect": { + "description": "Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).", + "properties": { + "return_url": { + "type": "string" + } + }, + "required": [ + "return_url" + ], + "title": "redirect_params", + "type": "object" + }, + "source_order": { + "description": "Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.", + "properties": { + "items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "parent": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "enum": [ + "discount", + "shipping", + "sku", + "tax" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "order_item_specs", + "type": "object" + }, + "type": "array" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "line1" + ], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address" + ], + "title": "order_shipping", + "type": "object" + } + }, + "title": "shallow_order_specs", + "type": "object" + }, + "statement_descriptor": { + "description": "An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.", + "maxLength": 5000, + "type": "string" + }, + "token": { + "description": "An optional token used to create the source. When passed, token properties will override source parameters.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "enum": [ + "reusable", + "single_use" + ], + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}": { + "get": { + "description": "

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

", + "operationId": "GetSourcesSource", + "parameters": [ + { + "description": "The client secret of the source. Required if a publishable key is used to retrieve the source.", + "in": "query", + "name": "client_secret", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

", + "operationId": "PostSourcesSource", + "parameters": [ + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "mandate": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "owner": { + "explode": true, + "style": "deepObject" + }, + "source_order": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount associated with the source.", + "type": "integer" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "mandate": { + "description": "Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.", + "properties": { + "acceptance": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "offline": { + "properties": { + "contact_email": { + "type": "string" + } + }, + "required": [ + "contact_email" + ], + "title": "mandate_offline_acceptance_params", + "type": "object" + }, + "online": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_online_acceptance_params", + "type": "object" + }, + "status": { + "enum": [ + "accepted", + "pending", + "refused", + "revoked" + ], + "maxLength": 5000, + "type": "string" + }, + "type": { + "enum": [ + "offline", + "online" + ], + "maxLength": 5000, + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "mandate_acceptance_params", + "type": "object" + }, + "amount": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "currency": { + "type": "string" + }, + "interval": { + "enum": [ + "one_time", + "scheduled", + "variable" + ], + "maxLength": 5000, + "type": "string" + }, + "notification_method": { + "enum": [ + "deprecated_none", + "email", + "manual", + "none", + "stripe_email" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "mandate_params", + "type": "object" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "owner": { + "description": "Information about the owner of the payment instrument that may be used or required by particular source types.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "source_address", + "type": "object" + }, + "email": { + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "owner", + "type": "object" + }, + "source_order": { + "description": "Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.", + "properties": { + "items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "parent": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "enum": [ + "discount", + "shipping", + "sku", + "tax" + ], + "maxLength": 5000, + "type": "string" + } + }, + "title": "order_item_specs", + "type": "object" + }, + "type": "array" + }, + "shipping": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "line1" + ], + "title": "address", + "type": "object" + }, + "carrier": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "tracking_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "address" + ], + "title": "order_shipping", + "type": "object" + } + }, + "title": "order_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/mandate_notifications/{mandate_notification}": { + "get": { + "description": "

Retrieves a new Source MandateNotification.

", + "operationId": "GetSourcesSourceMandateNotificationsMandateNotification", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "mandate_notification", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source_mandate_notification" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/source_transactions": { + "get": { + "description": "

List source transactions for a given source.

", + "operationId": "GetSourcesSourceSourceTransactions", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/source_transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ApmsSourcesSourceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/source_transactions/{source_transaction}": { + "get": { + "description": "

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

", + "operationId": "GetSourcesSourceSourceTransactionsSourceTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "source_transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/sources/{source}/verify": { + "post": { + "description": "

Verify a given source.

", + "operationId": "PostSourcesSourceVerify", + "parameters": [ + { + "in": "path", + "name": "source", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "values": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "values": { + "description": "The values needed to verify the source.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/source" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items": { + "get": { + "description": "

Returns a list of your subscription items for a given subscription.

", + "operationId": "GetSubscriptionItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The ID of the subscription whose items will be retrieved.", + "in": "query", + "name": "subscription", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscription_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionsItemsSubscriptionItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Adds a new item to an existing subscription. No existing items will be changed or replaced.

", + "operationId": "PostSubscriptionItems", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "price": { + "description": "The ID of the price object.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + }, + "quantity": { + "description": "The quantity you'd like to apply to the subscription item you're creating.", + "type": "integer" + }, + "subscription": { + "description": "The identifier of the subscription to modify.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates." + } + }, + "required": [ + "subscription" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items/{item}": { + "delete": { + "description": "

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

", + "operationId": "DeleteSubscriptionItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": { + "clear_usage": { + "description": "Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.", + "type": "boolean" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the subscription item with the given ID.

", + "operationId": "GetSubscriptionItemsItem", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the plan or quantity of an item on a current subscription.

", + "operationId": "PostSubscriptionItemsItem", + "parameters": [ + { + "in": "path", + "name": "item", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "price_data": { + "explode": true, + "style": "deepObject" + }, + "tax_rates": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "price": { + "description": "The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.", + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + }, + "quantity": { + "description": "The quantity you'd like to apply to the subscription item you're creating.", + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_item" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items/{subscription_item}/usage_record_summaries": { + "get": { + "description": "

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

\n\n

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

", + "operationId": "GetSubscriptionItemsSubscriptionItemUsageRecordSummaries", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "in": "path", + "name": "subscription_item", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/usage_record_summary" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "UsageEventsResourceUsageRecordSummaryList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_items/{subscription_item}/usage_records": { + "post": { + "description": "

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

\n\n

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

\n\n

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

\n\n

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

", + "operationId": "PostSubscriptionItemsSubscriptionItemUsageRecords", + "parameters": [ + { + "in": "path", + "name": "subscription_item", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "timestamp": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "action": { + "description": "Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value.", + "enum": [ + "increment", + "set" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "quantity": { + "description": "The usage quantity for the specified timestamp.", + "type": "integer" + }, + "timestamp": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "type": "integer" + } + ], + "description": "The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `\"now\"`, Stripe records usage for the current time. Default is `\"now\"` if a value is not provided." + } + }, + "required": [ + "quantity" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/usage_record" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules": { + "get": { + "description": "

Retrieves the list of your subscription schedules.

", + "operationId": "GetSubscriptionSchedules", + "parameters": [ + { + "description": "Only return subscription schedules that were created canceled the given date interval.", + "explode": true, + "in": "query", + "name": "canceled_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that completed during the given date interval.", + "explode": true, + "in": "query", + "name": "completed_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that were created during the given date interval.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules for the given customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return subscription schedules that were released during the given date interval.", + "explode": true, + "in": "query", + "name": "released_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return subscription schedules that have not started yet.", + "in": "query", + "name": "scheduled", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription_schedule" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscription_schedules", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionSchedulesResourceScheduleList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

", + "operationId": "PostSubscriptionSchedules", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_settings": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "phases": { + "explode": true, + "style": "deepObject" + }, + "start_date": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer": { + "description": "The identifier of the customer to create the subscription schedule for.", + "maxLength": 5000, + "type": "string" + }, + "default_settings": { + "description": "Object representing the subscription schedule's default settings.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "default_settings_params", + "type": "object" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "from_subscription": { + "description": "Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "phases": { + "description": "List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.", + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "end_date": { + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "items" + ], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "start_date": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ], + "description": "When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules/{schedule}": { + "get": { + "description": "

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

", + "operationId": "GetSubscriptionSchedulesSchedule", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing subscription schedule.

", + "operationId": "PostSubscriptionSchedulesSchedule", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "default_settings": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "phases": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "default_settings": { + "description": "Object representing the subscription schedule's default settings.", + "properties": { + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "default_settings_params", + "type": "object" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": [ + "cancel", + "none", + "release", + "renew" + ], + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "phases": { + "description": "List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.", + "items": { + "properties": { + "add_invoice_items": { + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "type": "number" + }, + "automatic_tax": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "enum": [ + "automatic", + "phase_start" + ], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "collection_method": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "maxLength": 5000, + "type": "string" + }, + "default_payment_method": { + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "description": { + "maxLength": 500, + "type": "string" + }, + "end_date": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ] + }, + "invoice_settings": { + "properties": { + "days_until_due": { + "type": "integer" + } + }, + "title": "subscription_schedules_param", + "type": "object" + }, + "items": { + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "configuration_item_params", + "type": "object" + }, + "type": "array" + }, + "iterations": { + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "on_behalf_of": { + "type": "string" + }, + "proration_behavior": { + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "start_date": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ] + }, + "transfer_data": { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial": { + "type": "boolean" + }, + "trial_end": { + "anyOf": [ + { + "type": "integer" + }, + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + } + ] + } + }, + "required": [ + "items" + ], + "title": "phase_configuration_params", + "type": "object" + }, + "type": "array" + }, + "proration_behavior": { + "description": "If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules/{schedule}/cancel": { + "post": { + "description": "

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

", + "operationId": "PostSubscriptionSchedulesScheduleCancel", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.", + "type": "boolean" + }, + "prorate": { + "description": "If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscription_schedules/{schedule}/release": { + "post": { + "description": "

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

", + "operationId": "PostSubscriptionSchedulesScheduleRelease", + "parameters": [ + { + "in": "path", + "name": "schedule", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preserve_cancel_date": { + "description": "Keep any cancellation on the subscription that the schedule has set", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription_schedule" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions": { + "get": { + "description": "

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

", + "operationId": "GetSubscriptions", + "parameters": [ + { + "description": "The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.", + "in": "query", + "name": "collection_method", + "required": false, + "schema": { + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "current_period_end", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "current_period_start", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "The ID of the customer whose subscriptions will be retrieved.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Filter for subscriptions that contain this recurring price ID.", + "in": "query", + "name": "price", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "all", + "canceled", + "ended", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.", + "in": "query", + "name": "test_clock", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/subscriptions", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SubscriptionsSubscriptionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

\n\n

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.\nThe payment_behavior parameter determines the exact behavior of the initial payment.

\n\n

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead.\nSchedules provide the flexibility to model more complex billing configurations that change over time.

", + "operationId": "PostSubscriptions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "backdate_start_date": { + "description": "For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.", + "format": "unix-time", + "type": "integer" + }, + "billing_cycle_anchor": { + "description": "A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "type": "integer", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.", + "format": "unix-time", + "type": "integer" + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "The identifier of the customer to subscribe.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription." + }, + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_create_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge, for each of the subscription's invoices." + }, + "payment_behavior": { + "description": "Only applies to subscriptions with `collection_method=charge_automatically`.\n\nUse `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state.\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.\n\n`pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.\n\nSubscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "transfer_data": { + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.", + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "integer" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "required": [ + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/search": { + "get": { + "description": "

Search for subscriptions you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.

", + "operationId": "GetSubscriptionsSearch", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).", + "in": "query", + "name": "query", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/subscription" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "next_page": { + "maxLength": 5000, + "type": [ + "string", + "null" + ] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "search_result" + ], + "type": "string" + }, + "total_count": { + "description": "The total number of objects that match the query, only accurate up to 10,000.", + "type": "integer" + }, + "url": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "SearchResult", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/{subscription_exposed_id}": { + "delete": { + "description": "

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

\n\n

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

\n\n

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

", + "operationId": "DeleteSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "invoice_now": { + "description": "Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.", + "type": "boolean" + }, + "prorate": { + "description": "Will generate a proration invoice item that credits remaining unused time until the subscription period end.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the subscription with the given ID.

", + "operationId": "GetSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

", + "operationId": "PostSubscriptionsSubscriptionExposedId", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "add_invoice_items": { + "explode": true, + "style": "deepObject" + }, + "automatic_tax": { + "explode": true, + "style": "deepObject" + }, + "billing_thresholds": { + "explode": true, + "style": "deepObject" + }, + "cancel_at": { + "explode": true, + "style": "deepObject" + }, + "default_tax_rates": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "on_behalf_of": { + "explode": true, + "style": "deepObject" + }, + "pause_collection": { + "explode": true, + "style": "deepObject" + }, + "payment_settings": { + "explode": true, + "style": "deepObject" + }, + "pending_invoice_item_interval": { + "explode": true, + "style": "deepObject" + }, + "transfer_data": { + "explode": true, + "style": "deepObject" + }, + "trial_end": { + "explode": true, + "style": "deepObject" + }, + "trial_settings": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.", + "items": { + "properties": { + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product" + ], + "title": "one_time_price_data_with_negative_amounts", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "add_invoice_item_entry", + "type": "object" + }, + "type": "array" + }, + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).", + "type": "number" + }, + "automatic_tax": { + "description": "Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "automatic_tax_config", + "type": "object" + }, + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "amount_gte": { + "type": "integer" + }, + "reset_billing_cycle_anchor": { + "type": "boolean" + } + }, + "title": "billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds." + }, + "cancel_at": { + "anyOf": [ + { + "format": "unix-time", + "type": "integer" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." + }, + "cancel_at_period_end": { + "description": "Boolean indicating whether this subscription should cancel at the end of the current period.", + "type": "boolean" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": [ + "charge_automatically", + "send_invoice" + ], + "type": "string" + }, + "coupon": { + "description": "The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.", + "type": "integer" + }, + "default_payment_method": { + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_source": { + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "maxLength": 5000, + "type": "string" + }, + "default_tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates." + }, + "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.", + "maxLength": 500, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "items": { + "description": "A list of up to 20 subscription items, each with an attached price.", + "items": { + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "properties": { + "usage_gte": { + "type": "integer" + } + }, + "required": [ + "usage_gte" + ], + "title": "item_billing_thresholds_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "clear_usage": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "price": { + "maxLength": 5000, + "type": "string" + }, + "price_data": { + "properties": { + "currency": { + "type": "string" + }, + "product": { + "maxLength": 5000, + "type": "string" + }, + "recurring": { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "recurring_adhoc", + "type": "object" + }, + "tax_behavior": { + "enum": [ + "exclusive", + "inclusive", + "unspecified" + ], + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "format": "decimal", + "type": "string" + } + }, + "required": [ + "currency", + "product", + "recurring" + ], + "title": "recurring_price_data", + "type": "object" + }, + "quantity": { + "type": "integer" + }, + "tax_rates": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "subscription_item_update_params", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "off_session": { + "description": "Indicates if a customer is on or off-session while an invoice payment is attempted.", + "type": "boolean" + }, + "on_behalf_of": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "The account on behalf of which to charge, for each of the subscription's invoices." + }, + "pause_collection": { + "anyOf": [ + { + "properties": { + "behavior": { + "enum": [ + "keep_as_draft", + "mark_uncollectible", + "void" + ], + "type": "string" + }, + "resumes_at": { + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "behavior" + ], + "title": "pause_collection_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_behavior": { + "description": "Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.\n\nUse `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.\n\nUse `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).\n\nUse `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.", + "enum": [ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete" + ], + "type": "string" + }, + "payment_settings": { + "description": "Payment settings to pass to invoices created by the subscription.", + "properties": { + "payment_method_options": { + "properties": { + "acss_debit": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "transaction_type": { + "enum": [ + "business", + "personal" + ], + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "properties": { + "preferred_language": { + "enum": [ + "de", + "en", + "fr", + "nl" + ], + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "card": { + "anyOf": [ + { + "properties": { + "mandate_options": { + "properties": { + "amount": { + "type": "integer" + }, + "amount_type": { + "enum": [ + "fixed", + "maximum" + ], + "type": "string" + }, + "description": { + "maxLength": 200, + "type": "string" + } + }, + "title": "mandate_options_param", + "type": "object" + }, + "network": { + "enum": [ + "amex", + "cartes_bancaires", + "diners", + "discover", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "request_three_d_secure": { + "enum": [ + "any", + "automatic" + ], + "type": "string" + } + }, + "title": "subscription_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "properties": { + "bank_transfer": { + "properties": { + "eu_bank_transfer": { + "properties": { + "country": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "eu_bank_transfer_param", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "title": "bank_transfer_param", + "type": "object" + }, + "funding_type": { + "type": "string" + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "konbini": { + "anyOf": [ + { + "properties": {}, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "properties": { + "financial_connections": { + "properties": { + "permissions": { + "items": { + "enum": [ + "balances", + "ownership", + "payment_method", + "transactions" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_linked_account_options_param", + "type": "object" + }, + "verification_method": { + "enum": [ + "automatic", + "instant", + "microdeposits" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "payment_method_types": { + "anyOf": [ + { + "items": { + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "save_default_payment_method": { + "enum": [ + "off", + "on_subscription" + ], + "type": "string" + } + }, + "title": "payment_settings", + "type": "object" + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "properties": { + "interval": { + "enum": [ + "day", + "month", + "week", + "year" + ], + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "required": [ + "interval" + ], + "title": "pending_invoice_item_interval_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "promotion_code": { + "description": "The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.", + "maxLength": 5000, + "type": "string" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "properties": { + "amount_percent": { + "type": "number" + }, + "destination": { + "type": "string" + } + }, + "required": [ + "destination" + ], + "title": "transfer_data_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value." + }, + "trial_end": { + "anyOf": [ + { + "enum": [ + "now" + ], + "maxLength": 5000, + "type": "string" + }, + { + "format": "unix-time", + "type": "integer" + } + ], + "description": "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`." + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": "boolean" + }, + "trial_settings": { + "description": "Settings related to subscription trials.", + "properties": { + "end_behavior": { + "properties": { + "missing_payment_method": { + "enum": [ + "cancel", + "create_invoice", + "pause" + ], + "type": "string" + } + }, + "required": [ + "missing_payment_method" + ], + "title": "end_behavior", + "type": "object" + } + }, + "required": [ + "end_behavior" + ], + "title": "trial_settings_config", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/{subscription_exposed_id}/discount": { + "delete": { + "description": "

Removes the currently applied discount on a subscription.

", + "operationId": "DeleteSubscriptionsSubscriptionExposedIdDiscount", + "parameters": [ + { + "in": "path", + "name": "subscription_exposed_id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_discount" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/subscriptions/{subscription}/resume": { + "post": { + "description": "

Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.

", + "operationId": "PostSubscriptionsSubscriptionResume", + "parameters": [ + { + "in": "path", + "name": "subscription", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "billing_cycle_anchor": { + "description": "Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": [ + "now", + "unchanged" + ], + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "proration_behavior": { + "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.", + "enum": [ + "always_invoice", + "create_prorations", + "none" + ], + "type": "string" + }, + "proration_date": { + "description": "If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.", + "format": "unix-time", + "type": "integer" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscription" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_codes": { + "get": { + "description": "

A list of all tax codes available to add to Products in order to allow specific tax calculations.

", + "operationId": "GetTaxCodes", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax_code" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxProductResourceTaxCodeList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_codes/{id}": { + "get": { + "description": "

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

", + "operationId": "GetTaxCodesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_code" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_rates": { + "get": { + "description": "

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

", + "operationId": "GetTaxRates", + "parameters": [ + { + "description": "Optional flag to filter by tax rates that are either active or inactive (archived).", + "in": "query", + "name": "active", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Optional range for filtering created date.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).", + "in": "query", + "name": "inclusive", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/tax_rate" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax_rates", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxRatesList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new tax rate.

", + "operationId": "PostTaxRates", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rate, which will be shown to users.", + "maxLength": 50, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "inclusive": { + "description": "This specifies if the tax rate is inclusive or exclusive.", + "type": "boolean" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 50, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 2, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "type": "string" + } + }, + "required": [ + "display_name", + "inclusive", + "percentage" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax_rates/{tax_rate}": { + "get": { + "description": "

Retrieves a tax rate with the given ID

", + "operationId": "GetTaxRatesTaxRate", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "tax_rate", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates an existing tax rate.

", + "operationId": "PostTaxRatesTaxRate", + "parameters": [ + { + "in": "path", + "name": "tax_rate", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "active": { + "description": "Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.", + "type": "boolean" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the tax rate, which will be shown to users.", + "maxLength": 50, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "jurisdiction": { + "description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.", + "maxLength": 50, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 2, + "type": "string" + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax_rate" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/configurations": { + "get": { + "description": "

Returns a list of Configuration objects.

", + "operationId": "GetTerminalConfigurations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "if present, only return the account default or non-default configurations.", + "in": "query", + "name": "is_account_default", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/terminal.configuration" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/terminal/configurations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TerminalConfigurationConfigurationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new Configuration object.

", + "operationId": "PostTerminalConfigurations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bbpos_wisepos_e": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "tipping": { + "explode": true, + "style": "deepObject" + }, + "verifone_p400": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bbpos_wisepos_e": { + "description": "An object containing device type specific settings for BBPOS WisePOS E readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "bbpos_wise_pose", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "tipping": { + "anyOf": [ + { + "properties": { + "aud": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "cad": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "chf": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "czk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "dkk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "eur": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "gbp": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "hkd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "myr": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nok": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nzd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sek": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sgd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "usd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + } + }, + "title": "tipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Tipping configurations for readers supporting on-reader tips" + }, + "verifone_p400": { + "description": "An object containing device type specific settings for Verifone P400 readers", + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "verifone_p400", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/configurations/{configuration}": { + "delete": { + "description": "

Deletes a Configuration object.

", + "operationId": "DeleteTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Configuration object.

", + "operationId": "GetTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.configuration" + }, + { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a new Configuration object.

", + "operationId": "PostTerminalConfigurationsConfiguration", + "parameters": [ + { + "in": "path", + "name": "configuration", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "bbpos_wisepos_e": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "tipping": { + "explode": true, + "style": "deepObject" + }, + "verifone_p400": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "bbpos_wisepos_e": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "bbpos_wise_pose", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "An object containing device type specific settings for BBPOS WisePOS E readers" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "tipping": { + "anyOf": [ + { + "properties": { + "aud": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "cad": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "chf": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "czk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "dkk": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "eur": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "gbp": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "hkd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "myr": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nok": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "nzd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sek": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "sgd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + }, + "usd": { + "properties": { + "fixed_amounts": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "percentages": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "smart_tip_threshold": { + "type": "integer" + } + }, + "title": "currency_specific_config", + "type": "object" + } + }, + "title": "tipping", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Tipping configurations for readers supporting on-reader tips" + }, + "verifone_p400": { + "anyOf": [ + { + "properties": { + "splashscreen": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "verifone_p400", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "An object containing device type specific settings for Verifone P400 readers" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.configuration" + }, + { + "$ref": "#/components/schemas/deleted_terminal.configuration" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/connection_tokens": { + "post": { + "description": "

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

", + "operationId": "PostTerminalConnectionTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "location": { + "description": "The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).", + "maxLength": 5000, + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.connection_token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/locations": { + "get": { + "description": "

Returns a list of Location objects.

", + "operationId": "GetTerminalLocations", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/terminal.location" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/terminal/locations", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TerminalLocationLocationList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new Location object.\nFor further details, including which address fields are required in each country, see the Manage locations guide.

", + "operationId": "PostTerminalLocations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The full address of the location.", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "create_location_address_param", + "type": "object" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 1000, + "type": "string" + }, + "display_name": { + "description": "A name for the location.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "required": [ + "address", + "display_name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.location" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/locations/{location}": { + "delete": { + "description": "

Deletes a Location object.

", + "operationId": "DeleteTerminalLocationsLocation", + "parameters": [ + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.location" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Location object.

", + "operationId": "GetTerminalLocationsLocation", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "$ref": "#/components/schemas/deleted_terminal.location" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostTerminalLocationsLocation", + "parameters": [ + { + "in": "path", + "name": "location", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "address": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "address": { + "description": "The full address of the location.", + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "optional_fields_address", + "type": "object" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 1000, + "type": "string" + }, + "display_name": { + "description": "A name for the location.", + "maxLength": 1000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.location" + }, + { + "$ref": "#/components/schemas/deleted_terminal.location" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers": { + "get": { + "description": "

Returns a list of Reader objects.

", + "operationId": "GetTerminalReaders", + "parameters": [ + { + "description": "Filters readers by device type", + "in": "query", + "name": "device_type", + "required": false, + "schema": { + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "simulated_wisepos_e", + "stripe_m2", + "verifone_P400" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A location ID to filter the response list to only readers at the specific location", + "in": "query", + "name": "location", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A status filter to filter readers to only offline or online readers", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "offline", + "online" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "A list of readers", + "items": { + "$ref": "#/components/schemas/terminal.reader" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TerminalReaderRetrieveReader", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new Reader object.

", + "operationId": "PostTerminalReaders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.", + "maxLength": 5000, + "type": "string" + }, + "location": { + "description": "The location to assign the reader to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "registration_code": { + "description": "A code generated by the reader used for registering to an account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "registration_code" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}": { + "delete": { + "description": "

Deletes a Reader object.

", + "operationId": "DeleteTerminalReadersReader", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a Reader object.

", + "operationId": "GetTerminalReadersReader", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.reader" + }, + { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

", + "operationId": "PostTerminalReadersReader", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "The new label of the reader.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/terminal.reader" + }, + { + "$ref": "#/components/schemas/deleted_terminal.reader" + } + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/cancel_action": { + "post": { + "description": "

Cancels the current reader action.

", + "operationId": "PostTerminalReadersReaderCancelAction", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/process_payment_intent": { + "post": { + "description": "

Initiates a payment flow on a Reader.

", + "operationId": "PostTerminalReadersReaderProcessPaymentIntent", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "process_config": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_intent": { + "description": "PaymentIntent ID", + "maxLength": 5000, + "type": "string" + }, + "process_config": { + "description": "Configuration overrides", + "properties": { + "skip_tipping": { + "type": "boolean" + }, + "tipping": { + "properties": { + "amount_eligible": { + "type": "integer" + } + }, + "title": "tipping_config", + "type": "object" + } + }, + "title": "process_config", + "type": "object" + } + }, + "required": [ + "payment_intent" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/process_setup_intent": { + "post": { + "description": "

Initiates a setup intent flow on a Reader.

", + "operationId": "PostTerminalReadersReaderProcessSetupIntent", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "customer_consent_collected": { + "description": "Customer Consent Collected", + "type": "boolean" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "setup_intent": { + "description": "SetupIntent ID", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "customer_consent_collected", + "setup_intent" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/refund_payment": { + "post": { + "description": "

Initiates a refund on a Reader

", + "operationId": "PostTerminalReadersReaderRefundPayment", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in __cents__ representing how much of this charge to refund.", + "type": "integer" + }, + "charge": { + "description": "ID of the Charge to refund.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "payment_intent": { + "description": "ID of the PaymentIntent to refund.", + "maxLength": 5000, + "type": "string" + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/terminal/readers/{reader}/set_reader_display": { + "post": { + "description": "

Sets reader display to show cart details.

", + "operationId": "PostTerminalReadersReaderSetReaderDisplay", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "cart": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "cart": { + "description": "Cart", + "properties": { + "currency": { + "type": "string" + }, + "line_items": { + "items": { + "properties": { + "amount": { + "type": "integer" + }, + "description": { + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "type": "integer" + } + }, + "required": [ + "amount", + "description", + "quantity" + ], + "title": "line_item", + "type": "object" + }, + "type": "array" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "required": [ + "currency", + "line_items", + "total" + ], + "title": "cart", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type", + "enum": [ + "cart" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/customers/{customer}/fund_cash_balance": { + "post": { + "description": "

Create an incoming testmode bank transfer

", + "operationId": "PostTestHelpersCustomersCustomerFundCashBalance", + "parameters": [ + { + "in": "path", + "name": "customer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "reference": { + "description": "A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/deliver": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to delivered.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingDeliver", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/fail": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to failure.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingFail", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/return": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to returned.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingReturn", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/issuing/cards/{card}/shipping/ship": { + "post": { + "description": "

Updates the shipping status of the specified Issuing Card object to shipped.

", + "operationId": "PostTestHelpersIssuingCardsCardShippingShip", + "parameters": [ + { + "in": "path", + "name": "card", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issuing.card" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/refunds/{refund}/expire": { + "post": { + "description": "

Expire a refund with a status of requires_action.

", + "operationId": "PostTestHelpersRefundsRefundExpire", + "parameters": [ + { + "in": "path", + "name": "refund", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/refund" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/terminal/readers/{reader}/present_payment_method": { + "post": { + "description": "

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

", + "operationId": "PostTestHelpersTerminalReadersReaderPresentPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "reader", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_present": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "interac_present": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_present": { + "description": "Simulated data for the card_present payment method.", + "properties": { + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "card_present", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "interac_present": { + "description": "Simulated data for the interac_present payment method.", + "properties": { + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "interac_present", + "type": "object" + }, + "type": { + "description": "Simulated payment type.", + "enum": [ + "card_present", + "interac_present" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/terminal.reader" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/test_clocks": { + "get": { + "description": "

Returns a list of your test clocks.

", + "operationId": "GetTestHelpersTestClocks", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/test_helpers.test_clock" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/test_helpers/test_clocks", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "BillingClocksResourceBillingClockList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new test clock that can be attached to new customers and quotes.

", + "operationId": "PostTestHelpersTestClocks", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "frozen_time": { + "description": "The initial frozen time for this test clock.", + "format": "unix-time", + "type": "integer" + }, + "name": { + "description": "The name for this test clock.", + "maxLength": 300, + "type": "string" + } + }, + "required": [ + "frozen_time" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/test_clocks/{test_clock}": { + "delete": { + "description": "

Deletes a test clock.

", + "operationId": "DeleteTestHelpersTestClocksTestClock", + "parameters": [ + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves a test clock.

", + "operationId": "GetTestHelpersTestClocksTestClock", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/test_clocks/{test_clock}/advance": { + "post": { + "description": "

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

", + "operationId": "PostTestHelpersTestClocksTestClockAdvance", + "parameters": [ + { + "in": "path", + "name": "test_clock", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "frozen_time": { + "description": "The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "frozen_time" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/test_helpers.test_clock" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/fail": { + "post": { + "description": "

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdFail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "failure_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "failure_details": { + "description": "Details about a failed InboundTransfer.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "failure_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/return": { + "post": { + "description": "

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdReturn", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed": { + "post": { + "description": "

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryInboundTransfersIdSucceed", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/fail": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdFail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/post": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdPost", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_payments/{id}/return": { + "post": { + "description": "

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundPaymentsIdReturn", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "returned_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "returned_details": { + "description": "Optional hash to set the the return code.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "returned_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return": { + "post": { + "description": "

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

", + "operationId": "PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "returned_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "returned_details": { + "description": "Details about a returned OutboundTransfer.", + "properties": { + "code": { + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "title": "returned_details_params", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/received_credits": { + "post": { + "description": "

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

", + "operationId": "PostTestHelpersTreasuryReceivedCredits", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "initiating_payment_method_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to send funds to.", + "type": "string" + }, + "initiating_payment_method_details": { + "description": "Initiating payment method details for the object.", + "properties": { + "type": { + "enum": [ + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_bank_account_source_params", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "source_params", + "type": "object" + }, + "network": { + "description": "The rails used for the object.", + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "network" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_credit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/test_helpers/treasury/received_debits": { + "post": { + "description": "

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

", + "operationId": "PostTestHelpersTreasuryReceivedDebits", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "initiating_payment_method_details": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "initiating_payment_method_details": { + "description": "Initiating payment method details for the object.", + "properties": { + "type": { + "enum": [ + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "us_bank_account_source_params", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "source_params", + "type": "object" + }, + "network": { + "description": "The rails used for the object.", + "enum": [ + "ach" + ], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "network" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_debit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tokens": { + "post": { + "description": "

Creates a single-use token that represents a bank account’s details.\nThis token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

", + "operationId": "PostTokens", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "account": { + "explode": true, + "style": "deepObject" + }, + "bank_account": { + "explode": true, + "style": "deepObject" + }, + "card": { + "explode": true, + "style": "deepObject" + }, + "cvc_update": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "person": { + "explode": true, + "style": "deepObject" + }, + "pii": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "Information for the account this token will represent.", + "properties": { + "business_type": { + "enum": [ + "company", + "government_entity", + "individual", + "non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "company": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "directors_provided": { + "type": "boolean" + }, + "executives_provided": { + "type": "boolean" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "name_kana": { + "maxLength": 100, + "type": "string" + }, + "name_kanji": { + "maxLength": 100, + "type": "string" + }, + "owners_provided": { + "type": "boolean" + }, + "ownership_declaration": { + "properties": { + "date": { + "format": "unix-time", + "type": "integer" + }, + "ip": { + "type": "string" + }, + "user_agent": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "company_ownership_declaration", + "type": "object" + }, + "ownership_declaration_shown_and_signed": { + "type": "boolean" + }, + "phone": { + "maxLength": 5000, + "type": "string" + }, + "registration_number": { + "maxLength": 5000, + "type": "string" + }, + "structure": { + "enum": [ + "", + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "tax_id": { + "maxLength": 5000, + "type": "string" + }, + "tax_id_registrar": { + "maxLength": 5000, + "type": "string" + }, + "vat_id": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "verification_document_specs", + "type": "object" + } + }, + "title": "verification_specs", + "type": "object" + } + }, + "title": "connect_js_account_token_company_specs", + "type": "object" + }, + "individual": { + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 100, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 300, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 100, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "enum": [ + "existing", + "none" + ], + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "ssn_last_4": { + "maxLength": 5000, + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "individual_specs", + "type": "object" + }, + "tos_shown_and_accepted": { + "type": "boolean" + } + }, + "title": "connect_js_account_token_specs", + "type": "object" + }, + "bank_account": { + "description": "The bank account this token will represent.", + "properties": { + "account_holder_name": { + "maxLength": 5000, + "type": "string" + }, + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "futsu", + "savings", + "toza" + ], + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_number", + "country" + ], + "title": "token_create_bank_account", + "type": "object", + "x-stripeBypassValidation": true + }, + "card": { + "anyOf": [ + { + "properties": { + "address_city": { + "maxLength": 5000, + "type": "string" + }, + "address_country": { + "maxLength": 5000, + "type": "string" + }, + "address_line1": { + "maxLength": 5000, + "type": "string" + }, + "address_line2": { + "maxLength": 5000, + "type": "string" + }, + "address_state": { + "maxLength": 5000, + "type": "string" + }, + "address_zip": { + "maxLength": 5000, + "type": "string" + }, + "currency": { + "maxLength": 5000, + "type": "string" + }, + "cvc": { + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "maxLength": 5000, + "type": "string" + }, + "exp_year": { + "maxLength": 5000, + "type": "string" + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "number": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "exp_month", + "exp_year", + "number" + ], + "title": "credit_card_specs", + "type": "object" + }, + { + "maxLength": 5000, + "type": "string" + } + ], + "x-stripeBypassValidation": true + }, + "customer": { + "description": "The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).", + "maxLength": 5000, + "type": "string" + }, + "cvc_update": { + "description": "The updated CVC value this token will represent.", + "properties": { + "cvc": { + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "cvc" + ], + "title": "cvc_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "person": { + "description": "Information for the person this token will represent.", + "properties": { + "address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "address_kana": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kana_specs", + "type": "object" + }, + "address_kanji": { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + }, + "town": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "japan_address_kanji_specs", + "type": "object" + }, + "dob": { + "anyOf": [ + { + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "required": [ + "day", + "month", + "year" + ], + "title": "date_of_birth_specs", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "documents": { + "properties": { + "company_authorization": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "passport": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + }, + "visa": { + "properties": { + "files": { + "items": { + "maxLength": 500, + "type": "string" + }, + "type": "array" + } + }, + "title": "documents_param", + "type": "object" + } + }, + "title": "person_documents_specs", + "type": "object" + }, + "email": { + "type": "string" + }, + "first_name": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "first_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "full_name_aliases": { + "anyOf": [ + { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "gender": { + "type": "string" + }, + "id_number": { + "maxLength": 5000, + "type": "string" + }, + "id_number_secondary": { + "maxLength": 5000, + "type": "string" + }, + "last_name": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kana": { + "maxLength": 5000, + "type": "string" + }, + "last_name_kanji": { + "maxLength": 5000, + "type": "string" + }, + "maiden_name": { + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "nationality": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "type": "string" + }, + "political_exposure": { + "maxLength": 5000, + "type": "string" + }, + "registered_address": { + "properties": { + "city": { + "maxLength": 100, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 200, + "type": "string" + }, + "line2": { + "maxLength": 200, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "address_specs", + "type": "object" + }, + "relationship": { + "properties": { + "director": { + "type": "boolean" + }, + "executive": { + "type": "boolean" + }, + "owner": { + "type": "boolean" + }, + "percent_ownership": { + "anyOf": [ + { + "type": "number" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "representative": { + "type": "boolean" + }, + "title": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "relationship_specs", + "type": "object" + }, + "ssn_last_4": { + "type": "string" + }, + "verification": { + "properties": { + "additional_document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + }, + "document": { + "properties": { + "back": { + "maxLength": 500, + "type": "string" + }, + "front": { + "maxLength": 500, + "type": "string" + } + }, + "title": "person_verification_document_specs", + "type": "object" + } + }, + "title": "person_verification_specs", + "type": "object" + } + }, + "title": "person_token_specs", + "type": "object" + }, + "pii": { + "description": "The PII this token will represent.", + "properties": { + "id_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "pii_token_specs", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tokens/{token}": { + "get": { + "description": "

Retrieves the token with the given ID.

", + "operationId": "GetTokensToken", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "token", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/token" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/topups": { + "get": { + "description": "

Returns a list of top-ups.

", + "operationId": "GetTopups", + "parameters": [ + { + "description": "A positive integer representing how much to transfer.", + "explode": true, + "in": "query", + "name": "amount", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.", + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "pending", + "succeeded" + ], + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/topup" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/topups", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TopupList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Top up the balance of an account

", + "operationId": "PostTopups", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer representing how much to transfer.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "source": { + "description": "The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.", + "maxLength": 15, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this top-up as part of a group.", + "type": "string" + } + }, + "required": [ + "amount", + "currency" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/topups/{topup}": { + "get": { + "description": "

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

", + "operationId": "GetTopupsTopup", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the metadata of a top-up. Other top-up details are not editable by design.

", + "operationId": "PostTopupsTopup", + "parameters": [ + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/topups/{topup}/cancel": { + "post": { + "description": "

Cancels a top-up. Only pending top-ups can be canceled.

", + "operationId": "PostTopupsTopupCancel", + "parameters": [ + { + "in": "path", + "name": "topup", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/topup" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers": { + "get": { + "description": "

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

", + "operationId": "GetTransfers", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "Only return transfers for the destination specified by this account ID.", + "in": "query", + "name": "destination", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return transfers with the specified transfer group.", + "in": "query", + "name": "transfer_group", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/transfers", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

", + "operationId": "PostTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents (or local equivalent) representing how much to transfer.", + "type": "integer" + }, + "currency": { + "description": "3-letter [ISO code for currency](https://stripe.com/docs/payouts).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination": { + "description": "The ID of a connected Stripe account. See the Connect documentation for details.", + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "source_transaction": { + "description": "You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details.", + "type": "string" + }, + "source_type": { + "description": "The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.", + "enum": [ + "bank_account", + "card", + "fpx" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "type": "string" + } + }, + "required": [ + "currency", + "destination" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers/{id}/reversals": { + "get": { + "description": "

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

", + "operationId": "GetTransfersIdReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

When you create a new reversal, you must specify a transfer to create it on.

\n\n

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

\n\n

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

", + "operationId": "PostTransfersIdReversals", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.", + "type": "integer" + }, + "description": { + "description": "An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers/{transfer}": { + "get": { + "description": "

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

", + "operationId": "GetTransfersTransfer", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request accepts only metadata as an argument.

", + "operationId": "PostTransfersTransfer", + "parameters": [ + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/transfers/{transfer}/reversals/{id}": { + "get": { + "description": "

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

", + "operationId": "GetTransfersTransferReversalsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

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

\n\n

This request only accepts metadata and description as arguments.

", + "operationId": "PostTransfersTransferReversalsId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/transfer_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/credit_reversals": { + "get": { + "description": "

Returns a list of CreditReversals.

", + "operationId": "GetTreasuryCreditReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return CreditReversals for the ReceivedCredit ID.", + "in": "query", + "name": "received_credit", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return CreditReversals for a given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "posted", + "processing" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.credit_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedCreditsResourceCreditReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Reverses a ReceivedCredit and creates a CreditReversal object.

", + "operationId": "PostTreasuryCreditReversals", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "received_credit": { + "description": "The ReceivedCredit to reverse.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_credit" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.credit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/credit_reversals/{credit_reversal}": { + "get": { + "description": "

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

", + "operationId": "GetTreasuryCreditReversalsCreditReversal", + "parameters": [ + { + "in": "path", + "name": "credit_reversal", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.credit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/debit_reversals": { + "get": { + "description": "

Returns a list of DebitReversals.

", + "operationId": "GetTreasuryDebitReversals", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for the ReceivedDebit ID.", + "in": "query", + "name": "received_debit", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for a given resolution.", + "in": "query", + "name": "resolution", + "required": false, + "schema": { + "enum": [ + "lost", + "won" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return DebitReversals for a given status.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "completed", + "processing" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.debit_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedDebitsResourceDebitReversalList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Reverses a ReceivedDebit and creates a DebitReversal object.

", + "operationId": "PostTreasuryDebitReversals", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "received_debit": { + "description": "The ReceivedDebit to reverse.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "received_debit" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.debit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/debit_reversals/{debit_reversal}": { + "get": { + "description": "

Retrieves a DebitReversal object.

", + "operationId": "GetTreasuryDebitReversalsDebitReversal", + "parameters": [ + { + "in": "path", + "name": "debit_reversal", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.debit_reversal" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/financial_accounts": { + "get": { + "description": "

Returns a list of FinancialAccounts.

", + "operationId": "GetTreasuryFinancialAccounts", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "An object ID cursor for use in pagination.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit ranging from 1 to 100 (defaults to 10).", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "An object ID cursor for use in pagination.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/treasury.financial_account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/financial_accounts", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccountList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccounts", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "platform_restrictions": { + "explode": true, + "style": "deepObject" + }, + "supported_currencies": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.", + "properties": { + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "financial_addresses": { + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "title": "feature_access", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "platform_restrictions": { + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "properties": { + "inbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + }, + "outbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + } + }, + "title": "platform_restrictions", + "type": "object" + }, + "supported_currencies": { + "description": "The currencies the FinancialAccount can hold a balance in.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "supported_currencies" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/financial_accounts/{financial_account}": { + "get": { + "description": "

Retrieves the details of a FinancialAccount.

", + "operationId": "GetTreasuryFinancialAccountsFinancialAccount", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the details of a FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccount", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "features": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "platform_restrictions": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "features": { + "description": "Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.", + "properties": { + "card_issuing": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "financial_addresses": { + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "title": "feature_access", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "platform_restrictions": { + "description": "The set of functionalities that the platform can restrict on the FinancialAccount.", + "properties": { + "inbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + }, + "outbound_flows": { + "enum": [ + "restricted", + "unrestricted" + ], + "type": "string" + } + }, + "title": "platform_restrictions", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/financial_accounts/{financial_account}/features": { + "get": { + "description": "

Retrieves Features information associated with the FinancialAccount.

", + "operationId": "GetTreasuryFinancialAccountsFinancialAccountFeatures", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account_features" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the Features associated with a FinancialAccount.

", + "operationId": "PostTreasuryFinancialAccountsFinancialAccountFeatures", + "parameters": [ + { + "in": "path", + "name": "financial_account", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "card_issuing": { + "explode": true, + "style": "deepObject" + }, + "deposit_insurance": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "financial_addresses": { + "explode": true, + "style": "deepObject" + }, + "inbound_transfers": { + "explode": true, + "style": "deepObject" + }, + "intra_stripe_flows": { + "explode": true, + "style": "deepObject" + }, + "outbound_payments": { + "explode": true, + "style": "deepObject" + }, + "outbound_transfers": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "card_issuing": { + "description": "Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "deposit_insurance": { + "description": "Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_addresses": { + "description": "Contains Features that add FinancialAddresses to the FinancialAccount.", + "properties": { + "aba": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "financial_addresses", + "type": "object" + }, + "inbound_transfers": { + "description": "Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + } + }, + "title": "inbound_transfers", + "type": "object" + }, + "intra_stripe_flows": { + "description": "Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).", + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + }, + "outbound_payments": { + "description": "Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_payments", + "type": "object" + }, + "outbound_transfers": { + "description": "Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.", + "properties": { + "ach": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access_with_ach_details", + "type": "object" + }, + "us_domestic_wire": { + "properties": { + "requested": { + "type": "boolean" + } + }, + "required": [ + "requested" + ], + "title": "access", + "type": "object" + } + }, + "title": "outbound_transfers", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.financial_account_features" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/inbound_transfers": { + "get": { + "description": "

Returns a list of InboundTransfers sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryInboundTransfers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "processing", + "succeeded" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryInboundTransfersResourceInboundTransferList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an InboundTransfer.

", + "operationId": "PostTreasuryInboundTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to send funds to.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for the InboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "The complete description that appears on your customers' statements. Maximum 10 characters.", + "maxLength": 10, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account", + "origin_payment_method" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/inbound_transfers/{id}": { + "get": { + "description": "

Retrieves the details of an existing InboundTransfer.

", + "operationId": "GetTreasuryInboundTransfersId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel": { + "post": { + "description": "

Cancels an InboundTransfer.

", + "operationId": "PostTreasuryInboundTransfersInboundTransferCancel", + "parameters": [ + { + "in": "path", + "name": "inbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.inbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_payments": { + "get": { + "description": "

Returns a list of OutboundPayments sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryOutboundPayments", + "parameters": [ + { + "description": "Only return OutboundPayments sent to this customer.", + "in": "query", + "name": "customer", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.outbound_payment" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/outbound_payments", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an OutboundPayment.

", + "operationId": "PostTreasuryOutboundPayments", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "destination_payment_method_data": { + "explode": true, + "style": "deepObject" + }, + "destination_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "end_user_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.", + "maxLength": 5000, + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method_data": { + "description": "Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.", + "properties": { + "billing_details": { + "properties": { + "address": { + "anyOf": [ + { + "properties": { + "city": { + "maxLength": 5000, + "type": "string" + }, + "country": { + "maxLength": 5000, + "type": "string" + }, + "line1": { + "maxLength": 5000, + "type": "string" + }, + "line2": { + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "maxLength": 5000, + "type": "string" + }, + "state": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_address", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + }, + "name": { + "maxLength": 5000, + "type": "string" + }, + "phone": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "billing_details_inner_params", + "type": "object" + }, + "financial_account": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": { + "enum": [ + "financial_account", + "us_bank_account" + ], + "type": "string" + }, + "us_bank_account": { + "properties": { + "account_holder_type": { + "enum": [ + "company", + "individual" + ], + "type": "string" + }, + "account_number": { + "maxLength": 5000, + "type": "string" + }, + "account_type": { + "enum": [ + "checking", + "savings" + ], + "type": "string" + }, + "financial_connections_account": { + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_param", + "type": "object" + } + }, + "required": [ + "type" + ], + "title": "payment_method_data", + "type": "object" + }, + "destination_payment_method_options": { + "description": "Payment method-specific configuration for this OutboundPayment.", + "properties": { + "us_bank_account": { + "anyOf": [ + { + "properties": { + "network": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "end_user_details": { + "description": "End user details.", + "properties": { + "ip_address": { + "type": "string" + }, + "present": { + "type": "boolean" + } + }, + "required": [ + "present" + ], + "title": "end_user_details_params", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_payments/{id}": { + "get": { + "description": "

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

", + "operationId": "GetTreasuryOutboundPaymentsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_payments/{id}/cancel": { + "post": { + "description": "

Cancel an OutboundPayment.

", + "operationId": "PostTreasuryOutboundPaymentsIdCancel", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_payment" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_transfers": { + "get": { + "description": "

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

", + "operationId": "GetTreasuryOutboundTransfers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "canceled", + "failed", + "posted", + "processing", + "returned" + ], + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryOutboundTransfersResourceOutboundTransferList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates an OutboundTransfer.

", + "operationId": "PostTreasuryOutboundTransfers", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "destination_payment_method_options": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount (in cents) to be transferred.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method": { + "description": "The PaymentMethod to use as the payment instrument for the OutboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "destination_payment_method_options": { + "description": "Hash describing payment method configuration details.", + "properties": { + "us_bank_account": { + "anyOf": [ + { + "properties": { + "network": { + "enum": [ + "ach", + "us_domestic_wire" + ], + "type": "string" + } + }, + "title": "payment_method_options_param", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ] + } + }, + "title": "payment_method_options", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "financial_account": { + "description": "The FinancialAccount to pull funds from.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "statement_descriptor": { + "description": "Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "financial_account" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_transfers/{outbound_transfer}": { + "get": { + "description": "

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

", + "operationId": "GetTreasuryOutboundTransfersOutboundTransfer", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel": { + "post": { + "description": "

An OutboundTransfer can be canceled if the funds have not yet been paid out.

", + "operationId": "PostTreasuryOutboundTransfersOutboundTransferCancel", + "parameters": [ + { + "in": "path", + "name": "outbound_transfer", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.outbound_transfer" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_credits": { + "get": { + "description": "

Returns a list of ReceivedCredits.

", + "operationId": "GetTreasuryReceivedCredits", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The FinancialAccount that received the funds.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Only return ReceivedCredits described by the flow.", + "explode": true, + "in": "query", + "name": "linked_flows", + "required": false, + "schema": { + "properties": { + "source_flow_type": { + "enum": [ + "credit_reversal", + "other", + "outbound_payment", + "payout" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "source_flow_type" + ], + "title": "linked_flows_param", + "type": "object" + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return ReceivedCredits that have the given status: `succeeded` or `failed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.received_credit" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedCreditsResourceReceivedCreditList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_credits/{id}": { + "get": { + "description": "

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

", + "operationId": "GetTreasuryReceivedCreditsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_credit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_debits": { + "get": { + "description": "

Returns a list of ReceivedDebits.

", + "operationId": "GetTreasuryReceivedDebits", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "The FinancialAccount that funds were pulled from.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return ReceivedDebits that have the given status: `succeeded` or `failed`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "failed", + "succeeded" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.received_debit" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryReceivedDebitsResourceReceivedDebitList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/received_debits/{id}": { + "get": { + "description": "

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

", + "operationId": "GetTreasuryReceivedDebitsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.received_debit" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transaction_entries": { + "get": { + "description": "

Retrieves a list of TransactionEntry objects.

", + "operationId": "GetTreasuryTransactionEntries", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "explode": true, + "in": "query", + "name": "effective_at", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.", + "in": "query", + "name": "order_by", + "required": false, + "schema": { + "enum": [ + "created", + "effective_at" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return TransactionEntries associated with this Transaction.", + "in": "query", + "name": "transaction", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transaction_entries/{id}": { + "get": { + "description": "

Retrieves a TransactionEntry object.

", + "operationId": "GetTreasuryTransactionEntriesId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.transaction_entry" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transactions": { + "get": { + "description": "

Retrieves a list of Transaction objects.

", + "operationId": "GetTreasuryTransactions", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "created", + "required": false, + "schema": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + }, + "style": "deepObject" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "Returns objects associated with this FinancialAccount.", + "in": "query", + "name": "financial_account", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.", + "in": "query", + "name": "order_by", + "required": false, + "schema": { + "enum": [ + "created", + "posted_at" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only return Transactions that have the given status: `open`, `posted`, or `void`.", + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "open", + "posted", + "void" + ], + "type": "string" + }, + "style": "form" + }, + { + "description": "A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.", + "explode": true, + "in": "query", + "name": "status_transitions", + "required": false, + "schema": { + "properties": { + "posted_at": { + "anyOf": [ + { + "properties": { + "gt": { + "type": "integer" + }, + "gte": { + "type": "integer" + }, + "lt": { + "type": "integer" + }, + "lte": { + "type": "integer" + } + }, + "title": "range_query_specs", + "type": "object" + }, + { + "type": "integer" + } + ] + } + }, + "title": "status_transition_timestamp_specs", + "type": "object" + }, + "style": "deepObject" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/treasury.transaction" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TreasuryTransactionsResourceTransactionList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/treasury/transactions/{id}": { + "get": { + "description": "

Retrieves the details of an existing Transaction.

", + "operationId": "GetTreasuryTransactionsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/treasury.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/webhook_endpoints": { + "get": { + "description": "

Returns a list of your webhook endpoints.

", + "operationId": "GetWebhookEndpoints", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/webhook_endpoint" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/webhook_endpoints", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "NotificationWebhookEndpointList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

", + "operationId": "PostWebhookEndpoints", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "enabled_events": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "api_version": { + "description": "Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.", + "enum": [ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "connect": { + "description": "Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.", + "type": "boolean" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": "string" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "enum": [ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "invoiceitem.updated", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "order.created", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "sku.created", + "sku.deleted", + "sku.updated", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "required": [ + "enabled_events", + "url" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/webhook_endpoints/{webhook_endpoint}": { + "delete": { + "description": "

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

", + "operationId": "DeleteWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleted_webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "get": { + "description": "

Retrieves the webhook endpoint with the given ID.

", + "operationId": "GetWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

", + "operationId": "PostWebhookEndpointsWebhookEndpoint", + "parameters": [ + { + "in": "path", + "name": "webhook_endpoint", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "enabled_events": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": "string" + }, + "disabled": { + "description": "Disable the webhook endpoint if set to true.", + "type": "boolean" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "enum": [ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "invoiceitem.updated", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "order.created", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "sku.created", + "sku.deleted", + "sku.updated", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_endpoint" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + } + }, + "security": [ + { + "basicAuth": [] + }, + { + "bearerAuth": [] + } + ], + "servers": [ + { + "url": "https://api.stripe.com/" + } + ] +} \ No newline at end of file diff --git a/apps/integrations/src/integrations/stripe/schemas/spec.json b/apps/integrations/src/integrations/stripe/schemas/spec.json new file mode 100644 index 00000000000..f9747686a50 --- /dev/null +++ b/apps/integrations/src/integrations/stripe/schemas/spec.json @@ -0,0 +1,35849 @@ +{ + "definitions": { + "account": { + "description": "This is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current requirements or if the account is\nenabled to make live charges or receive payouts.\n\nFor Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that\naccount has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)\nfor a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**\nbelow. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).", + "properties": { + "business_profile": { + "anyOf": [ + { + "$ref": "#/definitions/account_business_profile" + }, + { + "type": "null" + } + ], + "description": "Business information about the account." + }, + "business_type": { + "description": "The business type.", + "enum": [ + "company", + "government_entity", + "individual", + "non_profit", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "capabilities": { + "$ref": "#/definitions/account_capabilities" + }, + "charges_enabled": { + "description": "Whether the account can create live charges.", + "type": "boolean" + }, + "company": { + "$ref": "#/definitions/legal_entity_company" + }, + "controller": { + "$ref": "#/definitions/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. Standard accounts cannot receive payouts before this is true.", + "type": "boolean" + }, + "email": { + "description": "An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "external_accounts": { + "description": "External accounts (bank accounts and debit cards) currently attached to this account", + "properties": { + "data": { + "description": "The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ExternalAccountList", + "type": "object", + "x-expandableFields": ["data"] + }, + "future_requirements": { + "$ref": "#/definitions/account_future_requirements" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "$ref": "#/definitions/person" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account"], + "type": "string" + }, + "payouts_enabled": { + "description": "Whether Stripe can send payouts to this account.", + "type": "boolean" + }, + "requirements": { + "$ref": "#/definitions/account_requirements" + }, + "settings": { + "anyOf": [ + { + "$ref": "#/definitions/account_settings" + }, + { + "type": "null" + } + ], + "description": "Options for customizing how the account functions within Stripe." + }, + "tos_acceptance": { + "$ref": "#/definitions/account_tos_acceptance" + }, + "type": { + "description": "The Stripe account type. Can be `standard`, `express`, or `custom`.", + "enum": ["custom", "express", "standard"], + "type": "string" + } + }, + "required": ["id", "object"], + "title": "Account", + "type": "object", + "x-expandableFields": [ + "business_profile", + "capabilities", + "company", + "controller", + "external_accounts", + "future_requirements", + "individual", + "requirements", + "settings", + "tos_acceptance" + ], + "x-resourceId": "account" + }, + "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 will appear on the mandate, and as the statement descriptor.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountBacsDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_branding_settings": { + "description": "", + "properties": { + "icon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "logo": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "primary_color": { + "description": "A CSS hex color value representing the primary branding color for this account", + "maxLength": 5000, + "type": ["string", "null"] + }, + "secondary_color": { + "description": "A CSS hex color value representing the secondary branding color for this account", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "AccountBrandingSettings", + "type": "object", + "x-expandableFields": ["icon", "logo"] + }, + "account_business_profile": { + "description": "", + "properties": { + "mcc": { + "description": "[The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "The customer-facing business name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "support_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "A publicly available mailing address for sending support issues to." + }, + "support_email": { + "description": "A publicly available email address for sending support issues to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "support_phone": { + "description": "A publicly available phone number to call with support issues.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "support_url": { + "description": "A publicly available website for handling support issues.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "url": { + "description": "The business's publicly available website.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "AccountBusinessProfile", + "type": "object", + "x-expandableFields": ["support_address"] + }, + "account_capabilities": { + "description": "", + "properties": { + "acss_debit_payments": { + "description": "The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "affirm_payments": { + "description": "The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "afterpay_clearpay_payments": { + "description": "The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "au_becs_debit_payments": { + "description": "The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "bacs_debit_payments": { + "description": "The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "bancontact_payments": { + "description": "The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "bank_transfer_payments": { + "description": "The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "blik_payments": { + "description": "The status of the blik payments capability of the account, or whether the account can directly process blik charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "boleto_payments": { + "description": "The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "card_issuing": { + "description": "The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "card_payments": { + "description": "The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "cartes_bancaires_payments": { + "description": "The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "paynow_payments": { + "description": "The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "promptpay_payments": { + "description": "The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "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" + }, + "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" + }, + "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" + } + }, + "title": "AccountCapabilities", + "type": "object", + "x-expandableFields": [] + }, + "account_capability_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/definitions/account_requirements_alternative" + }, + "type": ["array", "null"] + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/definitions/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_capability_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/definitions/account_requirements_alternative" + }, + "type": ["array", "null"] + }, + "current_deadline": { + "description": "Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "disabled_reason": { + "description": "If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.\n\n`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:\n\n- [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses)\n\nIf you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/definitions/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "AccountCapabilityRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_card_issuing_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/definitions/card_issuing_account_terms_of_service" + } + }, + "title": "AccountCardIssuingSettings", + "type": "object", + "x-expandableFields": ["tos_acceptance"] + }, + "account_card_payments_settings": { + "description": "", + "properties": { + "decline_on": { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "AccountCardPaymentsSettings", + "type": "object", + "x-expandableFields": ["decline_on"] + }, + "account_dashboard_settings": { + "description": "", + "properties": { + "display_name": { + "description": "The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "AccountDashboardSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_decline_charge_on": { + "description": "", + "properties": { + "avs_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.", + "type": "boolean" + }, + "cvc_failure": { + "description": "Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.", + "type": "boolean" + } + }, + "required": ["avs_failure", "cvc_failure"], + "title": "AccountDeclineChargeOn", + "type": "object", + "x-expandableFields": [] + }, + "account_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/definitions/account_requirements_alternative" + }, + "type": ["array", "null"] + }, + "current_deadline": { + "description": "Date on which `future_requirements` merges with 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", + "type": ["integer", "null"] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "disabled_reason": { + "description": "This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/definitions/account_requirements_error" + }, + "type": ["array", "null"] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "past_due": { + "description": "Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + } + }, + "title": "AccountFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_link": { + "description": "Account Links are the means by which a Connect platform grants a connected account permission to access\nStripe-hosted applications, such as Connect Onboarding.\n\nRelated guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The timestamp at which this account link will expire.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account_link"], + "type": "string" + }, + "url": { + "description": "The URL for the account link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["created", "expires_at", "object", "url"], + "title": "AccountLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "account_link" + }, + "account_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, + "type": ["string", "null"] + }, + "statement_descriptor_kana": { + "description": "The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": ["string", "null"] + }, + "statement_descriptor_kanji": { + "description": "The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "AccountPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_payout_settings": { + "description": "", + "properties": { + "debit_negative_balances": { + "description": "A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.", + "type": "boolean" + }, + "schedule": { + "$ref": "#/definitions/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, + "type": ["string", "null"] + } + }, + "required": ["debit_negative_balances", "schedule"], + "title": "AccountPayoutSettings", + "type": "object", + "x-expandableFields": ["schedule"] + }, + "account_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/definitions/account_requirements_alternative" + }, + "type": ["array", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "disabled_reason": { + "description": "If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/definitions/account_requirements_error" + }, + "type": ["array", "null"] + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "past_due": { + "description": "Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + } + }, + "title": "AccountRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "account_requirements_alternative": { + "description": "", + "properties": { + "alternative_fields_due": { + "description": "Fields that can be provided to satisfy all fields in `original_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "original_fields_due": { + "description": "Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["alternative_fields_due", "original_fields_due"], + "title": "AccountRequirementsAlternative", + "type": "object", + "x-expandableFields": [] + }, + "account_requirements_error": { + "description": "", + "properties": { + "code": { + "description": "The code for the type of error.", + "enum": [ + "invalid_address_city_state_postal_code", + "invalid_dob_age_under_18", + "invalid_representative_country", + "invalid_street_address", + "invalid_tos_acceptance", + "invalid_value_other", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason": { + "description": "An informative message that indicates the error type and provides additional details about the error.", + "maxLength": 5000, + "type": "string" + }, + "requirement": { + "description": "The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["code", "reason", "requirement"], + "title": "AccountRequirementsError", + "type": "object", + "x-expandableFields": [] + }, + "account_sepa_debit_payments_settings": { + "description": "", + "properties": { + "creditor_id": { + "description": "SEPA creditor identifier that identifies the company making the payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountSepaDebitPaymentsSettings", + "type": "object", + "x-expandableFields": [] + }, + "account_settings": { + "description": "", + "properties": { + "bacs_debit_payments": { + "$ref": "#/definitions/account_bacs_debit_payments_settings" + }, + "branding": { + "$ref": "#/definitions/account_branding_settings" + }, + "card_issuing": { + "$ref": "#/definitions/account_card_issuing_settings" + }, + "card_payments": { + "$ref": "#/definitions/account_card_payments_settings" + }, + "dashboard": { + "$ref": "#/definitions/account_dashboard_settings" + }, + "payments": { + "$ref": "#/definitions/account_payments_settings" + }, + "payouts": { + "$ref": "#/definitions/account_payout_settings" + }, + "sepa_debit_payments": { + "$ref": "#/definitions/account_sepa_debit_payments_settings" + }, + "treasury": { + "$ref": "#/definitions/account_treasury_settings" + } + }, + "required": ["branding", "card_payments", "dashboard", "payments"], + "title": "AccountSettings", + "type": "object", + "x-expandableFields": [ + "bacs_debit_payments", + "branding", + "card_issuing", + "card_payments", + "dashboard", + "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.", + "type": ["integer", "null"] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "AccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "account_tos_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted their service agreement", + "format": "unix-time", + "type": ["integer", "null"] + }, + "ip": { + "description": "The IP address from which the account representative accepted their service agreement", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "AccountTOSAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "account_treasury_settings": { + "description": "", + "properties": { + "tos_acceptance": { + "$ref": "#/definitions/account_terms_of_service" + } + }, + "title": "AccountTreasurySettings", + "type": "object", + "x-expandableFields": ["tos_acceptance"] + }, + "account_unification_account_controller": { + "description": "", + "properties": { + "is_controller": { + "description": "`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.", + "type": "boolean" + }, + "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": [] + }, + "address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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", "null"] + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "Address", + "type": "object", + "x-expandableFields": [] + }, + "api_errors": { + "description": "", + "properties": { + "charge": { + "description": "For card errors, the ID of the failed charge.", + "maxLength": 5000, + "type": "string" + }, + "code": { + "description": "For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "decline_code": { + "description": "For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.", + "maxLength": 5000, + "type": "string" + }, + "doc_url": { + "description": "A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.", + "maxLength": 5000, + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.", + "maxLength": 40000, + "type": "string" + }, + "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": "#/definitions/payment_intent" + }, + "payment_method": { + "$ref": "#/definitions/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": "#/definitions/setup_intent" + }, + "source": { + "anyOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + } + ], + "description": "The source object for errors returned on a request involving a 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" + ] + }, + "apple_pay_domain": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "domain_name": { + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["apple_pay_domain"], + "type": "string" + } + }, + "required": ["created", "domain_name", "id", "livemode", "object"], + "title": "ApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "apple_pay_domain" + }, + "application": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["application"], + "type": "string" + } + }, + "required": ["id", "object"], + "title": "Application", + "type": "object", + "x-expandableFields": [] + }, + "application_fee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "ID of the Stripe account this fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "amount": { + "description": "Amount earned, in %s.", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s 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": "#/definitions/application" + } + ], + "description": "ID of the Connect application that earned the fee.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + } + ], + "description": "ID of the charge that the application fee was taken from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["application_fee"], + "type": "string" + }, + "originating_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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": "#/definitions/fee_refund" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "FeeRefundList", + "type": "object", + "x-expandableFields": ["data"] + } + }, + "required": [ + "account", + "amount", + "amount_refunded", + "application", + "charge", + "created", + "currency", + "id", + "livemode", + "object", + "refunded", + "refunds" + ], + "title": "PlatformFee", + "type": "object", + "x-expandableFields": [ + "account", + "application", + "balance_transaction", + "charge", + "originating_transaction", + "refunds" + ], + "x-resourceId": "application_fee" + }, + "apps.secret": { + "description": "Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.\n\nThe primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.\n\nAll Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.\n\nA `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.\n\nRelated guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deleted": { + "description": "If true, indicates that this secret has been deleted", + "type": "boolean" + }, + "expires_at": { + "description": "The Unix timestamp for the expiry time of the secret, after which the secret deletes.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "A name for the secret that's unique within the scope.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["apps.secret"], + "type": "string" + }, + "payload": { + "description": "The plaintext secret value to be stored.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "scope": { + "$ref": "#/definitions/secret_service_resource_scope" + } + }, + "required": ["created", "id", "livemode", "name", "object", "scope"], + "title": "SecretServiceResourceSecret", + "type": "object", + "x-expandableFields": ["scope"], + "x-resourceId": "apps.secret" + }, + "automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this invoice.", + "enum": ["complete", "failed", "requires_location_inputs", null], + "type": ["string", "null"] + } + }, + "required": ["enabled"], + "title": "AutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "balance": { + "description": "This is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.\n\nYou can also retrieve the balance history, which contains a list of\n[transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance\n(charges, payouts, and so forth).\n\nThe available and pending amounts for each currency are broken down further by\npayment source types.\n\nRelated guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).", + "properties": { + "available": { + "description": "Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.", + "items": { + "$ref": "#/definitions/balance_amount" + }, + "type": "array" + }, + "connect_reserved": { + "description": "Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property.", + "items": { + "$ref": "#/definitions/balance_amount" + }, + "type": "array" + }, + "instant_available": { + "description": "Funds that can be paid out using Instant Payouts.", + "items": { + "$ref": "#/definitions/balance_amount" + }, + "type": "array" + }, + "issuing": { + "$ref": "#/definitions/balance_detail" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["balance"], + "type": "string" + }, + "pending": { + "description": "Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property.", + "items": { + "$ref": "#/definitions/balance_amount" + }, + "type": "array" + } + }, + "required": ["available", "livemode", "object", "pending"], + "title": "Balance", + "type": "object", + "x-expandableFields": [ + "available", + "connect_reserved", + "instant_available", + "issuing", + "pending" + ], + "x-resourceId": "balance" + }, + "balance_amount": { + "description": "", + "properties": { + "amount": { + "description": "Balance amount.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "source_types": { + "$ref": "#/definitions/balance_amount_by_source_type" + } + }, + "required": ["amount", "currency"], + "title": "BalanceAmount", + "type": "object", + "x-expandableFields": ["source_types"] + }, + "balance_amount_by_source_type": { + "description": "", + "properties": { + "bank_account": { + "description": "Amount for bank account.", + "type": "integer" + }, + "card": { + "description": "Amount for card.", + "type": "integer" + }, + "fpx": { + "description": "Amount for FPX.", + "type": "integer" + } + }, + "title": "BalanceAmountBySourceType", + "type": "object", + "x-expandableFields": [] + }, + "balance_detail": { + "description": "", + "properties": { + "available": { + "description": "Funds that are available for use.", + "items": { + "$ref": "#/definitions/balance_amount" + }, + "type": "array" + } + }, + "required": ["available"], + "title": "BalanceDetail", + "type": "object", + "x-expandableFields": ["available"] + }, + "balance_transaction": { + "description": "Balance transactions represent funds moving through your Stripe account.\nThey're created for every type of transaction that comes into or flows out of your Stripe account balance.\n\nRelated guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).", + "properties": { + "amount": { + "description": "Gross amount of the transaction, in %s.", + "type": "integer" + }, + "available_on": { + "description": "The date the transaction's net funds will become available in the Stripe balance.", + "format": "unix-time", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "exchange_rate": { + "description": "The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.", + "type": ["number", "null"] + }, + "fee": { + "description": "Fees (in %s) paid for this transaction.", + "type": "integer" + }, + "fee_details": { + "description": "Detailed breakdown of fees (in %s) paid for this transaction.", + "items": { + "$ref": "#/definitions/fee" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "net": { + "description": "Net amount of the transaction, in %s.", + "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](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application_fee" + }, + { + "$ref": "#/definitions/charge" + }, + { + "$ref": "#/definitions/connect_collection_transfer" + }, + { + "$ref": "#/definitions/dispute" + }, + { + "$ref": "#/definitions/fee_refund" + }, + { + "$ref": "#/definitions/issuing.authorization" + }, + { + "$ref": "#/definitions/issuing.dispute" + }, + { + "$ref": "#/definitions/issuing.transaction" + }, + { + "$ref": "#/definitions/payout" + }, + { + "$ref": "#/definitions/platform_tax_fee" + }, + { + "$ref": "#/definitions/refund" + }, + { + "$ref": "#/definitions/reserve_transaction" + }, + { + "$ref": "#/definitions/tax_deducted_at_source" + }, + { + "$ref": "#/definitions/topup" + }, + { + "$ref": "#/definitions/transfer" + }, + { + "$ref": "#/definitions/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The Stripe object to which this transaction is related.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application_fee" + }, + { + "$ref": "#/definitions/charge" + }, + { + "$ref": "#/definitions/connect_collection_transfer" + }, + { + "$ref": "#/definitions/dispute" + }, + { + "$ref": "#/definitions/fee_refund" + }, + { + "$ref": "#/definitions/issuing.authorization" + }, + { + "$ref": "#/definitions/issuing.dispute" + }, + { + "$ref": "#/definitions/issuing.transaction" + }, + { + "$ref": "#/definitions/payout" + }, + { + "$ref": "#/definitions/platform_tax_fee" + }, + { + "$ref": "#/definitions/refund" + }, + { + "$ref": "#/definitions/reserve_transaction" + }, + { + "$ref": "#/definitions/tax_deducted_at_source" + }, + { + "$ref": "#/definitions/topup" + }, + { + "$ref": "#/definitions/transfer" + }, + { + "$ref": "#/definitions/transfer_reversal" + } + ] + }, + "x-stripeBypassValidation": true + }, + "status": { + "description": "If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.", + "enum": [ + "adjustment", + "advance", + "advance_funding", + "anticipation_repayment", + "application_fee", + "application_fee_refund", + "charge", + "connect_collection_transfer", + "contribution", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "payment", + "payment_failure_refund", + "payment_refund", + "payout", + "payout_cancel", + "payout_failure", + "refund", + "refund_failure", + "reserve_transaction", + "reserved_funds", + "stripe_fee", + "stripe_fx_fee", + "tax_fee", + "topup", + "topup_reversal", + "transfer", + "transfer_cancel", + "transfer_failure", + "transfer_refund" + ], + "type": "string" + } + }, + "required": [ + "amount", + "available_on", + "created", + "currency", + "fee", + "fee_details", + "id", + "net", + "object", + "reporting_category", + "status", + "type" + ], + "title": "BalanceTransaction", + "type": "object", + "x-expandableFields": ["fee_details", "source"], + "x-resourceId": "balance_transaction" + }, + "bank_account": { + "description": "These bank accounts are payment methods on `Customer` objects.\n\nOn the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer\ndestinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-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](https://stripe.com/docs/payments/bank-debits-transfers).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The ID of the account that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "account_holder_type": { + "description": "The type of entity that holds the account. This can be either `individual` or `company`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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" + }, + "type": ["array", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number (e.g., `WELLS FARGO`).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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.", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer that the bank account is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "default_for_currency": { + "description": "Whether this bank account is the default external account for its currency.", + "type": ["boolean", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["bank_account"], + "type": "string" + }, + "routing_number": { + "description": "The routing transit number for the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["country", "currency", "id", "last4", "object", "status"], + "title": "BankAccount", + "type": "object", + "x-expandableFields": ["account", "customer"], + "x-resourceId": "bank_account" + }, + "bank_connections_resource_accountholder": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + } + ], + "description": "ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + } + ] + } + }, + "type": { + "description": "Type of account holder that this account belongs to.", + "enum": ["account", "customer"], + "type": "string" + } + }, + "required": ["type"], + "title": "BankConnectionsResourceAccountholder", + "type": "object", + "x-expandableFields": ["account", "customer"] + }, + "bank_connections_resource_balance": { + "description": "", + "properties": { + "as_of": { + "description": "The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "cash": { + "$ref": "#/definitions/bank_connections_resource_balance_api_resource_cash_balance" + }, + "credit": { + "$ref": "#/definitions/bank_connections_resource_balance_api_resource_credit_balance" + }, + "current": { + "additionalProperties": { + "type": "integer" + }, + "description": "The balances owed to (or by) the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": "object" + }, + "type": { + "description": "The `type` of the balance. An additional hash is included on the balance with a name matching this value.", + "enum": ["cash", "credit"], + "type": "string" + } + }, + "required": ["as_of", "current", "type"], + "title": "BankConnectionsResourceBalance", + "type": "object", + "x-expandableFields": ["cash", "credit"] + }, + "bank_connections_resource_balance_api_resource_cash_balance": { + "description": "", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "The funds available to the account holder. Typically this is the current balance less any holds.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": ["object", "null"] + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCashBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_api_resource_credit_balance": { + "description": "", + "properties": { + "used": { + "additionalProperties": { + "type": "integer" + }, + "description": "The credit that has been used by the account holder.\n\nEach key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.\n\nEach value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.", + "type": ["object", "null"] + } + }, + "title": "BankConnectionsResourceBalanceAPIResourceCreditBalance", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_balance_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": ["failed", "pending", "succeeded"], + "type": "string" + } + }, + "required": ["last_attempted_at", "status"], + "title": "BankConnectionsResourceBalanceRefresh", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_link_account_session_filters": { + "description": "", + "properties": { + "countries": { + "description": "List of countries from which to filter accounts.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + } + }, + "title": "BankConnectionsResourceLinkAccountSessionFilters", + "type": "object", + "x-expandableFields": [] + }, + "bank_connections_resource_ownership_refresh": { + "description": "", + "properties": { + "last_attempted_at": { + "description": "The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "status": { + "description": "The status of the last refresh attempt.", + "enum": ["failed", "pending", "succeeded"], + "type": "string" + } + }, + "required": ["last_attempted_at", "status"], + "title": "BankConnectionsResourceOwnershipRefresh", + "type": "object", + "x-expandableFields": [] + }, + "billing_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "Billing address." + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "phone": { + "description": "Billing phone number (including extension).", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "billing_details", + "type": "object", + "x-expandableFields": ["address"] + }, + "billing_portal.configuration": { + "description": "A portal configuration describes the functionality and behavior of a portal session.", + "properties": { + "active": { + "description": "Whether the configuration is active and can be used to create portal sessions.", + "type": "boolean" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the configuration.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + } + ] + } + }, + "business_profile": { + "$ref": "#/definitions/portal_business_profile" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_return_url": { + "description": "The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "features": { + "$ref": "#/definitions/portal_features" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_default": { + "description": "Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "login_page": { + "$ref": "#/definitions/portal_login_page" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing_portal.configuration"], + "type": "string" + }, + "updated": { + "description": "Time at which the object was last updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "active", + "business_profile", + "created", + "features", + "id", + "is_default", + "livemode", + "login_page", + "object", + "updated" + ], + "title": "PortalConfiguration", + "type": "object", + "x-expandableFields": [ + "application", + "business_profile", + "features", + "login_page" + ], + "x-resourceId": "billing_portal.configuration" + }, + "billing_portal.session": { + "description": "The Billing customer portal is a Stripe-hosted UI for subscription and\nbilling management.\n\nA portal configuration describes the functionality and features that you\nwant to provide to your customers through the portal.\n\nA portal session describes the instantiation of the customer portal for\na particular customer. By visiting the session's URL, the customer\ncan manage their subscriptions and billing details. For security reasons,\nsessions are short-lived and will expire if the customer does not visit the URL.\nCreate sessions on-demand when customers intend to manage their subscriptions\nand billing details.\n\nLearn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).", + "properties": { + "configuration": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/billing_portal.configuration" + } + ], + "description": "The configuration used by this session, describing the features available.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/billing_portal.configuration" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "description": "The ID of the customer for this session.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "anyOf": [ + { + "$ref": "#/definitions/portal_flows_flow" + }, + { + "type": "null" + } + ], + "description": "Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + null + ], + "type": ["string", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["billing_portal.session"], + "type": "string" + }, + "on_behalf_of": { + "description": "The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "return_url": { + "description": "The URL to redirect customers to when they click on the portal's link to return to your website.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "url": { + "description": "The short-lived URL of the session that gives customers access to the customer portal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "configuration", + "created", + "customer", + "id", + "livemode", + "object", + "url" + ], + "title": "PortalSession", + "type": "object", + "x-expandableFields": ["configuration", "flow"], + "x-resourceId": "billing_portal.session" + }, + "capability": { + "description": "This is an object representing a capability for a Stripe account.\n\nRelated guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The account for which the capability enables functionality.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "future_requirements": { + "$ref": "#/definitions/account_capability_future_requirements" + }, + "id": { + "description": "The identifier for the capability.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["capability"], + "type": "string" + }, + "requested": { + "description": "Whether the capability has been requested.", + "type": "boolean" + }, + "requested_at": { + "description": "Time at which the capability was requested. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "requirements": { + "$ref": "#/definitions/account_capability_requirements" + }, + "status": { + "description": "The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.", + "enum": ["active", "disabled", "inactive", "pending", "unrequested"], + "type": "string" + } + }, + "required": ["account", "id", "object", "requested", "status"], + "title": "AccountCapability", + "type": "object", + "x-expandableFields": ["account", "future_requirements", "requirements"], + "x-resourceId": "capability" + }, + "card": { + "description": "You can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.\n\nRelated guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "address_city": { + "description": "City/District/Suburb/Town/Village.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_country": { + "description": "Billing address country, if provided when creating card.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_line1": { + "description": "Address line 1 (Street address/PO Box/Company name).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_line1_check": { + "description": "If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_line2": { + "description": "Address line 2 (Apartment/Suite/Unit/Building).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_state": { + "description": "State/County/Province/Region.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_zip": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "address_zip_check": { + "description": "If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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" + }, + "type": ["array", "null"] + }, + "brand": { + "description": "Card brand. Can be `American Express`, `Diners Club`, `Discover`, `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, + "type": ["string", "null"] + }, + "currency": { + "description": "Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.", + "type": ["string", "null"] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "default_for_currency": { + "description": "Whether this card is the default external account for its currency.", + "type": ["boolean", "null"] + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "name": { + "description": "Cardholder name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["card"], + "type": "string" + }, + "status": { + "description": "For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "required": [ + "brand", + "exp_month", + "exp_year", + "funding", + "id", + "last4", + "object" + ], + "title": "Card", + "type": "object", + "x-expandableFields": ["account", "customer"], + "x-resourceId": "card" + }, + "card_generated_from_payment_method_details": { + "description": "", + "properties": { + "card_present": { + "$ref": "#/definitions/payment_method_details_card_present" + }, + "type": { + "description": "The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "card_generated_from_payment_method_details", + "type": "object", + "x-expandableFields": ["card_present"] + }, + "card_issuing_account_terms_of_service": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the account representative accepted the service agreement.", + "type": ["integer", "null"] + }, + "ip": { + "description": "The IP address from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "user_agent": { + "description": "The user agent of the browser from which the account representative accepted the service agreement.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CardIssuingAccountTermsOfService", + "type": "object", + "x-expandableFields": [] + }, + "card_mandate_payment_method_details": { + "description": "", + "properties": {}, + "title": "card_mandate_payment_method_details", + "type": "object", + "x-expandableFields": [] + }, + "cash_balance": { + "description": "A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.", + "properties": { + "available": { + "additionalProperties": { + "type": "integer" + }, + "description": "A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": ["object", "null"] + }, + "customer": { + "description": "The ID of the customer whose cash balance this object represents.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["cash_balance"], + "type": "string" + }, + "settings": { + "$ref": "#/definitions/customer_balance_customer_balance_settings" + } + }, + "required": ["customer", "livemode", "object", "settings"], + "title": "cash_balance", + "type": "object", + "x-expandableFields": ["settings"], + "x-resourceId": "cash_balance" + }, + "charge": { + "description": "To charge a credit or a debit card, you create a `Charge` object. You can\nretrieve and refund individual charges as well as list all charges. Charges\nare identified by a unique, random ID.\n\nRelated guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_captured": { + "description": "Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).", + "type": "integer" + }, + "amount_refunded": { + "description": "Amount in %s 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": "#/definitions/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + } + ] + } + }, + "application_fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application_fee" + }, + { + "type": "null" + } + ], + "description": "The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application_fee" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.", + "type": ["integer", "null"] + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "billing_details": { + "$ref": "#/definitions/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.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 40000, + "type": ["string", "null"] + }, + "disputed": { + "description": "Whether the charge has been disputed.", + "type": "boolean" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "failure_message": { + "description": "Message to user further explaining reason for charge failure if available.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fraud_details": { + "anyOf": [ + { + "$ref": "#/definitions/charge_fraud_details" + }, + { + "type": "null" + } + ], + "description": "Information on fraud assessments for the charge." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice this charge is for if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["charge"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/definitions/charge_outcome" + }, + { + "type": "null" + } + ], + "description": "Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details." + }, + "paid": { + "description": "`true` if the charge succeeded, or was successfully authorized for later capture.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent associated with this charge, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "payment_method": { + "description": "ID of the payment method used in this charge.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Details about the payment method at the time of the transaction." + }, + "radar_options": { + "$ref": "#/definitions/radar_radar_options" + }, + "receipt_email": { + "description": "This is the email address that the receipt for this charge was sent to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/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", "null"], + "x-expandableFields": ["data"] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this charge if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/review" + } + ] + } + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/definitions/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for the charge." + }, + "source_transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/transfer" + }, + { + "type": "null" + } + ], + "description": "The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/transfer" + } + ] + } + }, + "statement_descriptor": { + "description": "For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "statement_descriptor_suffix": { + "description": "Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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": "#/definitions/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": "#/definitions/transfer" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/charge_transfer_data" + }, + { + "type": "null" + } + ], + "description": "An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details." + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "amount_captured", + "amount_refunded", + "billing_details", + "captured", + "created", + "currency", + "disputed", + "id", + "livemode", + "metadata", + "object", + "paid", + "refunded", + "status" + ], + "title": "Charge", + "type": "object", + "x-expandableFields": [ + "application", + "application_fee", + "balance_transaction", + "billing_details", + "customer", + "failure_balance_transaction", + "fraud_details", + "invoice", + "on_behalf_of", + "outcome", + "payment_intent", + "payment_method_details", + "radar_options", + "refunds", + "review", + "shipping", + "source_transfer", + "transfer", + "transfer_data" + ], + "x-resourceId": "charge" + }, + "charge_fraud_details": { + "description": "", + "properties": { + "stripe_report": { + "description": "Assessments from Stripe. If set, the value is `fraudulent`.", + "maxLength": 5000, + "type": "string" + }, + "user_report": { + "description": "Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "ChargeFraudDetails", + "type": "object", + "x-expandableFields": [] + }, + "charge_outcome": { + "description": "", + "properties": { + "network_status": { + "description": "Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as \"pending\" on a cardholder's statement.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "reason": { + "description": "An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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": "#/definitions/rule" + } + ], + "description": "The ID of the Radar rule that matched the payment, if applicable.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "type": { + "description": "Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "ChargeOutcome", + "type": "object", + "x-expandableFields": ["rule"] + }, + "charge_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.", + "type": ["integer", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/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": "#/definitions/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "ChargeTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "checkout.session": { + "description": "A Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)\nor [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a\nnew Session each time your customer attempts to pay.\n\nOnce payment is successful, the Checkout Session will contain a reference\nto the [Customer](https://stripe.com/docs/api/customers), and either the successful\n[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active\n[Subscription](https://stripe.com/docs/api/subscriptions).\n\nYou can create a Checkout Session on your server and redirect to its URL\nto begin Checkout.\n\nRelated guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).", + "properties": { + "after_expiration": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_after_expiration" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for actions to take if this Checkout Session expires." + }, + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes.", + "type": ["boolean", "null"] + }, + "amount_subtotal": { + "description": "Total of all items before discounts or taxes are applied.", + "type": ["integer", "null"] + }, + "amount_total": { + "description": "Total of all items after discounts and taxes are applied.", + "type": ["integer", "null"] + }, + "automatic_tax": { + "$ref": "#/definitions/payment_pages_checkout_session_automatic_tax" + }, + "billing_address_collection": { + "description": "Describes whether Checkout should collect the customer's billing address.", + "enum": ["auto", "required", null], + "type": ["string", "null"] + }, + "cancel_url": { + "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "client_reference_id": { + "description": "A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "consent": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_consent" + }, + { + "type": "null" + } + ], + "description": "Results of `consent_collection` for this session." + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the Checkout Session to gather active consent from customers." + }, + "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).", + "type": ["string", "null"] + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/definitions/payment_pages_checkout_session_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/definitions/payment_pages_checkout_session_custom_text" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer for this Session.\nFor Checkout Sessions in `payment` or `subscription` mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "customer_creation": { + "description": "Configure whether a Checkout Session creates a Customer when the Checkout Session completes.", + "enum": ["always", "if_required", null], + "type": ["string", "null"] + }, + "customer_details": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_customer_details" + }, + { + "type": "null" + } + ], + "description": "The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode." + }, + "customer_email": { + "description": "If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the `customer` attribute.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "expires_at": { + "description": "The timestamp at which the Checkout Session will expire.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice created by the Checkout Session, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Details on the state of invoice creation for the Checkout Session." + }, + "line_items": { + "description": "The line items purchased by the customer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentPagesCheckoutSessionListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locale": { + "description": "The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.", + "enum": [ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "mode": { + "description": "The mode of the Checkout Session.", + "enum": ["payment", "setup", "subscription"], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["checkout.session"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the PaymentIntent for Checkout Sessions in `payment` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "payment_link": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_link" + }, + { + "type": "null" + } + ], + "description": "The ID of the Payment Link that created this Session.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_link" + } + ] + } + }, + "payment_method_collection": { + "description": "Configure whether a Checkout Session should collect a payment method.", + "enum": ["always", "if_required", null], + "type": ["string", "null"] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/definitions/checkout_session_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession." + }, + "payment_method_types": { + "description": "A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "payment_status": { + "description": "The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.\nYou can use this value to decide when to fulfill your customer's order.", + "enum": ["no_payment_required", "paid", "unpaid"], + "type": "string" + }, + "phone_number_collection": { + "$ref": "#/definitions/payment_pages_checkout_session_phone_number_collection" + }, + "recovered_from": { + "description": "The ID of the original expired Checkout Session that triggered the recovery flow.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_intent" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupIntent for Checkout Sessions in `setup` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_intent" + } + ] + } + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for Checkout to collect a shipping address from a customer." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the customer cost of shipping, including the customer chosen ShippingRate." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/definitions/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this Checkout Session." + }, + "shipping_options": { + "description": "The shipping rate options applied to this Session.", + "items": { + "$ref": "#/definitions/payment_pages_checkout_session_shipping_option" + }, + "type": "array" + }, + "status": { + "description": "The status of the Checkout Session, one of `open`, `complete`, or `expired`.", + "enum": ["complete", "expired", "open", null], + "type": ["string", "null"] + }, + "submit_type": { + "description": "Describes the type of transaction being performed by Checkout in order to customize\nrelevant text on the page, such as the submit button. `submit_type` can only be\nspecified on Checkout Sessions in `payment` mode, but not Checkout Sessions\nin `subscription` or `setup` mode.", + "enum": ["auto", "book", "donate", "pay", null], + "type": ["string", "null"] + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription" + }, + { + "type": "null" + } + ], + "description": "The ID of the subscription for Checkout Sessions in `subscription` mode.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/subscription" + } + ] + } + }, + "success_url": { + "description": "The URL the customer will be directed to after the payment or\nsubscription creation is successful.", + "maxLength": 5000, + "type": "string" + }, + "tax_id_collection": { + "$ref": "#/definitions/payment_pages_checkout_session_tax_id_collection" + }, + "total_details": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_total_details" + }, + { + "type": "null" + } + ], + "description": "Tax and discount details for the computed total amount." + }, + "url": { + "description": "The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`\nThis value is only present when the session is active.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "automatic_tax", + "created", + "custom_fields", + "custom_text", + "expires_at", + "id", + "livemode", + "mode", + "object", + "payment_method_types", + "payment_status", + "shipping_options", + "success_url" + ], + "title": "Session", + "type": "object", + "x-expandableFields": [ + "after_expiration", + "automatic_tax", + "consent", + "consent_collection", + "custom_fields", + "custom_text", + "customer", + "customer_details", + "invoice", + "invoice_creation", + "line_items", + "payment_intent", + "payment_link", + "payment_method_options", + "phone_number_collection", + "setup_intent", + "shipping_address_collection", + "shipping_cost", + "shipping_details", + "shipping_options", + "subscription", + "tax_id_collection", + "total_details" + ], + "x-resourceId": "checkout.session" + }, + "checkout_acss_debit_mandate_options": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.", + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic", null], + "type": ["string", "null"] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal", null], + "type": ["string", "null"] + } + }, + "title": "CheckoutAcssDebitMandateOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_acss_debit_payment_method_options": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account. Returned when the Session is in `setup` mode.", + "enum": ["cad", "usd"], + "type": "string" + }, + "mandate_options": { + "$ref": "#/definitions/checkout_acss_debit_mandate_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutAcssDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "checkout_affirm_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAffirmPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_afterpay_clearpay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAfterpayClearpayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_alipay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAlipayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_au_becs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutAuBecsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bacs_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "CheckoutBacsDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_bancontact_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutBancontactPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_boleto_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "CheckoutBoletoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_installments_options": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates if installments are enabled", + "type": "boolean" + } + }, + "title": "CheckoutCardInstallmentsOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_card_payment_method_options": { + "description": "", + "properties": { + "installments": { + "$ref": "#/definitions/checkout_card_installments_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "CheckoutCardPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["installments"] + }, + "checkout_customer_balance_bank_transfer_payment_method_options": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/definitions/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": ["iban", "sepa", "sort_code", "spei", "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutCustomerBalanceBankTransferPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"] + }, + "checkout_customer_balance_payment_method_options": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/definitions/checkout_customer_balance_bank_transfer_payment_method_options" + }, + "funding_type": { + "description": "The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.", + "enum": ["bank_transfer", null], + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutCustomerBalancePaymentMethodOptions", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "checkout_eps_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutEpsPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_fpx_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutFpxPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_giropay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutGiropayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_grab_pay_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutGrabPayPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_ideal_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutIdealPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_klarna_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "CheckoutKlarnaPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_konbini_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.", + "type": ["integer", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutKonbiniPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_oxxo_payment_method_options": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "CheckoutOxxoPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_p24_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutP24PaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_paynow_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutPaynowPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_pix_payment_method_options": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds after which Pix payment will expire.", + "type": ["integer", "null"] + } + }, + "title": "CheckoutPixPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_sepa_debit_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "CheckoutSepaDebitPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_session_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/definitions/checkout_acss_debit_payment_method_options" + }, + "affirm": { + "$ref": "#/definitions/checkout_affirm_payment_method_options" + }, + "afterpay_clearpay": { + "$ref": "#/definitions/checkout_afterpay_clearpay_payment_method_options" + }, + "alipay": { + "$ref": "#/definitions/checkout_alipay_payment_method_options" + }, + "au_becs_debit": { + "$ref": "#/definitions/checkout_au_becs_debit_payment_method_options" + }, + "bacs_debit": { + "$ref": "#/definitions/checkout_bacs_debit_payment_method_options" + }, + "bancontact": { + "$ref": "#/definitions/checkout_bancontact_payment_method_options" + }, + "boleto": { + "$ref": "#/definitions/checkout_boleto_payment_method_options" + }, + "card": { + "$ref": "#/definitions/checkout_card_payment_method_options" + }, + "customer_balance": { + "$ref": "#/definitions/checkout_customer_balance_payment_method_options" + }, + "eps": { + "$ref": "#/definitions/checkout_eps_payment_method_options" + }, + "fpx": { + "$ref": "#/definitions/checkout_fpx_payment_method_options" + }, + "giropay": { + "$ref": "#/definitions/checkout_giropay_payment_method_options" + }, + "grabpay": { + "$ref": "#/definitions/checkout_grab_pay_payment_method_options" + }, + "ideal": { + "$ref": "#/definitions/checkout_ideal_payment_method_options" + }, + "klarna": { + "$ref": "#/definitions/checkout_klarna_payment_method_options" + }, + "konbini": { + "$ref": "#/definitions/checkout_konbini_payment_method_options" + }, + "oxxo": { + "$ref": "#/definitions/checkout_oxxo_payment_method_options" + }, + "p24": { + "$ref": "#/definitions/checkout_p24_payment_method_options" + }, + "paynow": { + "$ref": "#/definitions/checkout_paynow_payment_method_options" + }, + "pix": { + "$ref": "#/definitions/checkout_pix_payment_method_options" + }, + "sepa_debit": { + "$ref": "#/definitions/checkout_sepa_debit_payment_method_options" + }, + "sofort": { + "$ref": "#/definitions/checkout_sofort_payment_method_options" + }, + "us_bank_account": { + "$ref": "#/definitions/checkout_us_bank_account_payment_method_options" + } + }, + "title": "CheckoutSessionPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "checkout_sofort_payment_method_options": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "CheckoutSofortPaymentMethodOptions", + "type": "object", + "x-expandableFields": [] + }, + "checkout_us_bank_account_payment_method_options": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/definitions/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "CheckoutUsBankAccountPaymentMethodOptions", + "type": "object", + "x-expandableFields": ["financial_connections"] + }, + "connect_collection_transfer": { + "description": "", + "properties": { + "amount": { + "description": "Amount transferred, in %s.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "ID of the account that funds are being collected for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["connect_collection_transfer"], + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "destination", + "id", + "livemode", + "object" + ], + "title": "ConnectCollectionTransfer", + "type": "object", + "x-expandableFields": ["destination"] + }, + "country_spec": { + "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", + "properties": { + "default_currency": { + "description": "The default currency for this country. This applies to both payment methods and bank accounts.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object. Represented as the ISO country code for this country.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["country_spec"], + "type": "string" + }, + "supported_bank_account_currencies": { + "additionalProperties": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "description": "Currencies that can be accepted in the specific country (for transfers).", + "type": "object" + }, + "supported_payment_currencies": { + "description": "Currencies that can be accepted in the specified country (for payments).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_payment_methods": { + "description": "Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "supported_transfer_countries": { + "description": "Countries that can accept transfers from the specified country.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "verification_fields": { + "$ref": "#/definitions/country_spec_verification_fields" + } + }, + "required": [ + "default_currency", + "id", + "object", + "supported_bank_account_currencies", + "supported_payment_currencies", + "supported_payment_methods", + "supported_transfer_countries", + "verification_fields" + ], + "title": "CountrySpec", + "type": "object", + "x-expandableFields": ["verification_fields"], + "x-resourceId": "country_spec" + }, + "country_spec_verification_field_details": { + "description": "", + "properties": { + "additional": { + "description": "Additional fields which are only required for some users.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "minimum": { + "description": "Fields which every account must eventually provide.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["additional", "minimum"], + "title": "CountrySpecVerificationFieldDetails", + "type": "object", + "x-expandableFields": [] + }, + "country_spec_verification_fields": { + "description": "", + "properties": { + "company": { + "$ref": "#/definitions/country_spec_verification_field_details" + }, + "individual": { + "$ref": "#/definitions/country_spec_verification_field_details" + } + }, + "required": ["company", "individual"], + "title": "CountrySpecVerificationFields", + "type": "object", + "x-expandableFields": ["company", "individual"] + }, + "coupon": { + "description": "A coupon contains information about a percent-off or amount-off discount you\nmight want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),\n[checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": ["integer", "null"] + }, + "applies_to": { + "$ref": "#/definitions/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.", + "type": ["string", "null"] + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/definitions/coupon_currency_option" + }, + "description": "Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + }, + "duration": { + "description": "One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.", + "enum": ["forever", "once", "repeating"], + "type": "string", + "x-stripeBypassValidation": true + }, + "duration_in_months": { + "description": "If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.", + "type": ["integer", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.", + "type": ["integer", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "name": { + "description": "Name of the coupon displayed to customers on for instance invoices or receipts.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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 %s100 invoice %s50 instead.", + "type": ["number", "null"] + }, + "redeem_by": { + "description": "Date after which the coupon can no longer be redeemed.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "times_redeemed": { + "description": "Number of times this coupon has been applied to a customer.", + "type": "integer" + }, + "valid": { + "description": "Taking account of the above properties, whether this coupon can still be applied to a customer.", + "type": "boolean" + } + }, + "required": [ + "created", + "duration", + "id", + "livemode", + "object", + "times_redeemed", + "valid" + ], + "title": "Coupon", + "type": "object", + "x-expandableFields": ["applies_to", "currency_options"], + "x-resourceId": "coupon" + }, + "coupon_applies_to": { + "description": "", + "properties": { + "products": { + "description": "A list of product IDs this coupon applies to", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["products"], + "title": "CouponAppliesTo", + "type": "object", + "x-expandableFields": [] + }, + "coupon_currency_option": { + "description": "", + "properties": { + "amount_off": { + "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", + "type": "integer" + } + }, + "required": ["amount_off"], + "title": "CouponCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "credit_note": { + "description": "Issue a credit note to adjust an invoice's amount after the invoice is finalized.\n\nRelated guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).", + "properties": { + "amount": { + "description": "The integer amount in %s representing the total amount of the credit note, including tax.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "customer_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer_balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Customer balance transaction related to this credit note.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer_balance_transaction" + } + ] + } + }, + "discount_amount": { + "description": "The integer amount in %s representing the total amount of discount that was credited.", + "type": "integer" + }, + "discount_amounts": { + "description": "The aggregate amounts calculated per discount for all line items.", + "items": { + "$ref": "#/definitions/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + } + ], + "description": "ID of the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "lines": { + "description": "Line items that make up the credit note", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/credit_note_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "CreditNoteLinesList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "memo": { + "description": "Customer-facing text that appears on the credit note PDF.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "number": { + "description": "A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["credit_note"], + "type": "string" + }, + "out_of_band_amount": { + "description": "Amount that was credited outside of Stripe.", + "type": ["integer", "null"] + }, + "pdf": { + "description": "The link to download the PDF of the credit note.", + "maxLength": 5000, + "type": "string" + }, + "reason": { + "description": "Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`", + "enum": [ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory", + null + ], + "type": ["string", "null"] + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/refund" + }, + { + "type": "null" + } + ], + "description": "Refund related to this credit note.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/refund" + } + ] + } + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/definitions/invoices_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied to the invoice." + }, + "status": { + "description": "Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).", + "enum": ["issued", "void"], + "type": "string" + }, + "subtotal": { + "description": "The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.", + "type": ["integer", "null"] + }, + "tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/definitions/credit_note_tax_amount" + }, + "type": "array" + }, + "total": { + "description": "The integer amount in %s representing the total amount of the credit note, including tax and all discount.", + "type": "integer" + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.", + "type": ["integer", "null"] + }, + "type": { + "description": "Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.", + "enum": ["post_payment", "pre_payment"], + "type": "string" + }, + "voided_at": { + "description": "The time that the credit note was voided.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": [ + "amount", + "amount_shipping", + "created", + "currency", + "customer", + "discount_amount", + "discount_amounts", + "id", + "invoice", + "lines", + "livemode", + "number", + "object", + "pdf", + "status", + "subtotal", + "tax_amounts", + "total", + "type" + ], + "title": "CreditNote", + "type": "object", + "x-expandableFields": [ + "customer", + "customer_balance_transaction", + "discount_amounts", + "invoice", + "lines", + "refund", + "shipping_cost", + "tax_amounts" + ], + "x-resourceId": "credit_note" + }, + "credit_note_line_item": { + "description": "", + "properties": { + "amount": { + "description": "The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.", + "type": ["integer", "null"] + }, + "description": { + "description": "Description of the item being credited.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "discount_amount": { + "description": "The integer amount in %s representing the discount being credited for this line item.", + "type": "integer" + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item", + "items": { + "$ref": "#/definitions/discounts_resource_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_item": { + "description": "ID of the invoice line item being credited", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["credit_note_line_item"], + "type": "string" + }, + "quantity": { + "description": "The number of units of product being credited.", + "type": ["integer", "null"] + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/definitions/credit_note_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/definitions/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.", + "enum": ["custom_line_item", "invoice_line_item"], + "type": "string" + }, + "unit_amount": { + "description": "The cost of each unit of product being credited.", + "type": ["integer", "null"] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.", + "format": "decimal", + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "discount_amount", + "discount_amounts", + "id", + "livemode", + "object", + "tax_amounts", + "tax_rates", + "type" + ], + "title": "CreditNoteLineItem", + "type": "object", + "x-expandableFields": ["discount_amounts", "tax_amounts", "tax_rates"], + "x-resourceId": "credit_note_line_item" + }, + "credit_note_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_rate" + } + ] + } + } + }, + "required": ["amount", "inclusive", "tax_rate"], + "title": "CreditNoteTaxAmount", + "type": "object", + "x-expandableFields": ["tax_rate"] + }, + "currency_option": { + "description": "", + "properties": { + "custom_unit_amount": { + "anyOf": [ + { + "$ref": "#/definitions/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "tax_behavior": { + "description": "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", null], + "type": ["string", "null"] + }, + "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": "#/definitions/price_tier" + }, + "type": "array" + }, + "unit_amount": { + "description": "The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": ["integer", "null"] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": ["string", "null"] + } + }, + "title": "CurrencyOption", + "type": "object", + "x-expandableFields": ["custom_unit_amount", "tiers"] + }, + "custom_unit_amount": { + "description": "", + "properties": { + "maximum": { + "description": "The maximum unit amount the customer can specify for this item.", + "type": ["integer", "null"] + }, + "minimum": { + "description": "The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.", + "type": ["integer", "null"] + }, + "preset": { + "description": "The starting unit amount which can be updated by the customer.", + "type": ["integer", "null"] + } + }, + "title": "CustomUnitAmount", + "type": "object", + "x-expandableFields": [] + }, + "customer": { + "description": "This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.\n\nRelated guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address." + }, + "balance": { + "description": "Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "type": "integer" + }, + "cash_balance": { + "anyOf": [ + { + "$ref": "#/definitions/cash_balance" + }, + { + "type": "null" + } + ], + "description": "The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source \"cash_balance\". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically." + }, + "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, + "type": ["string", "null"] + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the customer.\n\nIf you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "delinquent": { + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.\n\nIf an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.", + "type": ["boolean", "null"] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/definitions/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount active on the customer, if there is one." + }, + "email": { + "description": "The customer's email address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_credit_balance": { + "additionalProperties": { + "type": "integer" + }, + "description": "The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.", + "type": "object" + }, + "invoice_prefix": { + "description": "The prefix for the customer used to generate unique invoice numbers.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "invoice_settings": { + "$ref": "#/definitions/invoice_setting_customer_setting" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "next_invoice_sequence": { + "description": "The suffix of the customer's next invoice number, e.g., 0001.", + "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, + "type": ["string", "null"] + }, + "preferred_locales": { + "description": "The customer's preferred locales (languages), ordered by preference.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/definitions/shipping" + }, + { + "type": "null" + } + ], + "description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer." + }, + "sources": { + "description": "The customer's payment sources, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + } + ], + "title": "Polymorphic", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "ApmsSourcesSourceList", + "type": "object", + "x-expandableFields": ["data"] + }, + "subscriptions": { + "description": "The customer's current subscriptions, if any.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/subscription" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionList", + "type": "object", + "x-expandableFields": ["data"] + }, + "tax": { + "$ref": "#/definitions/customer_tax" + }, + "tax_exempt": { + "description": "Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **\"Reverse charge\"**.", + "enum": ["exempt", "none", "reverse", null], + "type": ["string", "null"] + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/tax_id" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TaxIDsList", + "type": "object", + "x-expandableFields": ["data"] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this customer belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/test_helpers.test_clock" + } + ] + } + } + }, + "required": ["created", "id", "livemode", "object"], + "title": "Customer", + "type": "object", + "x-expandableFields": [ + "address", + "cash_balance", + "default_source", + "discount", + "invoice_settings", + "shipping", + "sources", + "subscriptions", + "tax", + "tax_ids", + "test_clock" + ], + "x-resourceId": "customer" + }, + "customer_acceptance": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time at which the customer accepted the Mandate.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "offline": { + "$ref": "#/definitions/offline_acceptance" + }, + "online": { + "$ref": "#/definitions/online_acceptance" + }, + "type": { + "description": "The type of customer acceptance information included with the Mandate. One of `online` or `offline`.", + "enum": ["offline", "online"], + "type": "string" + } + }, + "required": ["type"], + "title": "customer_acceptance", + "type": "object", + "x-expandableFields": ["offline", "online"] + }, + "customer_balance_customer_balance_settings": { + "description": "", + "properties": { + "reconciliation_mode": { + "description": "The configuration for how funds that land in the customer cash balance are reconciled.", + "enum": ["automatic", "manual"], + "type": "string" + }, + "using_merchant_default": { + "description": "A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance", + "type": "boolean" + } + }, + "required": ["reconciliation_mode", "using_merchant_default"], + "title": "CustomerBalanceCustomerBalanceSettings", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + } + }, + "required": ["payment_intent"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction", + "type": "object", + "x-expandableFields": ["payment_intent"] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/definitions/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer" + } + }, + "required": ["bank_transfer"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/definitions/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer" + }, + "reference": { + "description": "The user-supplied reference field on the bank transfer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "type": { + "description": "The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer", + "type": "object", + "x-expandableFields": ["eu_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, + "type": ["string", "null"] + }, + "iban_last4": { + "description": "The last 4 digits of the IBAN of the sender of the funding.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "sender_name": { + "description": "The full name of the sender, as supplied by the sending bank.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer", + "type": "object", + "x-expandableFields": [] + }, + "customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction": { + "description": "", + "properties": { + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/refund" + } + ], + "description": "The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/refund" + } + ] + } + } + }, + "required": ["refund"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction", + "type": "object", + "x-expandableFields": ["refund"] + }, + "customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction": { + "description": "", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + } + ], + "description": "The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + } + }, + "required": ["payment_intent"], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction", + "type": "object", + "x-expandableFields": ["payment_intent"] + }, + "customer_balance_transaction": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,\nwhich denotes a debit or credit that's automatically applied to their next invoice upon finalization.\nYou may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),\nor by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.\n\nRelated guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.", + "properties": { + "amount": { + "description": "The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "credit_note": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/credit_note" + }, + { + "type": "null" + } + ], + "description": "The ID of the credit note (if any) related to the transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/credit_note" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + } + ], + "description": "The ID of the customer the transaction belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "ending_balance": { + "description": "The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the invoice (if any) related to the transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer_balance_transaction"], + "type": "string" + }, + "type": { + "description": "Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.", + "enum": [ + "adjustment", + "applied_to_invoice", + "credit_note", + "initial", + "invoice_overpaid", + "invoice_too_large", + "invoice_too_small", + "migration", + "unapplied_from_invoice", + "unspent_receiver_credit" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "object", + "type" + ], + "title": "CustomerBalanceTransaction", + "type": "object", + "x-expandableFields": ["credit_note", "customer", "invoice"], + "x-resourceId": "customer_balance_transaction" + }, + "customer_cash_balance_transaction": { + "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", + "properties": { + "applied_to_payment": { + "$ref": "#/definitions/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": "#/definitions/customer" + } + ], + "description": "The customer whose available cash balance changed as a result of this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + } + ] + } + }, + "ending_balance": { + "description": "The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "funded": { + "$ref": "#/definitions/customer_balance_resource_cash_balance_transaction_resource_funded_transaction" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "net_amount": { + "description": "The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer_cash_balance_transaction"], + "type": "string" + }, + "refunded_from_payment": { + "$ref": "#/definitions/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction" + }, + "type": { + "description": "The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.", + "enum": [ + "applied_to_payment", + "funded", + "funding_reversed", + "refunded_from_payment", + "return_canceled", + "return_initiated", + "unapplied_from_payment" + ], + "type": "string" + }, + "unapplied_from_payment": { + "$ref": "#/definitions/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction" + } + }, + "required": [ + "created", + "currency", + "customer", + "ending_balance", + "id", + "livemode", + "net_amount", + "object", + "type" + ], + "title": "CustomerCashBalanceTransaction", + "type": "object", + "x-expandableFields": [ + "applied_to_payment", + "customer", + "funded", + "refunded_from_payment", + "unapplied_from_payment" + ], + "x-resourceId": "customer_cash_balance_transaction" + }, + "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, + "type": ["string", "null"] + }, + "location": { + "anyOf": [ + { + "$ref": "#/definitions/customer_tax_location" + }, + { + "type": "null" + } + ], + "description": "The customer's location as identified by Stripe Tax." + } + }, + "required": ["automatic_tax"], + "title": "CustomerTax", + "type": "object", + "x-expandableFields": ["location"] + }, + "customer_tax_location": { + "description": "", + "properties": { + "country": { + "description": "The customer's country as identified by Stripe Tax.", + "maxLength": 5000, + "type": "string" + }, + "source": { + "description": "The data source used to infer the customer's location.", + "enum": [ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination" + ], + "type": "string" + }, + "state": { + "description": "The customer's state, county, province, or region as identified by Stripe Tax.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["country", "source"], + "title": "CustomerTaxLocation", + "type": "object", + "x-expandableFields": [] + }, + "deleted_account": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["account"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedAccount", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_account" + }, + "deleted_apple_pay_domain": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["apple_pay_domain"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedApplePayDomain", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_apple_pay_domain" + }, + "deleted_application": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The name of the application.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["application"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedApplication", + "type": "object", + "x-expandableFields": [] + }, + "deleted_bank_account": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["bank_account"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "deleted_card": { + "description": "", + "properties": { + "currency": { + "description": "Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["card"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedCard", + "type": "object", + "x-expandableFields": [] + }, + "deleted_coupon": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["coupon"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedCoupon", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_coupon" + }, + "deleted_customer": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["customer"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedCustomer", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_customer" + }, + "deleted_discount": { + "description": "", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "coupon": { + "$ref": "#/definitions/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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": "#/definitions/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["coupon", "deleted", "id", "object", "start"], + "title": "DeletedDiscount", + "type": "object", + "x-expandableFields": ["coupon", "customer", "promotion_code"], + "x-resourceId": "deleted_discount" + }, + "deleted_external_account": { + "anyOf": [ + { + "$ref": "#/definitions/deleted_bank_account" + }, + { + "$ref": "#/definitions/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_external_account", + "x-stripeBypassValidation": true + }, + "deleted_invoice": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoice"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedInvoice", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoice" + }, + "deleted_invoiceitem": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoiceitem"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedInvoiceItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_invoiceitem" + }, + "deleted_payment_source": { + "anyOf": [ + { + "$ref": "#/definitions/deleted_bank_account" + }, + { + "$ref": "#/definitions/deleted_card" + } + ], + "title": "Polymorphic", + "x-resourceId": "deleted_payment_source", + "x-stripeBypassValidation": true + }, + "deleted_person": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["person"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedPerson", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_person" + }, + "deleted_plan": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["plan"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedPlan", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_plan" + }, + "deleted_price": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["price"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedPrice", + "type": "object", + "x-expandableFields": [] + }, + "deleted_product": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["product"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedProduct", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_product" + }, + "deleted_radar.value_list": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "RadarListDeletedList", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list" + }, + "deleted_radar.value_list_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list_item"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "RadarListDeletedListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_radar.value_list_item" + }, + "deleted_subscription_item": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["subscription_item"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedSubscriptionItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_subscription_item" + }, + "deleted_tax_id": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_id"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "deleted_tax_id", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_tax_id" + }, + "deleted_terminal.configuration": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.configuration"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "TerminalConfigurationDeletedConfiguration", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.configuration" + }, + "deleted_terminal.location": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.location"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "TerminalLocationDeletedLocation", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.location" + }, + "deleted_terminal.reader": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.reader"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "TerminalReaderDeletedReader", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_terminal.reader" + }, + "deleted_test_helpers.test_clock": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["test_helpers.test_clock"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "DeletedTestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_test_helpers.test_clock" + }, + "deleted_webhook_endpoint": { + "description": "", + "properties": { + "deleted": { + "description": "Always true for a deleted object", + "enum": [true], + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["webhook_endpoint"], + "type": "string" + } + }, + "required": ["deleted", "id", "object"], + "title": "NotificationWebhookEndpointDeleted", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "deleted_webhook_endpoint" + }, + "discount": { + "description": "A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).", + "properties": { + "checkout_session": { + "description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "coupon": { + "$ref": "#/definitions/coupon" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer associated with this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "end": { + "description": "If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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": "#/definitions/promotion_code" + }, + { + "type": "null" + } + ], + "description": "The promotion code applied to create this discount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/promotion_code" + } + ] + } + }, + "start": { + "description": "Date that the coupon was applied.", + "format": "unix-time", + "type": "integer" + }, + "subscription": { + "description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["coupon", "id", "object", "start"], + "title": "Discount", + "type": "object", + "x-expandableFields": ["coupon", "customer", "promotion_code"], + "x-resourceId": "discount" + }, + "discounts_resource_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the discount.", + "type": "integer" + }, + "discount": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/discount" + }, + { + "$ref": "#/definitions/deleted_discount" + } + ], + "description": "The discount that was applied to get this discount amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/discount" + }, + { + "$ref": "#/definitions/deleted_discount" + } + ] + } + } + }, + "required": ["amount", "discount"], + "title": "DiscountsResourceDiscountAmount", + "type": "object", + "x-expandableFields": ["discount"] + }, + "dispute": { + "description": "A dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you're given the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate. You can find more\ninformation about the dispute process in our [Disputes and\nFraud](/docs/disputes) documentation.\n\nRelated guide: [Disputes and Fraud](https://stripe.com/docs/disputes).", + "properties": { + "amount": { + "description": "Disputed amount. Usually the amount of the charge, but 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": "#/definitions/balance_transaction" + }, + "type": "array" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + } + ], + "description": "ID of the charge that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "evidence": { + "$ref": "#/definitions/dispute_evidence" + }, + "evidence_details": { + "$ref": "#/definitions/dispute_evidence_details" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_charge_refundable": { + "description": "If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.", + "type": "boolean" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["dispute"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.", + "enum": [ + "charge_refunded", + "lost", + "needs_response", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won" + ], + "type": "string" + } + }, + "required": [ + "amount", + "balance_transactions", + "charge", + "created", + "currency", + "evidence", + "evidence_details", + "id", + "is_charge_refundable", + "livemode", + "metadata", + "object", + "reason", + "status" + ], + "title": "Dispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "charge", + "evidence", + "evidence_details", + "payment_intent" + ], + "x-resourceId": "dispute" + }, + "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, + "type": ["string", "null"] + }, + "billing_address": { + "description": "The billing address provided by the customer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "cancellation_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "cancellation_policy_disclosure": { + "description": "An explanation of how and when the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": ["string", "null"] + }, + "cancellation_rebuttal": { + "description": "A justification for why the customer's subscription was not canceled.", + "maxLength": 150000, + "type": ["string", "null"] + }, + "customer_communication": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "customer_email_address": { + "description": "The email address of the customer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "customer_name": { + "description": "The name of the customer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "customer_purchase_ip": { + "description": "The IP address that the customer used when making the purchase.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "customer_signature": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "duplicate_charge_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "duplicate_charge_id": { + "description": "The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_description": { + "description": "A description of the product or service that was sold.", + "maxLength": 150000, + "type": ["string", "null"] + }, + "receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "refund_policy": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "refund_policy_disclosure": { + "description": "Documentation demonstrating that the customer was shown your refund policy prior to purchase.", + "maxLength": 150000, + "type": ["string", "null"] + }, + "refund_refusal_explanation": { + "description": "A justification for why the customer is not entitled to a refund.", + "maxLength": 150000, + "type": ["string", "null"] + }, + "service_date": { + "description": "The date on which the customer received or began receiving the purchased service, in a clear human-readable format.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "service_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "shipping_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "uncategorized_file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "uncategorized_text": { + "description": "Any additional evidence or statements.", + "maxLength": 150000, + "type": ["string", "null"] + } + }, + "title": "DisputeEvidence", + "type": "object", + "x-expandableFields": [ + "cancellation_policy", + "customer_communication", + "customer_signature", + "duplicate_charge_documentation", + "receipt", + "refund_policy", + "service_documentation", + "shipping_documentation", + "uncategorized_file" + ] + }, + "dispute_evidence_details": { + "description": "", + "properties": { + "due_by": { + "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "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": ["has_evidence", "past_due", "submission_count"], + "title": "DisputeEvidenceDetails", + "type": "object", + "x-expandableFields": [] + }, + "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": [] + }, + "ephemeral_key": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires": { + "description": "Time at which the key will expire. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["ephemeral_key"], + "type": "string" + }, + "secret": { + "description": "The key's secret. You can use this value to make authorized requests to the Stripe API.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["created", "expires", "id", "livemode", "object"], + "title": "EphemeralKey", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "ephemeral_key" + }, + "error": { + "description": "An error response from the Stripe API", + "properties": { + "error": { + "$ref": "#/definitions/api_errors" + } + }, + "required": ["error"], + "type": "object" + }, + "event": { + "description": "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent; and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a `charge.succeeded` event will contain a charge, and an\n`invoice.payment_failed` event will contain an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. Webhooks are managed\nin your\n[account settings](https://dashboard.stripe.com/account/webhooks),\nand our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional `account` attribute in the received `Event` object.\n\n**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is\nguaranteed only for 30 days.", + "properties": { + "account": { + "description": "The connected account that originated the event.", + "maxLength": 5000, + "type": "string" + }, + "api_version": { + "description": "The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data": { + "$ref": "#/definitions/notification_event_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["event"], + "type": "string" + }, + "pending_webhooks": { + "description": "Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.", + "type": "integer" + }, + "request": { + "anyOf": [ + { + "$ref": "#/definitions/notification_event_request" + }, + { + "type": "null" + } + ], + "description": "Information on the API request that instigated the event." + }, + "type": { + "description": "Description of the event (e.g., `invoice.created` or `charge.refunded`).", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data", + "id", + "livemode", + "object", + "pending_webhooks", + "type" + ], + "title": "NotificationEvent", + "type": "object", + "x-expandableFields": ["data", "request"], + "x-resourceId": "event" + }, + "exchange_rate": { + "description": "`Exchange Rate` objects allow you to determine the rates that Stripe is\ncurrently using to convert from one currency to another. Since this number is\nvariable throughout the day, there are various reasons why you might want to\nknow the current rate (for example, to dynamically price an item for a user\nwith a default payment in a foreign currency).\n\nIf you want a guarantee that the charge is made with a certain exchange rate\nyou expect is current, you can pass in `exchange_rate` to charges endpoints.\nIf the value is no longer up to date, the charge won't go through. Please\nrefer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more\ndetails.", + "properties": { + "id": { + "description": "Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["exchange_rate"], + "type": "string" + }, + "rates": { + "additionalProperties": { + "type": "number" + }, + "description": "Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.", + "type": "object" + } + }, + "required": ["id", "object", "rates"], + "title": "ExchangeRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "exchange_rate" + }, + "external_account": { + "anyOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + } + ], + "title": "Polymorphic", + "x-resourceId": "external_account", + "x-stripeBypassValidation": true + }, + "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, + "type": ["string", "null"] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "type": { + "description": "Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["amount", "currency", "type"], + "title": "Fee", + "type": "object", + "x-expandableFields": [] + }, + "fee_refund": { + "description": "`Application Fee Refund` objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.\n\nRelated guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "fee": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application_fee" + } + ], + "description": "ID of the application fee that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application_fee" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["fee_refund"], + "type": "string" + } + }, + "required": ["amount", "created", "currency", "fee", "id", "object"], + "title": "FeeRefund", + "type": "object", + "x-expandableFields": ["balance_transaction", "fee"], + "x-resourceId": "fee_refund" + }, + "file": { + "description": "This is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File Upload Guide](https://stripe.com/docs/file-upload).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "expires_at": { + "description": "The time at which the file expires and is no longer available in epoch seconds.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "filename": { + "description": "A filename for the file, suitable for saving to a filesystem.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "links": { + "description": "A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/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": "FileFileLinkList", + "type": ["object", "null"], + "x-expandableFields": ["data"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["file"], + "type": "string" + }, + "purpose": { + "description": "The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.", + "enum": [ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "identity_document", + "identity_document_downloadable", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_reader_splashscreen" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "size": { + "description": "The size in bytes of the file object.", + "type": "integer" + }, + "title": { + "description": "A user friendly title for the document.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "type": { + "description": "The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "url": { + "description": "The URL from which the file can be downloaded using your live secret API key.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["created", "id", "object", "purpose", "size"], + "title": "File", + "type": "object", + "x-expandableFields": ["links"], + "x-resourceId": "file" + }, + "file_link": { + "description": "To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that can be used 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": "Whether this link is already expired.", + "type": "boolean" + }, + "expires_at": { + "description": "Time at which the link expires.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "file": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + } + ], + "description": "The file object this link points to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["file_link"], + "type": "string" + }, + "url": { + "description": "The publicly accessible URL to download the file.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "created", + "expired", + "file", + "id", + "livemode", + "metadata", + "object" + ], + "title": "FileLink", + "type": "object", + "x-expandableFields": ["file"], + "x-resourceId": "file_link" + }, + "financial_connections.account": { + "description": "A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/definitions/bank_connections_resource_accountholder" + }, + { + "type": "null" + } + ], + "description": "The account holder that this account belongs to." + }, + "balance": { + "anyOf": [ + { + "$ref": "#/definitions/bank_connections_resource_balance" + }, + { + "type": "null" + } + ], + "description": "The most recent information about the account's balance." + }, + "balance_refresh": { + "anyOf": [ + { + "$ref": "#/definitions/bank_connections_resource_balance_refresh" + }, + { + "type": "null" + } + ], + "description": "The state of the most recent attempt to refresh the account balance." + }, + "category": { + "description": "The type of the account. Account category is further divided in `subcategory`.", + "enum": ["cash", "credit", "investment", "other"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "display_name": { + "description": "A human-readable name that has been assigned to this account, either by the account holder or by the institution.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "institution_name": { + "description": "The name of the institution that holds this account.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the account number. If present, this will be 4 numeric characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.account"], + "type": "string" + }, + "ownership": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/financial_connections.account_ownership" + }, + { + "type": "null" + } + ], + "description": "The most recent information about the account's owners.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/financial_connections.account_ownership" + } + ] + } + }, + "ownership_refresh": { + "anyOf": [ + { + "$ref": "#/definitions/bank_connections_resource_ownership_refresh" + }, + { + "type": "null" + } + ], + "description": "The state of the most recent attempt to refresh the account owners." + }, + "permissions": { + "description": "The list of permissions granted by this account.", + "items": { + "enum": ["balances", "ownership", "payment_method", "transactions"], + "type": "string" + }, + "type": ["array", "null"] + }, + "status": { + "description": "The status of the link to the account.", + "enum": ["active", "disconnected", "inactive"], + "type": "string" + }, + "subcategory": { + "description": "If `category` is `cash`, one of:\n\n - `checking`\n - `savings`\n - `other`\n\nIf `category` is `credit`, one of:\n\n - `mortgage`\n - `line_of_credit`\n - `credit_card`\n - `other`\n\nIf `category` is `investment` or `other`, this will be `other`.", + "enum": [ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "other", + "savings" + ], + "type": "string" + }, + "supported_payment_method_types": { + "description": "The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.", + "items": { + "enum": ["link", "us_bank_account"], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "category", + "created", + "id", + "institution_name", + "livemode", + "object", + "status", + "subcategory", + "supported_payment_method_types" + ], + "title": "BankConnectionsResourceLinkedAccount", + "type": "object", + "x-expandableFields": [ + "account_holder", + "balance", + "balance_refresh", + "ownership", + "ownership_refresh" + ], + "x-resourceId": "financial_connections.account" + }, + "financial_connections.account_owner": { + "description": "", + "properties": { + "email": { + "description": "The email address of the owner.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "name": { + "description": "The full name of the owner.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.account_owner"], + "type": "string" + }, + "ownership": { + "description": "The ownership object that this owner belongs to.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "The raw phone number of the owner.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "raw_address": { + "description": "The raw physical address of the owner.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "refreshed_at": { + "description": "The timestamp of the refresh that updated this owner.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": ["id", "name", "object", "ownership"], + "title": "BankConnectionsResourceOwner", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "financial_connections.account_owner" + }, + "financial_connections.account_ownership": { + "description": "Describes a snapshot of the owners of an account at a particular point in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.account_ownership"], + "type": "string" + }, + "owners": { + "description": "A paginated list of owners for this account.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/financial_connections.account_owner" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceOwnerList", + "type": "object", + "x-expandableFields": ["data"] + } + }, + "required": ["created", "id", "object", "owners"], + "title": "BankConnectionsResourceOwnership", + "type": "object", + "x-expandableFields": ["owners"] + }, + "financial_connections.session": { + "description": "A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.", + "properties": { + "account_holder": { + "anyOf": [ + { + "$ref": "#/definitions/bank_connections_resource_accountholder" + }, + { + "type": "null" + } + ], + "description": "The account holder for whom accounts are collected in this session." + }, + "accounts": { + "description": "The accounts that were collected as part of this Session.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/financial_connections.account" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/financial_connections/accounts", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "BankConnectionsResourceLinkedAccountList", + "type": "object", + "x-expandableFields": ["data"] + }, + "client_secret": { + "description": "A value that will be passed to the client to launch the authentication flow.", + "maxLength": 5000, + "type": "string" + }, + "filters": { + "$ref": "#/definitions/bank_connections_resource_link_account_session_filters" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["financial_connections.session"], + "type": "string" + }, + "permissions": { + "description": "Permissions requested for accounts collected during this session.", + "items": { + "enum": ["balances", "ownership", "payment_method", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "accounts", + "client_secret", + "id", + "livemode", + "object", + "permissions" + ], + "title": "BankConnectionsResourceLinkAccountSession", + "type": "object", + "x-expandableFields": ["account_holder", "accounts", "filters"], + "x-resourceId": "financial_connections.session" + }, + "financial_reporting_finance_report_run_run_parameters": { + "description": "", + "properties": { + "columns": { + "description": "The set of output columns requested for inclusion in the report run.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "connected_account": { + "description": "Connected account ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "currency": { + "description": "Currency of objects to be included in the report run.", + "type": "string" + }, + "interval_end": { + "description": "Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value.", + "format": "unix-time", + "type": "integer" + }, + "interval_start": { + "description": "Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value.", + "format": "unix-time", + "type": "integer" + }, + "payout": { + "description": "Payout ID by which to filter the report run.", + "maxLength": 5000, + "type": "string" + }, + "reporting_category": { + "description": "Category of balance transactions to be included in the report run.", + "maxLength": 5000, + "type": "string" + }, + "timezone": { + "description": "Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "FinancialReportingFinanceReportRunRunParameters", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions": { + "description": "Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is\nautomatically applied to future invoices and payments using the `customer_balance` payment method.\nCustomers can fund this balance by initiating a bank transfer to any account in the\n`financial_addresses` field.\nRelated guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more", + "properties": { + "bank_transfer": { + "$ref": "#/definitions/funding_instructions_bank_transfer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "funding_type": { + "description": "The `funding_type` of the returned instructions", + "enum": ["bank_transfer"], + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["funding_instructions"], + "type": "string" + } + }, + "required": [ + "bank_transfer", + "currency", + "funding_type", + "livemode", + "object" + ], + "title": "CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions", + "type": "object", + "x-expandableFields": ["bank_transfer"], + "x-resourceId": "funding_instructions" + }, + "funding_instructions_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The country of the bank account to fund", + "maxLength": 5000, + "type": "string" + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund a particular balance", + "items": { + "$ref": "#/definitions/funding_instructions_bank_transfer_financial_address" + }, + "type": "array" + }, + "type": { + "description": "The bank_transfer type", + "enum": ["eu_bank_transfer", "jp_bank_transfer"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["country", "financial_addresses", "type"], + "title": "FundingInstructionsBankTransfer", + "type": "object", + "x-expandableFields": ["financial_addresses"] + }, + "funding_instructions_bank_transfer_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "iban": { + "$ref": "#/definitions/funding_instructions_bank_transfer_iban_record" + }, + "sort_code": { + "$ref": "#/definitions/funding_instructions_bank_transfer_sort_code_record" + }, + "spei": { + "$ref": "#/definitions/funding_instructions_bank_transfer_spei_record" + }, + "supported_networks": { + "description": "The payment networks supported by this FinancialAddress", + "items": { + "enum": ["bacs", "fps", "sepa", "spei", "zengin"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": ["iban", "sort_code", "spei", "zengin"], + "type": "string", + "x-stripeBypassValidation": true + }, + "zengin": { + "$ref": "#/definitions/funding_instructions_bank_transfer_zengin_record" + } + }, + "required": ["type"], + "title": "FundingInstructionsBankTransferFinancialAddress", + "type": "object", + "x-expandableFields": ["iban", "sort_code", "spei", "zengin"] + }, + "funding_instructions_bank_transfer_iban_record": { + "description": "Iban Records contain E.U. bank account details per the SEPA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account", + "maxLength": 5000, + "type": "string" + }, + "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_name", "bic", "country", "iban"], + "title": "FundingInstructionsBankTransferIbanRecord", + "type": "object", + "x-expandableFields": [] + }, + "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_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" + }, + "sort_code": { + "description": "The six-digit sort code", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account_holder_name", "account_number", "sort_code"], + "title": "FundingInstructionsBankTransferSortCodeRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_spei_record": { + "description": "SPEI Records contain Mexico bank account details per the SPEI format.", + "properties": { + "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": ["bank_code", "bank_name", "clabe"], + "title": "FundingInstructionsBankTransferSpeiRecord", + "type": "object", + "x-expandableFields": [] + }, + "funding_instructions_bank_transfer_zengin_record": { + "description": "Zengin Records contain Japan bank account details per the Zengin format.", + "properties": { + "account_holder_name": { + "description": "The account holder name", + "maxLength": 5000, + "type": ["string", "null"] + }, + "account_number": { + "description": "The account number", + "maxLength": 5000, + "type": ["string", "null"] + }, + "account_type": { + "description": "The bank account type. In Japan, this can only be `futsu` or `toza`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_code": { + "description": "The bank code of the account", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_name": { + "description": "The bank name of the account", + "maxLength": 5000, + "type": ["string", "null"] + }, + "branch_code": { + "description": "The branch code of the account", + "maxLength": 5000, + "type": ["string", "null"] + }, + "branch_name": { + "description": "The branch name of the account", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "FundingInstructionsBankTransferZenginRecord", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_date_of_birth": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year.", + "type": ["integer", "null"] + } + }, + "title": "GelatoDataDocumentReportDateOfBirth", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_expiration_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year.", + "type": ["integer", "null"] + } + }, + "title": "GelatoDataDocumentReportExpirationDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_document_report_issued_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year.", + "type": ["integer", "null"] + } + }, + "title": "GelatoDataDocumentReportIssuedDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_id_number_report_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year.", + "type": ["integer", "null"] + } + }, + "title": "GelatoDataIdNumberReportDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_data_verified_outputs_date": { + "description": "Point in Time", + "properties": { + "day": { + "description": "Numerical day between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "Numerical month between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year.", + "type": ["integer", "null"] + } + }, + "title": "GelatoDataVerifiedOutputsDate", + "type": "object", + "x-expandableFields": [] + }, + "gelato_document_report": { + "description": "Result from a document check", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "Address as it appears in the document." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_data_document_report_date_of_birth" + }, + { + "type": "null" + } + ], + "description": "Date of birth as it appears in the document." + }, + "error": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_document_report_error" + }, + { + "type": "null" + } + ], + "description": "Details on the verification error. Present when status is `unverified`." + }, + "expiration_date": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_data_document_report_expiration_date" + }, + { + "type": "null" + } + ], + "description": "Expiration date of the document." + }, + "files": { + "description": "Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "first_name": { + "description": "First name as it appears in the document.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "issued_date": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_data_document_report_issued_date" + }, + { + "type": "null" + } + ], + "description": "Issued date of the document." + }, + "issuing_country": { + "description": "Issuing country of the document.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last_name": { + "description": "Last name as it appears in the document.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "number": { + "description": "Document ID number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "Status of this `document` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": { + "description": "Type of the document.", + "enum": ["driving_license", "id_card", "passport", null], + "type": ["string", "null"] + } + }, + "required": ["status"], + "title": "GelatoDocumentReport", + "type": "object", + "x-expandableFields": [ + "address", + "dob", + "error", + "expiration_date", + "issued_date" + ] + }, + "gelato_document_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "document_expired", + "document_type_not_supported", + "document_unverified_other", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "GelatoDocumentReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_id_number_report": { + "description": "Result from an id_number check", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_data_id_number_report_date" + }, + { + "type": "null" + } + ], + "description": "Date of birth." + }, + "error": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_id_number_report_error" + }, + { + "type": "null" + } + ], + "description": "Details on the verification error. Present when status is `unverified`." + }, + "first_name": { + "description": "First name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id_number": { + "description": "ID number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id_number_type": { + "description": "Type of ID number.", + "enum": ["br_cpf", "sg_nric", "us_ssn", null], + "type": ["string", "null"] + }, + "last_name": { + "description": "Last name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "Status of this `id_number` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status"], + "title": "GelatoIdNumberReport", + "type": "object", + "x-expandableFields": ["dob", "error"] + }, + "gelato_id_number_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + null + ], + "type": ["string", "null"] + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "GelatoIdNumberReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.", + "items": { + "enum": ["driving_license", "id_card", "passport"], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).", + "type": "boolean" + } + }, + "title": "GelatoReportDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_report_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoReportIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_selfie_report": { + "description": "Result from a selfie check", + "properties": { + "document": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "error": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_selfie_report_error" + }, + { + "type": "null" + } + ], + "description": "Details on the verification error. Present when status is `unverified`." + }, + "selfie": { + "description": "ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "Status of this `selfie` check.", + "enum": ["unverified", "verified"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status"], + "title": "GelatoSelfieReport", + "type": "object", + "x-expandableFields": ["error"] + }, + "gelato_selfie_report_error": { + "description": "", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification failure.", + "enum": [ + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + null + ], + "type": ["string", "null"] + }, + "reason": { + "description": "A human-readable message giving the reason for the failure. These messages can be shown to your users.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "GelatoSelfieReportError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_document_options": { + "description": "", + "properties": { + "allowed_types": { + "description": "Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.", + "items": { + "enum": ["driving_license", "id_card", "passport"], + "type": "string" + }, + "type": "array" + }, + "require_id_number": { + "description": "Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.", + "type": "boolean" + }, + "require_live_capture": { + "description": "Disable image uploads, identity document images have to be captured using the device’s camera.", + "type": "boolean" + }, + "require_matching_selfie": { + "description": "Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).", + "type": "boolean" + } + }, + "title": "GelatoSessionDocumentOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_id_number_options": { + "description": "", + "properties": {}, + "title": "GelatoSessionIdNumberOptions", + "type": "object", + "x-expandableFields": [] + }, + "gelato_session_last_error": { + "description": "Shows last VerificationSession error", + "properties": { + "code": { + "description": "A short machine-readable string giving the reason for the verification or user-session failure.", + "enum": [ + "abandoned", + "consent_declined", + "country_not_supported", + "device_not_supported", + "document_expired", + "document_type_not_supported", + "document_unverified_other", + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + "under_supported_age", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "reason": { + "description": "A message that explains the reason for verification or user-session failure.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "GelatoSessionLastError", + "type": "object", + "x-expandableFields": [] + }, + "gelato_verification_report_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/definitions/gelato_report_document_options" + }, + "id_number": { + "$ref": "#/definitions/gelato_report_id_number_options" + } + }, + "title": "GelatoVerificationReportOptions", + "type": "object", + "x-expandableFields": ["document", "id_number"] + }, + "gelato_verification_session_options": { + "description": "", + "properties": { + "document": { + "$ref": "#/definitions/gelato_session_document_options" + }, + "id_number": { + "$ref": "#/definitions/gelato_session_id_number_options" + } + }, + "title": "GelatoVerificationSessionOptions", + "type": "object", + "x-expandableFields": ["document", "id_number"] + }, + "gelato_verified_outputs": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "The user's verified address." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_data_verified_outputs_date" + }, + { + "type": "null" + } + ], + "description": "The user’s verified date of birth." + }, + "first_name": { + "description": "The user's verified first name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id_number": { + "description": "The user's verified id number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id_number_type": { + "description": "The user's verified id number type.", + "enum": ["br_cpf", "sg_nric", "us_ssn", null], + "type": ["string", "null"] + }, + "last_name": { + "description": "The user's verified last name.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "GelatoVerifiedOutputs", + "type": "object", + "x-expandableFields": ["address", "dob"] + }, + "identity.verification_report": { + "description": "A VerificationReport is the result of an attempt to collect and verify data from a user.\nThe collection of verification checks performed is determined from the `type` and `options`\nparameters used. You can find the result of each verification check performed in the\nappropriate sub-resource: `document`, `id_number`, `selfie`.\n\nEach VerificationReport contains a copy of any data collected by the user as well as\nreference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)\nAPI. To configure and create VerificationReports, use the\n[VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.\n\nRelated guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "document": { + "$ref": "#/definitions/gelato_document_report" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number": { + "$ref": "#/definitions/gelato_id_number_report" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["identity.verification_report"], + "type": "string" + }, + "options": { + "$ref": "#/definitions/gelato_verification_report_options" + }, + "selfie": { + "$ref": "#/definitions/gelato_selfie_report" + }, + "type": { + "description": "Type of report.", + "enum": ["document", "id_number"], + "type": "string", + "x-stripeBypassValidation": true + }, + "verification_session": { + "description": "ID of the VerificationSession that created this report.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["created", "id", "livemode", "object", "options", "type"], + "title": "GelatoVerificationReport", + "type": "object", + "x-expandableFields": ["document", "id_number", "options", "selfie"], + "x-resourceId": "identity.verification_report" + }, + "identity.verification_session": { + "description": "A VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what [verification\ncheck](/docs/identity/verification-checks) to perform. Only create one VerificationSession for\neach verification in your system.\n\nA VerificationSession transitions through [multiple\nstatuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user's verified data after\nverification checks are complete.\n\nRelated guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)", + "properties": { + "client_secret": { + "description": "The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_error": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_session_last_error" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you the last error encountered when processing the verification." + }, + "last_verification_report": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/identity.verification_report" + }, + { + "type": "null" + } + ], + "description": "ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/identity.verification_report" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["identity.verification_session"], + "type": "string" + }, + "options": { + "$ref": "#/definitions/gelato_verification_session_options" + }, + "redaction": { + "anyOf": [ + { + "$ref": "#/definitions/verification_session_redaction" + }, + { + "type": "null" + } + ], + "description": "Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null." + }, + "status": { + "description": "Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).", + "enum": ["canceled", "processing", "requires_input", "verified"], + "type": "string" + }, + "type": { + "description": "The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.", + "enum": ["document", "id_number"], + "type": "string", + "x-stripeBypassValidation": true + }, + "url": { + "description": "The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "verified_outputs": { + "anyOf": [ + { + "$ref": "#/definitions/gelato_verified_outputs" + }, + { + "type": "null" + } + ], + "description": "The user’s verified data." + } + }, + "required": [ + "created", + "id", + "livemode", + "metadata", + "object", + "options", + "status", + "type" + ], + "title": "GelatoVerificationSession", + "type": "object", + "x-expandableFields": [ + "last_error", + "last_verification_report", + "options", + "redaction", + "verified_outputs" + ], + "x-resourceId": "identity.verification_session" + }, + "inbound_transfers": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/definitions/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the InboundTransfer.", + "enum": ["us_bank_account"], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/definitions/inbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "InboundTransfers", + "type": "object", + "x-expandableFields": ["billing_details", "us_bank_account"] + }, + "inbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual", null], + "type": ["string", "null"] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings", null], + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "network": { + "description": "The US bank account network used to debit funds.", + "enum": ["ach"], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["network"], + "title": "inbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "invoice": { + "description": "Invoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.\n\nThey contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments\nthat may be caused by subscription upgrades/downgrades (if necessary).\n\nIf your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\n[when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.\n\nIf your invoice is configured to be billed by sending an email, then based on your\n[email settings](https://dashboard.stripe.com/account/billing/automatic),\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.\n\nStripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's [minimum allowed charge\nper currency](/docs/currencies#minimum-and-maximum-charge-amounts), the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.\n\nMore details on the customer's credit balance are\n[here](https://stripe.com/docs/billing/customer/balance).\n\nRelated guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).", + "properties": { + "account_country": { + "description": "The country of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "account_name": { + "description": "The public name of the business associated with this invoice, most often the business creating the invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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": "#/definitions/tax_id" + }, + { + "$ref": "#/definitions/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_id" + }, + { + "$ref": "#/definitions/deleted_tax_id" + } + ] + } + }, + "type": ["array", "null"] + }, + "amount_due": { + "description": "Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "type": "integer" + }, + "amount_paid": { + "description": "The amount, in %s, that was paid.", + "type": "integer" + }, + "amount_remaining": { + "description": "The difference between amount_due and amount_paid, in %s.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.", + "type": ["integer", "null"] + }, + "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.", + "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 will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.", + "type": "boolean" + }, + "automatic_tax": { + "$ref": "#/definitions/automatic_tax" + }, + "billing_reason": { + "description": "Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.", + "enum": [ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming", + null + ], + "type": ["string", "null"] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the latest charge generated for this invoice, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/definitions/invoice_setting_custom_field" + }, + "type": ["array", "null"] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The ID of the customer who will be billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "customer_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "customer_shipping": { + "anyOf": [ + { + "$ref": "#/definitions/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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", null], + "type": ["string", "null"] + }, + "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": "#/definitions/invoices_resource_invoice_tax_id" + }, + "type": ["array", "null"] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates applied to this invoice, if any.", + "items": { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/definitions/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts." + }, + "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": "#/definitions/discount" + }, + { + "$ref": "#/definitions/deleted_discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/discount" + }, + { + "$ref": "#/definitions/deleted_discount" + } + ] + } + }, + "type": ["array", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "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.", + "type": ["integer", "null"] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "from_invoice": { + "anyOf": [ + { + "$ref": "#/definitions/invoices_from_invoice" + }, + { + "type": "null" + } + ], + "description": "Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details." + }, + "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, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.", + "maxLength": 5000, + "type": "string" + }, + "invoice_pdf": { + "description": "The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last_finalization_error": { + "anyOf": [ + { + "$ref": "#/definitions/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized." + }, + "latest_revision": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the most recent non-draft revision of this invoice", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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": "#/definitions/line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "InvoiceLinesList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "paid_out_of_band": { + "description": "Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.", + "type": "boolean" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + }, + { + "type": "null" + } + ], + "description": "The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "payment_settings": { + "$ref": "#/definitions/invoices_payment_settings" + }, + "period_end": { + "description": "End of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "Start of the usage period during which invoice items were added to this invoice.", + "format": "unix-time", + "type": "integer" + }, + "post_payment_credit_notes_amount": { + "description": "Total amount of all post-payment credit notes issued for this invoice.", + "type": "integer" + }, + "pre_payment_credit_notes_amount": { + "description": "Total amount of all pre-payment credit notes issued for this invoice.", + "type": "integer" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/quote" + }, + { + "type": "null" + } + ], + "description": "The quote this invoice was generated from.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/quote" + } + ] + } + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/definitions/invoices_shipping_cost" + }, + { + "type": "null" + } + ], + "description": "The details of the cost of shipping, including the ShippingRate applied on the invoice." + }, + "shipping_details": { + "anyOf": [ + { + "$ref": "#/definitions/shipping" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "status": { + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void", + null + ], + "type": ["string", "null"] + }, + "status_transitions": { + "$ref": "#/definitions/invoices_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that this invoice was prepared for, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/subscription" + } + ] + } + }, + "subscription_proration_date": { + "description": "Only set for upcoming invoices that preview prorations. The time used to calculate prorations.", + "type": "integer" + }, + "subtotal": { + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated", + "type": "integer" + }, + "subtotal_excluding_tax": { + "description": "The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated", + "type": ["integer", "null"] + }, + "tax": { + "description": "The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.", + "type": ["integer", "null"] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this invoice belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/test_helpers.test_clock" + } + ] + } + }, + "threshold_reason": { + "$ref": "#/definitions/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": "#/definitions/discounts_resource_discount_amount" + }, + "type": ["array", "null"] + }, + "total_excluding_tax": { + "description": "The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.", + "type": ["integer", "null"] + }, + "total_tax_amounts": { + "description": "The aggregate amounts calculated per tax rate for all line items.", + "items": { + "$ref": "#/definitions/invoice_tax_amount" + }, + "type": "array" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice." + }, + "webhooks_delivered_at": { + "description": "Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": [ + "amount_due", + "amount_paid", + "amount_remaining", + "amount_shipping", + "attempt_count", + "attempted", + "automatic_tax", + "collection_method", + "created", + "currency", + "default_tax_rates", + "lines", + "livemode", + "object", + "paid", + "paid_out_of_band", + "payment_settings", + "period_end", + "period_start", + "post_payment_credit_notes_amount", + "pre_payment_credit_notes_amount", + "starting_balance", + "status_transitions", + "subtotal", + "total", + "total_tax_amounts" + ], + "title": "Invoice", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "application", + "automatic_tax", + "charge", + "custom_fields", + "customer", + "customer_address", + "customer_shipping", + "customer_tax_ids", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "discounts", + "from_invoice", + "last_finalization_error", + "latest_revision", + "lines", + "on_behalf_of", + "payment_intent", + "payment_settings", + "quote", + "rendering_options", + "shipping_cost", + "shipping_details", + "status_transitions", + "subscription", + "test_clock", + "threshold_reason", + "total_discount_amounts", + "total_tax_amounts", + "transfer_data" + ], + "x-resourceId": "invoice" + }, + "invoice_installments_card": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Installments are enabled for this Invoice.", + "type": ["boolean", "null"] + } + }, + "title": "invoice_installments_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_item_threshold_reason": { + "description": "", + "properties": { + "line_item_ids": { + "description": "The IDs of the line items that triggered the threshold invoice.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "usage_gte": { + "description": "The quantity threshold boundary that applied to the given line item.", + "type": "integer" + } + }, + "required": ["line_item_ids", "usage_gte"], + "title": "InvoiceItemThresholdReason", + "type": "object", + "x-expandableFields": [] + }, + "invoice_line_item_period": { + "description": "", + "properties": { + "end": { + "description": "The end of the period, which must be greater than or equal to the start. This value is inclusive.", + "format": "unix-time", + "type": "integer" + }, + "start": { + "description": "The start of the period. This value is inclusive.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end", "start"], + "title": "InvoiceLineItemPeriod", + "type": "object", + "x-expandableFields": [] + }, + "invoice_mandate_options_card": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": ["integer", "null"] + }, + "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", null], + "type": ["string", "null"] + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": ["string", "null"] + } + }, + "title": "invoice_mandate_options_card", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/definitions/invoice_payment_method_options_acss_debit_mandate_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "invoice_payment_method_options_acss_debit_mandate_options": { + "description": "", + "properties": { + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal", null], + "type": ["string", "null"] + } + }, + "title": "invoice_payment_method_options_acss_debit_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": ["de", "en", "fr", "nl"], + "type": "string" + } + }, + "required": ["preferred_language"], + "title": "invoice_payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_card": { + "description": "", + "properties": { + "installments": { + "$ref": "#/definitions/invoice_installments_card" + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": ["any", "automatic", null], + "type": ["string", "null"] + } + }, + "title": "invoice_payment_method_options_card", + "type": "object", + "x-expandableFields": ["installments"] + }, + "invoice_payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/definitions/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", null], + "type": ["string", "null"] + } + }, + "title": "invoice_payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "invoice_payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/definitions/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`, or `mx_bank_transfer`.", + "type": ["string", "null"] + } + }, + "title": "invoice_payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"] + }, + "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": ["BE", "DE", "ES", "FR", "IE", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_konbini": { + "description": "", + "properties": {}, + "title": "invoice_payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "invoice_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/definitions/invoice_payment_method_options_us_bank_account_linked_account_options" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "invoice_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections"] + }, + "invoice_payment_method_options_us_bank_account_linked_account_options": { + "description": "", + "properties": { + "permissions": { + "description": "The list of permissions to request. The `payment_method` permission must be included.", + "items": { + "enum": ["balances", "payment_method", "transactions"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + } + }, + "title": "invoice_payment_method_options_us_bank_account_linked_account_options", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_custom_field": { + "description": "", + "properties": { + "name": { + "description": "The name of the custom field.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value of the custom field.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["name", "value"], + "title": "InvoiceSettingCustomField", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_customer_setting": { + "description": "", + "properties": { + "custom_fields": { + "description": "Default custom fields to be displayed on invoices for this customer.", + "items": { + "$ref": "#/definitions/invoice_setting_custom_field" + }, + "type": ["array", "null"] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "footer": { + "description": "Default footer to be displayed on invoices for this customer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Default options for invoice PDF rendering for this customer." + } + }, + "title": "InvoiceSettingCustomerSetting", + "type": "object", + "x-expandableFields": [ + "custom_fields", + "default_payment_method", + "rendering_options" + ] + }, + "invoice_setting_quote_setting": { + "description": "", + "properties": { + "days_until_due": { + "description": "Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.", + "type": ["integer", "null"] + } + }, + "title": "InvoiceSettingQuoteSetting", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_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, + "type": ["string", "null"] + } + }, + "title": "InvoiceSettingRenderingOptions", + "type": "object", + "x-expandableFields": [] + }, + "invoice_setting_subscription_schedule_setting": { + "description": "", + "properties": { + "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`.", + "type": ["integer", "null"] + } + }, + "title": "InvoiceSettingSubscriptionScheduleSetting", + "type": "object", + "x-expandableFields": [] + }, + "invoice_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s, of the tax.", + "type": "integer" + }, + "inclusive": { + "description": "Whether this tax amount is inclusive or exclusive.", + "type": "boolean" + }, + "tax_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_rate" + } + ], + "description": "The tax rate that was applied to get this tax amount.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_rate" + } + ] + } + } + }, + "required": ["amount", "inclusive", "tax_rate"], + "title": "InvoiceTaxAmount", + "type": "object", + "x-expandableFields": ["tax_rate"] + }, + "invoice_threshold_reason": { + "description": "", + "properties": { + "amount_gte": { + "description": "The total invoice amount threshold boundary if it triggered the threshold invoice.", + "type": ["integer", "null"] + }, + "item_reasons": { + "description": "Indicates which line items triggered a threshold invoice.", + "items": { + "$ref": "#/definitions/invoice_item_threshold_reason" + }, + "type": "array" + } + }, + "required": ["item_reasons"], + "title": "InvoiceThresholdReason", + "type": "object", + "x-expandableFields": ["item_reasons"] + }, + "invoice_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": ["integer", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "InvoiceTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "invoiceitem": { + "description": "Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an\ninvoice by creating or updating it with an `invoice` field, at which point it will be included as\n[an invoice line item](https://stripe.com/docs/api/invoices/line_item) within\n[invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).\n\nInvoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined\nwith a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge\nor credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges\n(to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.\n\nRelated guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).", + "properties": { + "amount": { + "description": "Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ], + "description": "The ID of the customer who will be billed when this invoice item is billed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "date": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "discountable": { + "description": "If true, discounts will apply to this invoice item. Always false for prorations.", + "type": "boolean" + }, + "discounts": { + "description": "The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/discount" + } + ] + } + }, + "type": ["array", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "The ID of the invoice this invoice item belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["invoiceitem"], + "type": "string" + }, + "period": { + "$ref": "#/definitions/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/definitions/price" + }, + { + "type": "null" + } + ], + "description": "The price of the invoice item." + }, + "proration": { + "description": "Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.", + "type": "boolean" + }, + "quantity": { + "description": "Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.", + "type": "integer" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that this invoice item has been created for, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/subscription" + } + ] + } + }, + "subscription_item": { + "description": "The subscription item that this invoice item has been created for, if any.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.", + "items": { + "$ref": "#/definitions/tax_rate" + }, + "type": ["array", "null"] + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this invoice item belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/test_helpers.test_clock" + } + ] + } + }, + "unit_amount": { + "description": "Unit amount (in the `currency` specified) of the invoice item.", + "type": ["integer", "null"] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "currency", + "customer", + "date", + "discountable", + "id", + "livemode", + "object", + "period", + "proration", + "quantity" + ], + "title": "InvoiceItem", + "type": "object", + "x-expandableFields": [ + "customer", + "discounts", + "invoice", + "period", + "price", + "subscription", + "tax_rates", + "test_clock" + ], + "x-resourceId": "invoiceitem" + }, + "invoices_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": "#/definitions/invoice" + } + ], + "description": "The invoice that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + } + }, + "required": ["action", "invoice"], + "title": "InvoicesFromInvoice", + "type": "object", + "x-expandableFields": ["invoice"] + }, + "invoices_line_items_credited_items": { + "description": "", + "properties": { + "invoice": { + "description": "Invoice containing the credited invoice line items", + "maxLength": 5000, + "type": "string" + }, + "invoice_line_items": { + "description": "Credited invoice line items", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": ["invoice", "invoice_line_items"], + "title": "InvoicesLineItemsCreditedItems", + "type": "object", + "x-expandableFields": [] + }, + "invoices_line_items_proration_details": { + "description": "", + "properties": { + "credited_items": { + "anyOf": [ + { + "$ref": "#/definitions/invoices_line_items_credited_items" + }, + { + "type": "null" + } + ], + "description": "For a credit proration `line_item`, the original debit line_items to which the credit proration applies." + } + }, + "title": "InvoicesLineItemsProrationDetails", + "type": "object", + "x-expandableFields": ["credited_items"] + }, + "invoices_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "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." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent." + }, + "card": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "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." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "InvoicesPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "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, + "type": ["string", "null"] + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/definitions/invoices_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to the invoice’s PaymentIntent." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": ["array", "null"] + } + }, + "title": "InvoicesPaymentSettings", + "type": "object", + "x-expandableFields": ["payment_method_options"] + }, + "invoices_resource_invoice_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["type"], + "title": "InvoicesResourceInvoiceTaxID", + "type": "object", + "x-expandableFields": [] + }, + "invoices_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": "#/definitions/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this invoice.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/definitions/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["amount_subtotal", "amount_tax", "amount_total"], + "title": "InvoicesShippingCost", + "type": "object", + "x-expandableFields": ["shipping_rate", "taxes"] + }, + "invoices_status_transitions": { + "description": "", + "properties": { + "finalized_at": { + "description": "The time that the invoice draft was finalized.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "marked_uncollectible_at": { + "description": "The time that the invoice was marked uncollectible.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "paid_at": { + "description": "The time that the invoice was paid.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "voided_at": { + "description": "The time that the invoice was voided.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "InvoicesStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "issuing.authorization": { + "description": "When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`\nobject is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the\npurchase to be completed successfully.\n\nRelated guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).", + "properties": { + "amount": { + "description": "The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "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": "#/definitions/balance_transaction" + }, + "type": "array" + }, + "card": { + "$ref": "#/definitions/issuing.card" + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this authorization belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "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).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was 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).", + "type": "string" + }, + "merchant_data": { + "$ref": "#/definitions/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network_data": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_authorization_network_data" + }, + { + "type": "null" + } + ], + "description": "Details about the authorization, such as identifiers, set by the card network." + }, + "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": "#/definitions/issuing_authorization_pending_request" + }, + { + "type": "null" + } + ], + "description": "The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook." + }, + "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": "#/definitions/issuing_authorization_request" + }, + "type": "array" + }, + "status": { + "description": "The current status of the authorization in its lifecycle.", + "enum": ["closed", "pending", "reversed"], + "type": "string" + }, + "transactions": { + "description": "List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.", + "items": { + "$ref": "#/definitions/issuing.transaction" + }, + "type": "array" + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_authorization_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts)." + }, + "verification_data": { + "$ref": "#/definitions/issuing_authorization_verification_data" + }, + "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, + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "approved", + "authorization_method", + "balance_transactions", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "request_history", + "status", + "transactions", + "verification_data" + ], + "title": "IssuingAuthorization", + "type": "object", + "x-expandableFields": [ + "amount_details", + "balance_transactions", + "card", + "cardholder", + "merchant_data", + "network_data", + "pending_request", + "request_history", + "transactions", + "treasury", + "verification_data" + ], + "x-resourceId": "issuing.authorization" + }, + "issuing.card": { + "description": "You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) 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", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "cardholder": { + "$ref": "#/definitions/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.", + "type": "string" + }, + "cvc": { + "description": "The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "exp_month": { + "description": "The expiration month of the card.", + "type": "integer" + }, + "exp_year": { + "description": "The expiration year of the card.", + "type": "integer" + }, + "financial_account": { + "description": "The financial account this card is attached to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "The last 4 digits of the card number.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the [\"Retrieve a card\" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via \"List all cards\" or any other endpoint.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.card"], + "type": "string" + }, + "replaced_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The latest card that replaces this card, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/issuing.card" + } + ] + } + }, + "replacement_for": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.card" + }, + { + "type": "null" + } + ], + "description": "The card this card replaces, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/issuing.card" + } + ] + } + }, + "replacement_reason": { + "description": "The reason why the previous card needed to be replaced.", + "enum": ["damaged", "expired", "lost", "stolen", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_card_shipping" + }, + { + "type": "null" + } + ], + "description": "Where and how the card will be shipped." + }, + "spending_controls": { + "$ref": "#/definitions/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": "#/definitions/issuing_card_wallets" + }, + { + "type": "null" + } + ], + "description": "Information relating to digital wallets (like Apple Pay and Google Pay)." + } + }, + "required": [ + "brand", + "cardholder", + "created", + "currency", + "exp_month", + "exp_year", + "id", + "last4", + "livemode", + "metadata", + "object", + "spending_controls", + "status", + "type" + ], + "title": "IssuingCard", + "type": "object", + "x-expandableFields": [ + "cardholder", + "replaced_by", + "replacement_for", + "shipping", + "spending_controls", + "wallets" + ], + "x-resourceId": "issuing.card" + }, + "issuing.cardholder": { + "description": "An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.\n\nRelated guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)", + "properties": { + "billing": { + "$ref": "#/definitions/issuing_cardholder_address" + }, + "company": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_company" + }, + { + "type": "null" + } + ], + "description": "Additional information about a `company` cardholder." + }, + "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, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "individual": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_individual" + }, + { + "type": "null" + } + ], + "description": "Additional information about an `individual` cardholder." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The cardholder's name. This will be printed on cards issued to them.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.cardholder"], + "type": "string" + }, + "phone_number": { + "description": "The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "requirements": { + "$ref": "#/definitions/issuing_cardholder_requirements" + }, + "spending_controls": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_authorization_controls" + }, + { + "type": "null" + } + ], + "description": "Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details." + }, + "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`.", + "enum": ["company", "individual"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "billing", + "created", + "id", + "livemode", + "metadata", + "name", + "object", + "requirements", + "status", + "type" + ], + "title": "IssuingCardholder", + "type": "object", + "x-expandableFields": [ + "billing", + "company", + "individual", + "requirements", + "spending_controls" + ], + "x-resourceId": "issuing.cardholder" + }, + "issuing.dispute": { + "description": "As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.\n\nRelated guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)", + "properties": { + "amount": { + "description": "Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).", + "type": "integer" + }, + "balance_transactions": { + "description": "List of balance transactions associated with the dispute.", + "items": { + "$ref": "#/definitions/balance_transaction" + }, + "type": ["array", "null"] + }, + "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.", + "type": "string" + }, + "evidence": { + "$ref": "#/definitions/issuing_dispute_evidence" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.dispute"], + "type": "string" + }, + "status": { + "description": "Current status of the dispute.", + "enum": ["expired", "lost", "submitted", "unsubmitted", "won"], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.transaction" + } + ], + "description": "The transaction being disputed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/issuing.transaction" + } + ] + } + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_dispute_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + } + }, + "required": [ + "amount", + "created", + "currency", + "evidence", + "id", + "livemode", + "metadata", + "object", + "status", + "transaction" + ], + "title": "IssuingDispute", + "type": "object", + "x-expandableFields": [ + "balance_transactions", + "evidence", + "transaction", + "treasury" + ], + "x-resourceId": "issuing.dispute" + }, + "issuing.settlement": { + "description": "When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object.", + "properties": { + "bin": { + "description": "The Bank Identification Number reflecting this settlement record.", + "maxLength": 5000, + "type": "string" + }, + "clearing_date": { + "description": "The date that the transactions are cleared and posted to user's accounts.", + "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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interchange_fees": { + "description": "The total interchange received as reimbursement for the transactions.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "net_total": { + "description": "The total net amount required to settle with the network.", + "type": "integer" + }, + "network": { + "description": "The card network for this settlement report. One of [\"visa\"]", + "enum": ["visa"], + "type": "string" + }, + "network_fees": { + "description": "The total amount of fees owed to the network.", + "type": "integer" + }, + "network_settlement_identifier": { + "description": "The Settlement Identification Number assigned by the network.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["issuing.settlement"], + "type": "string" + }, + "settlement_service": { + "description": "One of `international` or `uk_national_net`.", + "maxLength": 5000, + "type": "string" + }, + "transaction_count": { + "description": "The total number of transactions reflected in this settlement.", + "type": "integer" + }, + "transaction_volume": { + "description": "The total transaction amount reflected in this settlement.", + "type": "integer" + } + }, + "required": [ + "bin", + "clearing_date", + "created", + "currency", + "id", + "interchange_fees", + "livemode", + "metadata", + "net_total", + "network", + "network_fees", + "network_settlement_identifier", + "object", + "settlement_service", + "transaction_count", + "transaction_volume" + ], + "title": "IssuingSettlement", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "issuing.settlement" + }, + "issuing.transaction": { + "description": "Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\n`Transaction` object.\n\nRelated guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).", + "properties": { + "amount": { + "description": "The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_transaction_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "authorization": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.authorization" + }, + { + "type": "null" + } + ], + "description": "The `Authorization` object that led to this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/issuing.authorization" + } + ] + } + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.card" + } + ], + "description": "The card used to make this transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/issuing.card" + } + ] + } + }, + "cardholder": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.cardholder" + }, + { + "type": "null" + } + ], + "description": "The cardholder to whom this transaction belongs.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "dispute": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/issuing.dispute" + }, + { + "type": "null" + } + ], + "description": "If you've disputed the transaction, the ID of the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/issuing.dispute" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency with which the merchant is taking payment.", + "type": "string" + }, + "merchant_data": { + "$ref": "#/definitions/issuing_authorization_merchant_data" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "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": "#/definitions/issuing_transaction_purchase_details" + }, + { + "type": "null" + } + ], + "description": "Additional purchase information that is optionally provided by the merchant." + }, + "treasury": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_transaction_treasury" + }, + { + "type": "null" + } + ], + "description": "[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + }, + "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", null], + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "card", + "created", + "currency", + "id", + "livemode", + "merchant_amount", + "merchant_currency", + "merchant_data", + "metadata", + "object", + "type" + ], + "title": "IssuingTransaction", + "type": "object", + "x-expandableFields": [ + "amount_details", + "authorization", + "balance_transaction", + "card", + "cardholder", + "dispute", + "merchant_data", + "purchase_details", + "treasury" + ], + "x-resourceId": "issuing.transaction" + }, + "issuing_authorization_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": ["integer", "null"] + } + }, + "title": "IssuingAuthorizationAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_merchant_data": { + "description": "", + "properties": { + "category": { + "description": "A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.", + "maxLength": 5000, + "type": "string" + }, + "category_code": { + "description": "The merchant category code for the seller’s business", + "maxLength": 5000, + "type": "string" + }, + "city": { + "description": "City where the seller is located", + "maxLength": 5000, + "type": ["string", "null"] + }, + "country": { + "description": "Country where the seller is located", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "Name of the seller", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "state": { + "description": "State where the seller is located", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["category", "category_code", "network_id"], + "title": "IssuingAuthorizationMerchantData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_network_data": { + "description": "", + "properties": { + "acquiring_institution_id": { + "description": "Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingAuthorizationNetworkData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_pending_request": { + "description": "", + "properties": { + "amount": { + "description": "The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "is_amount_controllable": { + "description": "If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.", + "type": "boolean" + }, + "merchant_amount": { + "description": "The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The local currency the merchant is requesting to authorize.", + "type": "string" + } + }, + "required": [ + "amount", + "currency", + "is_amount_controllable", + "merchant_amount", + "merchant_currency" + ], + "title": "IssuingAuthorizationPendingRequest", + "type": "object", + "x-expandableFields": ["amount_details"] + }, + "issuing_authorization_request": { + "description": "", + "properties": { + "amount": { + "description": "The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.", + "type": "integer" + }, + "amount_details": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_authorization_amount_details" + }, + { + "type": "null" + } + ], + "description": "Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal)." + }, + "approved": { + "description": "Whether this request was approved.", + "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).", + "maxLength": 5000, + "type": "string" + }, + "merchant_amount": { + "description": "The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "merchant_currency": { + "description": "The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": "string" + }, + "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_inactive", + "cardholder_inactive", + "cardholder_verification_required", + "insufficient_funds", + "not_allowed", + "spending_controls", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "reason_message": { + "description": "If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "approved", + "created", + "currency", + "merchant_amount", + "merchant_currency", + "reason" + ], + "title": "IssuingAuthorizationRequest", + "type": "object", + "x-expandableFields": ["amount_details"] + }, + "issuing_authorization_treasury": { + "description": "", + "properties": { + "received_credits": { + "description": "The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "received_debits": { + "description": "The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "transaction": { + "description": "The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["received_credits", "received_debits"], + "title": "IssuingAuthorizationTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_authorization_verification_data": { + "description": "", + "properties": { + "address_line1_check": { + "description": "Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.", + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "address_postal_code_check": { + "description": "Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.", + "enum": ["match", "mismatch", "not_provided"], + "type": "string" + }, + "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" + } + }, + "required": [ + "address_line1_check", + "address_postal_code_check", + "cvc_check", + "expiry_check" + ], + "title": "IssuingAuthorizationVerificationData", + "type": "object", + "x-expandableFields": [] + }, + "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", + null + ], + "type": ["string", "null"] + } + }, + "required": ["eligible"], + "title": "IssuingCardApplePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": ["array", "null"] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": ["array", "null"] + }, + "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": "#/definitions/issuing_card_spending_limit" + }, + "type": ["array", "null"] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`. Always the same as the currency of the card.", + "type": ["string", "null"] + } + }, + "title": "IssuingCardAuthorizationControls", + "type": "object", + "x-expandableFields": ["spending_limits"] + }, + "issuing_card_google_pay": { + "description": "", + "properties": { + "eligible": { + "description": "Google Pay Eligibility", + "type": "boolean" + }, + "ineligible_reason": { + "description": "Reason the card is ineligible for Google Pay", + "enum": [ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region", + null + ], + "type": ["string", "null"] + } + }, + "required": ["eligible"], + "title": "IssuingCardGooglePay", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/definitions/address" + }, + "carrier": { + "description": "The delivery company that shipped a card.", + "enum": ["dhl", "fedex", "royal_mail", "usps", null], + "type": ["string", "null"] + }, + "customs": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_card_shipping_customs" + }, + { + "type": "null" + } + ], + "description": "Additional information that may be required for clearing customs." + }, + "eta": { + "description": "A unix timestamp representing a best estimate of when the card will be delivered.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone_number": { + "description": "The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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.", + "type": ["boolean", "null"] + }, + "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", + null + ], + "type": ["string", "null"] + }, + "tracking_number": { + "description": "A tracking number for a card shipment.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "tracking_url": { + "description": "A link to the shipping carrier's site where you can view detailed information about a card shipment.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "type": { + "description": "Packaging options.", + "enum": ["bulk", "individual"], + "type": "string" + } + }, + "required": ["address", "name", "service", "type"], + "title": "IssuingCardShipping", + "type": "object", + "x-expandableFields": ["address", "customs"] + }, + "issuing_card_shipping_customs": { + "description": "", + "properties": { + "eori_number": { + "description": "A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingCardShippingCustoms", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": ["array", "null"] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "IssuingCardSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_card_wallets": { + "description": "", + "properties": { + "apple_pay": { + "$ref": "#/definitions/issuing_card_apple_pay" + }, + "google_pay": { + "$ref": "#/definitions/issuing_card_google_pay" + }, + "primary_account_identifier": { + "description": "Unique identifier for a card used with digital wallets", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["apple_pay", "google_pay"], + "title": "IssuingCardWallets", + "type": "object", + "x-expandableFields": ["apple_pay", "google_pay"] + }, + "issuing_cardholder_address": { + "description": "", + "properties": { + "address": { + "$ref": "#/definitions/address" + } + }, + "required": ["address"], + "title": "IssuingCardholderAddress", + "type": "object", + "x-expandableFields": ["address"] + }, + "issuing_cardholder_authorization_controls": { + "description": "", + "properties": { + "allowed_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": ["array", "null"] + }, + "blocked_categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": ["array", "null"] + }, + "spending_limits": { + "description": "Limit spending with amount-based rules that apply across this cardholder's cards.", + "items": { + "$ref": "#/definitions/issuing_cardholder_spending_limit" + }, + "type": ["array", "null"] + }, + "spending_limits_currency": { + "description": "Currency of the amounts within `spending_limits`.", + "type": ["string", "null"] + } + }, + "title": "IssuingCardholderAuthorizationControls", + "type": "object", + "x-expandableFields": ["spending_limits"] + }, + "issuing_cardholder_card_issuing": { + "description": "", + "properties": { + "user_terms_acceptance": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_user_terms_acceptance" + }, + { + "type": "null" + } + ], + "description": "Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards)." + } + }, + "title": "IssuingCardholderCardIssuing", + "type": "object", + "x-expandableFields": ["user_terms_acceptance"] + }, + "issuing_cardholder_company": { + "description": "", + "properties": { + "tax_id_provided": { + "description": "Whether the company's business ID number was provided.", + "type": "boolean" + } + }, + "required": ["tax_id_provided"], + "title": "IssuingCardholderCompany", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_id_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + } + }, + "title": "IssuingCardholderIdDocument", + "type": "object", + "x-expandableFields": ["back", "front"] + }, + "issuing_cardholder_individual": { + "description": "", + "properties": { + "card_issuing": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_card_issuing" + }, + { + "type": "null" + } + ], + "description": "Information related to the card_issuing program for this cardholder." + }, + "dob": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_individual_dob" + }, + { + "type": "null" + } + ], + "description": "The date of birth of this cardholder." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "verification": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_verification" + }, + { + "type": "null" + } + ], + "description": "Government-issued ID document for this cardholder." + } + }, + "title": "IssuingCardholderIndividual", + "type": "object", + "x-expandableFields": ["card_issuing", "dob", "verification"] + }, + "issuing_cardholder_individual_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year of birth.", + "type": ["integer", "null"] + } + }, + "title": "IssuingCardholderIndividualDOB", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_requirements": { + "description": "", + "properties": { + "disabled_reason": { + "description": "If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.", + "enum": ["listed", "rejected.listed", "under_review", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "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.dob.day", + "individual.dob.month", + "individual.dob.year", + "individual.first_name", + "individual.last_name", + "individual.verification.document" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": ["array", "null"] + } + }, + "title": "IssuingCardholderRequirements", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_spending_limit": { + "description": "", + "properties": { + "amount": { + "description": "Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "categories": { + "description": "Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.", + "items": { + "enum": [ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "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_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", + "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" + }, + "type": ["array", "null"] + }, + "interval": { + "description": "Interval (or event) to which the amount applies.", + "enum": [ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly" + ], + "type": "string" + } + }, + "required": ["amount", "interval"], + "title": "IssuingCardholderSpendingLimit", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_user_terms_acceptance": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "ip": { + "description": "The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "user_agent": { + "description": "The user agent of the browser from which the cardholder accepted the Authorized User Terms.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingCardholderUserTermsAcceptance", + "type": "object", + "x-expandableFields": [] + }, + "issuing_cardholder_verification": { + "description": "", + "properties": { + "document": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_cardholder_id_document" + }, + { + "type": "null" + } + ], + "description": "An identifying document, either a passport or local ID card." + } + }, + "title": "IssuingCardholderVerification", + "type": "object", + "x-expandableFields": ["document"] + }, + "issuing_dispute_canceled_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "cancellation_policy_provided": { + "description": "Whether the cardholder was provided with a cancellation policy.", + "type": ["boolean", "null"] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": ["merchandise", "service", null], + "type": ["string", "null"] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": ["merchant_rejected", "successful", null], + "type": ["string", "null"] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "IssuingDisputeCanceledEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_duplicate_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "card_statement": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "cash_receipt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "check_image": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "IssuingDisputeDuplicateEvidence", + "type": "object", + "x-expandableFields": [ + "additional_documentation", + "card_statement", + "cash_receipt", + "check_image" + ] + }, + "issuing_dispute_evidence": { + "description": "", + "properties": { + "canceled": { + "$ref": "#/definitions/issuing_dispute_canceled_evidence" + }, + "duplicate": { + "$ref": "#/definitions/issuing_dispute_duplicate_evidence" + }, + "fraudulent": { + "$ref": "#/definitions/issuing_dispute_fraudulent_evidence" + }, + "merchandise_not_as_described": { + "$ref": "#/definitions/issuing_dispute_merchandise_not_as_described_evidence" + }, + "not_received": { + "$ref": "#/definitions/issuing_dispute_not_received_evidence" + }, + "other": { + "$ref": "#/definitions/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", + "not_received", + "other", + "service_not_as_described" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "service_not_as_described": { + "$ref": "#/definitions/issuing_dispute_service_not_as_described_evidence" + } + }, + "required": ["reason"], + "title": "IssuingDisputeEvidence", + "type": "object", + "x-expandableFields": [ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described" + ] + }, + "issuing_dispute_fraudulent_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingDisputeFraudulentEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_merchandise_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "return_description": { + "description": "Description of the cardholder's attempt to return the product.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "return_status": { + "description": "Result of cardholder's attempt to return the product.", + "enum": ["merchant_rejected", "successful", null], + "type": ["string", "null"] + }, + "returned_at": { + "description": "Date when the product was returned or attempted to be returned.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "IssuingDisputeMerchandiseNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_not_received_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "expected_at": { + "description": "Date when the cardholder expected to receive the product.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": ["merchandise", "service", null], + "type": ["string", "null"] + } + }, + "title": "IssuingDisputeNotReceivedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_other_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_description": { + "description": "Description of the merchandise or service that was purchased.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "product_type": { + "description": "Whether the product was a merchandise or service.", + "enum": ["merchandise", "service", null], + "type": ["string", "null"] + } + }, + "title": "IssuingDisputeOtherEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_service_not_as_described_evidence": { + "description": "", + "properties": { + "additional_documentation": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "canceled_at": { + "description": "Date when order was canceled.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "cancellation_reason": { + "description": "Reason for canceling the order.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "explanation": { + "description": "Explanation of why the cardholder is disputing this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "received_at": { + "description": "Date when the product was received.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "IssuingDisputeServiceNotAsDescribedEvidence", + "type": "object", + "x-expandableFields": ["additional_documentation"] + }, + "issuing_dispute_treasury": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute", + "maxLength": 5000, + "type": ["string", "null"] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["received_debit"], + "title": "IssuingDisputeTreasury", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_amount_details": { + "description": "", + "properties": { + "atm_fee": { + "description": "The fee charged by the ATM for the cash withdrawal.", + "type": ["integer", "null"] + } + }, + "title": "IssuingTransactionAmountDetails", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_flight_data": { + "description": "", + "properties": { + "departure_at": { + "description": "The time that the flight departed.", + "type": ["integer", "null"] + }, + "passenger_name": { + "description": "The name of the passenger.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "refundable": { + "description": "Whether the ticket is refundable.", + "type": ["boolean", "null"] + }, + "segments": { + "description": "The legs of the trip.", + "items": { + "$ref": "#/definitions/issuing_transaction_flight_data_leg" + }, + "type": ["array", "null"] + }, + "travel_agency": { + "description": "The travel agency that issued the ticket.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingTransactionFlightData", + "type": "object", + "x-expandableFields": ["segments"] + }, + "issuing_transaction_flight_data_leg": { + "description": "", + "properties": { + "arrival_airport_code": { + "description": "The three-letter IATA airport code of the flight's destination.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "carrier": { + "description": "The airline carrier code.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "departure_airport_code": { + "description": "The three-letter IATA airport code that the flight departed from.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "flight_number": { + "description": "The flight number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "service_class": { + "description": "The flight's service class.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "stopover_allowed": { + "description": "Whether a stopover is allowed on this flight.", + "type": ["boolean", "null"] + } + }, + "title": "IssuingTransactionFlightDataLeg", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_fuel_data": { + "description": "", + "properties": { + "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 `volume_decimal`. One of `us_gallon` or `liter`.", + "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" + }, + "volume_decimal": { + "description": "The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + } + }, + "required": ["type", "unit", "unit_cost_decimal"], + "title": "IssuingTransactionFuelData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_lodging_data": { + "description": "", + "properties": { + "check_in_at": { + "description": "The time of checking into the lodging.", + "type": ["integer", "null"] + }, + "nights": { + "description": "The number of nights stayed at the lodging.", + "type": ["integer", "null"] + } + }, + "title": "IssuingTransactionLodgingData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_purchase_details": { + "description": "", + "properties": { + "flight": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_transaction_flight_data" + }, + { + "type": "null" + } + ], + "description": "Information about the flight that was purchased with this transaction." + }, + "fuel": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_transaction_fuel_data" + }, + { + "type": "null" + } + ], + "description": "Information about fuel that was purchased with this transaction." + }, + "lodging": { + "anyOf": [ + { + "$ref": "#/definitions/issuing_transaction_lodging_data" + }, + { + "type": "null" + } + ], + "description": "Information about lodging that was purchased with this transaction." + }, + "receipt": { + "description": "The line items in the purchase.", + "items": { + "$ref": "#/definitions/issuing_transaction_receipt_data" + }, + "type": ["array", "null"] + }, + "reference": { + "description": "A merchant-specific order number.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingTransactionPurchaseDetails", + "type": "object", + "x-expandableFields": ["flight", "fuel", "lodging", "receipt"] + }, + "issuing_transaction_receipt_data": { + "description": "", + "properties": { + "description": { + "description": "The description of the item. The maximum length of this field is 26 characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "quantity": { + "description": "The quantity of the item.", + "type": ["number", "null"] + }, + "total": { + "description": "The total for this line item in cents.", + "type": ["integer", "null"] + }, + "unit_cost": { + "description": "The unit cost of the item in cents.", + "type": ["integer", "null"] + } + }, + "title": "IssuingTransactionReceiptData", + "type": "object", + "x-expandableFields": [] + }, + "issuing_transaction_treasury": { + "description": "", + "properties": { + "received_credit": { + "description": "The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund", + "maxLength": 5000, + "type": ["string", "null"] + }, + "received_debit": { + "description": "The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "IssuingTransactionTreasury", + "type": "object", + "x-expandableFields": [] + }, + "item": { + "description": "A line item.", + "properties": { + "amount_discount": { + "description": "Total discount amount applied. If no discounts were applied, defaults to 0.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.", + "maxLength": 5000, + "type": "string" + }, + "discounts": { + "description": "The discounts applied to the line item.", + "items": { + "$ref": "#/definitions/line_items_discount_amount" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["item"], + "type": "string" + }, + "price": { + "anyOf": [ + { + "$ref": "#/definitions/price" + }, + { + "type": "null" + } + ], + "description": "The price used to generate the line item." + }, + "quantity": { + "description": "The quantity of products being purchased.", + "type": ["integer", "null"] + }, + "taxes": { + "description": "The taxes applied to the line item.", + "items": { + "$ref": "#/definitions/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": [ + "amount_discount", + "amount_subtotal", + "amount_tax", + "amount_total", + "currency", + "description", + "id", + "object" + ], + "title": "LineItem", + "type": "object", + "x-expandableFields": ["discounts", "price", "taxes"], + "x-resourceId": "item" + }, + "legal_entity_company": { + "description": "", + "properties": { + "address": { + "$ref": "#/definitions/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/definitions/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kana variation of the company's primary address (Japan only)." + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/definitions/legal_entity_japan_address" + }, + { + "type": "null" + } + ], + "description": "The Kanji variation of the company's primary address (Japan only)." + }, + "directors_provided": { + "description": "Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).", + "type": "boolean" + }, + "executives_provided": { + "description": "Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.", + "type": "boolean" + }, + "name": { + "description": "The company's legal name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name_kana": { + "description": "The Kana variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name_kanji": { + "description": "The Kanji variation of the company's legal name (Japan only).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "owners_provided": { + "description": "Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).", + "type": "boolean" + }, + "ownership_declaration": { + "anyOf": [ + { + "$ref": "#/definitions/legal_entity_ubo_declaration" + }, + { + "type": "null" + } + ], + "description": "This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct." + }, + "phone": { + "description": "The company's phone number (used for verification).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "structure": { + "description": "The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.", + "enum": [ + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit" + ], + "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": "#/definitions/legal_entity_company_verification" + }, + { + "type": "null" + } + ], + "description": "Information on the verification state of the company." + } + }, + "title": "LegalEntityCompany", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "ownership_declaration", + "verification" + ] + }, + "legal_entity_company_verification": { + "description": "", + "properties": { + "document": { + "$ref": "#/definitions/legal_entity_company_verification_document" + } + }, + "required": ["document"], + "title": "LegalEntityCompanyVerification", + "type": "object", + "x-expandableFields": ["document"] + }, + "legal_entity_company_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + }, + "details": { + "description": "A user-displayable string describing the verification state of this document.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + } + }, + "title": "LegalEntityCompanyVerificationDocument", + "type": "object", + "x-expandableFields": ["back", "front"] + }, + "legal_entity_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year of birth.", + "type": ["integer", "null"] + } + }, + "title": "LegalEntityDOB", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_japan_address": { + "description": "", + "properties": { + "city": { + "description": "City/Ward.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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", "null"] + }, + "line1": { + "description": "Block/Building number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "line2": { + "description": "Building details.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "state": { + "description": "Prefecture.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "town": { + "description": "Town/cho-me.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "LegalEntityJapanAddress", + "type": "object", + "x-expandableFields": [] + }, + "legal_entity_person_verification": { + "description": "", + "properties": { + "additional_document": { + "anyOf": [ + { + "$ref": "#/definitions/legal_entity_person_verification_document" + }, + { + "type": "null" + } + ], + "description": "A document showing address, either a passport, local ID card, or utility bill from a well-known utility company." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "document": { + "$ref": "#/definitions/legal_entity_person_verification_document" + }, + "status": { + "description": "The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["status"], + "title": "LegalEntityPersonVerification", + "type": "object", + "x-expandableFields": ["additional_document", "document"] + }, + "legal_entity_person_verification_document": { + "description": "", + "properties": { + "back": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "front": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + } + }, + "title": "LegalEntityPersonVerificationDocument", + "type": "object", + "x-expandableFields": ["back", "front"] + }, + "legal_entity_ubo_declaration": { + "description": "", + "properties": { + "date": { + "description": "The Unix timestamp marking when the beneficial owner attestation was made.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "ip": { + "description": "The IP address from which the beneficial owner attestation was made.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "user_agent": { + "description": "The user-agent string from the browser where the beneficial owner attestation was made.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "LegalEntityUBODeclaration", + "type": "object", + "x-expandableFields": [] + }, + "line_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount, in %s.", + "type": "integer" + }, + "amount_excluding_tax": { + "description": "The integer amount in %s representing the amount for this line item, excluding all tax and discounts.", + "type": ["integer", "null"] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "discount_amounts": { + "description": "The amount of discount calculated per discount for this line item.", + "items": { + "$ref": "#/definitions/discounts_resource_discount_amount" + }, + "type": ["array", "null"] + }, + "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": "#/definitions/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/discount" + } + ] + } + }, + "type": ["array", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_item": { + "description": "The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["line_item"], + "type": "string" + }, + "period": { + "$ref": "#/definitions/invoice_line_item_period" + }, + "price": { + "anyOf": [ + { + "$ref": "#/definitions/price" + }, + { + "type": "null" + } + ], + "description": "The price of the line item." + }, + "proration": { + "description": "Whether this is a proration.", + "type": "boolean" + }, + "proration_details": { + "anyOf": [ + { + "$ref": "#/definitions/invoices_line_items_proration_details" + }, + { + "type": "null" + } + ], + "description": "Additional details for proration line items" + }, + "quantity": { + "description": "The quantity of the subscription, if the line item is a subscription or a proration.", + "type": ["integer", "null"] + }, + "subscription": { + "description": "The subscription that the invoice item pertains to, if any.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "subscription_item": { + "description": "The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.", + "maxLength": 5000, + "type": "string" + }, + "tax_amounts": { + "description": "The amount of tax calculated per tax rate for this line item", + "items": { + "$ref": "#/definitions/invoice_tax_amount" + }, + "type": "array" + }, + "tax_rates": { + "description": "The tax rates which apply to the line item.", + "items": { + "$ref": "#/definitions/tax_rate" + }, + "type": "array" + }, + "type": { + "description": "A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.", + "enum": ["invoiceitem", "subscription"], + "type": "string" + }, + "unit_amount_excluding_tax": { + "description": "The amount in %s representing the unit amount for this line item, excluding all tax and discounts.", + "format": "decimal", + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "currency", + "discountable", + "id", + "livemode", + "metadata", + "object", + "period", + "proration", + "type" + ], + "title": "InvoiceLineItem", + "type": "object", + "x-expandableFields": [ + "discount_amounts", + "discounts", + "period", + "price", + "proration_details", + "tax_amounts", + "tax_rates" + ], + "x-resourceId": "line_item" + }, + "line_items_discount_amount": { + "description": "", + "properties": { + "amount": { + "description": "The amount discounted.", + "type": "integer" + }, + "discount": { + "$ref": "#/definitions/discount" + } + }, + "required": ["amount", "discount"], + "title": "LineItemsDiscountAmount", + "type": "object", + "x-expandableFields": ["discount"] + }, + "line_items_tax_amount": { + "description": "", + "properties": { + "amount": { + "description": "Amount of tax applied for this rate.", + "type": "integer" + }, + "rate": { + "$ref": "#/definitions/tax_rate" + } + }, + "required": ["amount", "rate"], + "title": "LineItemsTaxAmount", + "type": "object", + "x-expandableFields": ["rate"] + }, + "linked_account_options_us_bank_account": { + "description": "", + "properties": { + "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" + }, + "return_url": { + "description": "For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "linked_account_options_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "login_link": { + "description": "", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["login_link"], + "type": "string" + }, + "url": { + "description": "The URL for the login link.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["created", "object", "url"], + "title": "LoginLink", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "login_link" + }, + "mandate": { + "description": "A Mandate is a record of the permission a customer has given you to debit their payment method.", + "properties": { + "customer_acceptance": { + "$ref": "#/definitions/customer_acceptance" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "multi_use": { + "$ref": "#/definitions/mandate_multi_use" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["mandate"], + "type": "string" + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + } + ], + "description": "ID of the payment method associated with this mandate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/definitions/mandate_payment_method_details" + }, + "single_use": { + "$ref": "#/definitions/mandate_single_use" + }, + "status": { + "description": "The status of the mandate, which indicates whether it can be used to initiate a payment.", + "enum": ["active", "inactive", "pending"], + "type": "string" + }, + "type": { + "description": "The type of the mandate.", + "enum": ["multi_use", "single_use"], + "type": "string" + } + }, + "required": [ + "customer_acceptance", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "status", + "type" + ], + "title": "Mandate", + "type": "object", + "x-expandableFields": [ + "customer_acceptance", + "multi_use", + "payment_method", + "payment_method_details", + "single_use" + ], + "x-resourceId": "mandate" + }, + "mandate_acss_debit": { + "description": "", + "properties": { + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic"], + "type": "string" + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal"], + "type": "string" + } + }, + "required": ["payment_schedule", "transaction_type"], + "title": "mandate_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_au_becs_debit": { + "description": "", + "properties": { + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["url"], + "title": "mandate_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_bacs_debit": { + "description": "", + "properties": { + "network_status": { + "description": "The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.", + "enum": ["accepted", "pending", "refused", "revoked"], + "type": "string" + }, + "reference": { + "description": "The unique reference identifying the mandate on the Bacs network.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL that will contain the mandate that the customer has signed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["network_status", "reference", "url"], + "title": "mandate_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "off_session": { + "$ref": "#/definitions/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": ["off_session", "on_session", null], + "type": ["string", "null"] + } + }, + "title": "mandate_blik", + "type": "object", + "x-expandableFields": ["off_session"] + }, + "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_options_off_session_details_blik": { + "description": "", + "properties": { + "amount": { + "description": "Amount of each recurring payment.", + "type": ["integer", "null"] + }, + "currency": { + "description": "Currency of each recurring payment.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "interval": { + "description": "Frequency interval of each recurring payment.", + "enum": ["day", "month", "week", "year", null], + "type": ["string", "null"] + }, + "interval_count": { + "description": "Frequency indicator of each recurring payment.", + "type": ["integer", "null"] + } + }, + "title": "mandate_options_off_session_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "mandate_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/definitions/mandate_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/definitions/mandate_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/definitions/mandate_bacs_debit" + }, + "blik": { + "$ref": "#/definitions/mandate_blik" + }, + "card": { + "$ref": "#/definitions/card_mandate_payment_method_details" + }, + "link": { + "$ref": "#/definitions/mandate_link" + }, + "sepa_debit": { + "$ref": "#/definitions/mandate_sepa_debit" + }, + "type": { + "description": "The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/definitions/mandate_us_bank_account" + } + }, + "required": ["type"], + "title": "mandate_payment_method_details", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "mandate_sepa_debit": { + "description": "", + "properties": { + "reference": { + "description": "The unique reference of the mandate.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["reference", "url"], + "title": "mandate_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "mandate_single_use": { + "description": "", + "properties": { + "amount": { + "description": "On a single use mandate, the amount of the payment.", + "type": "integer" + }, + "currency": { + "description": "On a single use mandate, the currency of the payment.", + "type": "string" + } + }, + "required": ["amount", "currency"], + "title": "mandate_single_use", + "type": "object", + "x-expandableFields": [] + }, + "mandate_us_bank_account": { + "description": "", + "properties": {}, + "title": "mandate_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "networks": { + "description": "", + "properties": { + "available": { + "description": "All available networks for the card.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "preferred": { + "description": "The preferred network for the card.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["available"], + "title": "networks", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_data": { + "description": "", + "properties": { + "object": { + "description": "Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.", + "type": "object" + }, + "previous_attributes": { + "description": "Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events).", + "type": "object" + } + }, + "required": ["object"], + "title": "NotificationEventData", + "type": "object", + "x-expandableFields": [] + }, + "notification_event_request": { + "description": "", + "properties": { + "id": { + "description": "ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "idempotency_key": { + "description": "The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "NotificationEventRequest", + "type": "object", + "x-expandableFields": [] + }, + "offline_acceptance": { + "description": "", + "properties": {}, + "title": "offline_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "online_acceptance": { + "description": "", + "properties": { + "ip_address": { + "description": "The IP address from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "user_agent": { + "description": "The user agent of the browser from which the Mandate was accepted by the customer.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "online_acceptance", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/definitions/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/definitions/outbound_payments_payment_method_details_financial_account" + }, + "type": { + "description": "The type of the payment method used in the OutboundPayment.", + "enum": ["financial_account", "us_bank_account"], + "type": "string" + }, + "us_bank_account": { + "$ref": "#/definitions/outbound_payments_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "OutboundPaymentsPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "outbound_payments_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "Token of the FinancialAccount.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails used to send funds.", + "enum": ["stripe"], + "type": "string" + } + }, + "required": ["id", "network"], + "title": "outbound_payments_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_payments_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual", null], + "type": ["string", "null"] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings", null], + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "network": { + "description": "The US bank account network used to send funds.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["network"], + "title": "outbound_payments_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "outbound_transfers_payment_method_details": { + "description": "", + "properties": { + "billing_details": { + "$ref": "#/definitions/treasury_shared_resource_billing_details" + }, + "type": { + "description": "The type of the payment method used in the OutboundTransfer.", + "enum": ["us_bank_account"], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/definitions/outbound_transfers_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "OutboundTransfersPaymentMethodDetails", + "type": "object", + "x-expandableFields": ["billing_details", "us_bank_account"] + }, + "outbound_transfers_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual", null], + "type": ["string", "null"] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings", null], + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "network": { + "description": "The US bank account network used to send funds.", + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["network"], + "title": "outbound_transfers_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "package_dimensions": { + "description": "", + "properties": { + "height": { + "description": "Height, in inches.", + "type": "number" + }, + "length": { + "description": "Length, in inches.", + "type": "number" + }, + "weight": { + "description": "Weight, in ounces.", + "type": "number" + }, + "width": { + "description": "Width, in inches.", + "type": "number" + } + }, + "required": ["height", "length", "weight", "width"], + "title": "PackageDimensions", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_amount_details": { + "description": "", + "properties": { + "tip": { + "$ref": "#/definitions/payment_flows_amount_details_resource_tip" + } + }, + "title": "PaymentFlowsAmountDetails", + "type": "object", + "x-expandableFields": ["tip"] + }, + "payment_flows_amount_details_resource_tip": { + "description": "", + "properties": { + "amount": { + "description": "Portion of the amount that corresponds to a tip.", + "type": "integer" + } + }, + "title": "PaymentFlowsAmountDetailsResourceTip", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_automatic_payment_methods_payment_intent": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculates compatible payment methods", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentFlowsAutomaticPaymentMethodsPaymentIntent", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_installment_options": { + "description": "", + "properties": { + "enabled": { + "type": "boolean" + }, + "plan": { + "$ref": "#/definitions/payment_method_details_card_installments_plan" + } + }, + "required": ["enabled"], + "title": "PaymentFlowsInstallmentOptions", + "type": "object", + "x-expandableFields": ["plan"] + }, + "payment_flows_private_payment_methods_alipay": { + "description": "", + "properties": {}, + "title": "PaymentFlowsPrivatePaymentMethodsAlipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_alipay_details": { + "description": "", + "properties": { + "buyer_id": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "transaction_id": { + "description": "Transaction ID of this particular Alipay transaction.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsAlipayDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_flows_private_payment_methods_klarna_dob": { + "description": "", + "properties": { + "day": { + "description": "The day of birth, between 1 and 31.", + "type": ["integer", "null"] + }, + "month": { + "description": "The month of birth, between 1 and 12.", + "type": ["integer", "null"] + }, + "year": { + "description": "The four-digit year of birth.", + "type": ["integer", "null"] + } + }, + "title": "PaymentFlowsPrivatePaymentMethodsKlarnaDOB", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent": { + "description": "A PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.\n\nA PaymentIntent transitions through\n[multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.\n\nRelated guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "amount_capturable": { + "description": "Amount that can be captured from this PaymentIntent.", + "type": "integer" + }, + "amount_details": { + "$ref": "#/definitions/payment_flows_amount_details" + }, + "amount_received": { + "description": "Amount that was collected by this PaymentIntent.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).", + "type": ["integer", "null"] + }, + "automatic_payment_methods": { + "anyOf": [ + { + "$ref": "#/definitions/payment_flows_automatic_payment_methods_payment_intent" + }, + { + "type": "null" + } + ], + "description": "Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)" + }, + "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", + "type": ["integer", "null"] + }, + "cancellation_reason": { + "description": "Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).", + "enum": [ + "abandoned", + "automatic", + "duplicate", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice", + null + ], + "type": ["string", "null"] + }, + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["automatic", "manual"], + "type": "string", + "x-stripeBypassValidation": true + }, + "client_secret": { + "description": "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "confirmation_method": { + "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).", + "type": "string" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "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 present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "ID of the invoice that created this PaymentIntent, if it exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "last_payment_error": { + "anyOf": [ + { + "$ref": "#/definitions/api_errors" + }, + { + "type": "null" + } + ], + "description": "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason." + }, + "latest_charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "The latest charge created by this payment intent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).", + "type": "object" + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_next_action" + }, + { + "type": "null" + } + ], + "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." + }, + "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": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used in this PaymentIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this PaymentIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "processing": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_processing" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you about the processing state of the payment." + }, + "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, + "type": ["string", "null"] + }, + "review": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/review" + }, + { + "type": "null" + } + ], + "description": "ID of the review associated with this PaymentIntent, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/review" + } + ] + } + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["off_session", "on_session", null], + "type": ["string", "null"] + }, + "shipping": { + "anyOf": [ + { + "$ref": "#/definitions/shipping" + }, + { + "type": "null" + } + ], + "description": "Shipping information for this PaymentIntent." + }, + "statement_descriptor": { + "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "statement_descriptor_suffix": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/transfer_data" + }, + { + "type": "null" + } + ], + "description": "The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details." + }, + "transfer_group": { + "description": "A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "capture_method", + "confirmation_method", + "created", + "currency", + "id", + "livemode", + "object", + "payment_method_types", + "status" + ], + "title": "PaymentIntent", + "type": "object", + "x-expandableFields": [ + "amount_details", + "application", + "automatic_payment_methods", + "customer", + "invoice", + "last_payment_error", + "latest_charge", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "processing", + "review", + "shipping", + "transfer_data" + ], + "x-resourceId": "payment_intent" + }, + "payment_intent_card_processing": { + "description": "", + "properties": { + "customer_notification": { + "$ref": "#/definitions/payment_intent_processing_customer_notification" + } + }, + "title": "PaymentIntentCardProcessing", + "type": "object", + "x-expandableFields": ["customer_notification"] + }, + "payment_intent_next_action": { + "description": "", + "properties": { + "alipay_handle_redirect": { + "$ref": "#/definitions/payment_intent_next_action_alipay_handle_redirect" + }, + "boleto_display_details": { + "$ref": "#/definitions/payment_intent_next_action_boleto" + }, + "card_await_notification": { + "$ref": "#/definitions/payment_intent_next_action_card_await_notification" + }, + "display_bank_transfer_instructions": { + "$ref": "#/definitions/payment_intent_next_action_display_bank_transfer_instructions" + }, + "konbini_display_details": { + "$ref": "#/definitions/payment_intent_next_action_konbini" + }, + "oxxo_display_details": { + "$ref": "#/definitions/payment_intent_next_action_display_oxxo_details" + }, + "paynow_display_qr_code": { + "$ref": "#/definitions/payment_intent_next_action_paynow_display_qr_code" + }, + "pix_display_qr_code": { + "$ref": "#/definitions/payment_intent_next_action_pix_display_qr_code" + }, + "promptpay_display_qr_code": { + "$ref": "#/definitions/payment_intent_next_action_promptpay_display_qr_code" + }, + "redirect_to_url": { + "$ref": "#/definitions/payment_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a 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": "#/definitions/payment_intent_next_action_verify_with_microdeposits" + }, + "wechat_pay_display_qr_code": { + "$ref": "#/definitions/payment_intent_next_action_wechat_pay_display_qr_code" + }, + "wechat_pay_redirect_to_android_app": { + "$ref": "#/definitions/payment_intent_next_action_wechat_pay_redirect_to_android_app" + }, + "wechat_pay_redirect_to_ios_app": { + "$ref": "#/definitions/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", + "display_bank_transfer_instructions", + "konbini_display_details", + "oxxo_display_details", + "paynow_display_qr_code", + "pix_display_qr_code", + "promptpay_display_qr_code", + "redirect_to_url", + "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, + "type": ["string", "null"] + }, + "native_url": { + "description": "The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentIntentNextActionAlipayHandleRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_boleto": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp after which the boleto expires.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "hosted_voucher_url": { + "description": "The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "number": { + "description": "The boleto number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "pdf": { + "description": "The URL to the downloadable boleto voucher PDF.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_intent_next_action_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_card_await_notification": { + "description": "", + "properties": { + "charge_attempt_at": { + "description": "The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "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.", + "type": ["boolean", "null"] + } + }, + "title": "PaymentIntentNextActionCardAwaitNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_display_bank_transfer_instructions": { + "description": "", + "properties": { + "amount_remaining": { + "description": "The remaining amount that needs to be transferred to complete the payment.", + "type": ["integer", "null"] + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": ["string", "null"] + }, + "financial_addresses": { + "description": "A list of financial addresses that can be used to fund the customer balance", + "items": { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "type": { + "description": "Type of bank transfer", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "PaymentIntentNextActionDisplayBankTransferInstructions", + "type": "object", + "x-expandableFields": ["financial_addresses"] + }, + "payment_intent_next_action_display_oxxo_details": { + "description": "", + "properties": { + "expires_after": { + "description": "The timestamp after which the OXXO voucher expires.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "hosted_voucher_url": { + "description": "The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "number": { + "description": "OXXO reference number.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentIntentNextActionDisplayOxxoDetails", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini": { + "description": "", + "properties": { + "expires_at": { + "description": "The timestamp at which the pending Konbini payment expires.", + "format": "unix-time", + "type": "integer" + }, + "hosted_voucher_url": { + "description": "The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "stores": { + "$ref": "#/definitions/payment_intent_next_action_konbini_stores" + } + }, + "required": ["expires_at", "stores"], + "title": "payment_intent_next_action_konbini", + "type": "object", + "x-expandableFields": ["stores"] + }, + "payment_intent_next_action_konbini_familymart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_familymart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_lawson": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_lawson", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_ministop": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_ministop", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_seicomart": { + "description": "", + "properties": { + "confirmation_number": { + "description": "The confirmation number.", + "maxLength": 5000, + "type": "string" + }, + "payment_code": { + "description": "The payment code.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["payment_code"], + "title": "payment_intent_next_action_konbini_seicomart", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_konbini_stores": { + "description": "", + "properties": { + "familymart": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_next_action_konbini_familymart" + }, + { + "type": "null" + } + ], + "description": "FamilyMart instruction details." + }, + "lawson": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_next_action_konbini_lawson" + }, + { + "type": "null" + } + ], + "description": "Lawson instruction details." + }, + "ministop": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_next_action_konbini_ministop" + }, + { + "type": "null" + } + ], + "description": "Ministop instruction details." + }, + "seicomart": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_next_action_konbini_seicomart" + }, + { + "type": "null" + } + ], + "description": "Seicomart instruction details." + } + }, + "title": "payment_intent_next_action_konbini_stores", + "type": "object", + "x-expandableFields": ["familymart", "lawson", "ministop", "seicomart"] + }, + "payment_intent_next_action_paynow_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "image_url_png", "image_url_svg"], + "title": "PaymentIntentNextActionPaynowDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_pix_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "expires_at": { + "description": "The date (unix timestamp) when the PIX expires.", + "type": "integer" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted pix instructions page, which allows customers to view the pix QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render png QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render svg QR code", + "maxLength": 5000, + "type": "string" + } + }, + "title": "PaymentIntentNextActionPixDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_promptpay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The raw data string used to generate QR code, it should be used together with QR code library.", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The PNG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The SVG path used to render the QR code, can be used as the source in an HTML img tag", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionPromptpayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate the payment.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": ["amounts", "descriptor_code", null], + "type": ["string", "null"] + } + }, + "required": ["arrival_date", "hosted_verification_url"], + "title": "PaymentIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_display_qr_code": { + "description": "", + "properties": { + "data": { + "description": "The data being used to generate QR code", + "maxLength": 5000, + "type": "string" + }, + "hosted_instructions_url": { + "description": "The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.", + "maxLength": 5000, + "type": "string" + }, + "image_data_url": { + "description": "The base64 image data for a pre-generated QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_png": { + "description": "The image_url_png string used to render QR code", + "maxLength": 5000, + "type": "string" + }, + "image_url_svg": { + "description": "The image_url_svg string used to render QR code", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "data", + "hosted_instructions_url", + "image_data_url", + "image_url_png", + "image_url_svg" + ], + "title": "PaymentIntentNextActionWechatPayDisplayQrCode", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_android_app": { + "description": "", + "properties": { + "app_id": { + "description": "app_id is the APP ID registered on WeChat open platform", + "maxLength": 5000, + "type": "string" + }, + "nonce_str": { + "description": "nonce_str is a random string", + "maxLength": 5000, + "type": "string" + }, + "package": { + "description": "package is static value", + "maxLength": 5000, + "type": "string" + }, + "partner_id": { + "description": "an unique merchant ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "prepay_id": { + "description": "an unique trading ID assigned by WeChat Pay", + "maxLength": 5000, + "type": "string" + }, + "sign": { + "description": "A signature", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "Specifies the current time in epoch format", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "app_id", + "nonce_str", + "package", + "partner_id", + "prepay_id", + "sign", + "timestamp" + ], + "title": "PaymentIntentNextActionWechatPayRedirectToAndroidApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_next_action_wechat_pay_redirect_to_ios_app": { + "description": "", + "properties": { + "native_url": { + "description": "An universal link that redirect to WeChat Pay app", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["native_url"], + "title": "PaymentIntentNextActionWechatPayRedirectToIOSApp", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "affirm": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_affirm" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "afterpay_clearpay": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_afterpay_clearpay" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "alipay": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_alipay" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "au_becs_debit": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_au_becs_debit" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bacs_debit": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_bacs_debit" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_bancontact" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_blik" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "boleto": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_boleto" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_card" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "card_present": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_card_present" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_customer_balance" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "eps": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_eps" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "fpx": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_fpx" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "giropay": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_giropay" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "grabpay": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_grabpay" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "ideal": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_ideal" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "interac_present": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_interac_present" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "klarna": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_klarna" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_konbini" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "link": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_link" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "oxxo": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_oxxo" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "p24": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_p24" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "paynow": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_paynow" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "pix": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_pix" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "promptpay": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_promptpay" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "sofort": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_sofort" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/definitions/payment_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + }, + "wechat_pay": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_wechat_pay" + }, + { + "$ref": "#/definitions/payment_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "PaymentIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ] + }, + "payment_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/definitions/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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "payment_intent_payment_method_options_au_becs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_blik": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_card": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "installments": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "mandate_options": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": ["string", "null"] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": ["any", "automatic", "challenge_only", null], + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "statement_descriptor_suffix_kana": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor_suffix_kanji": { + "description": "Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": ["installments", "mandate_options"] + }, + "payment_intent_payment_method_options_eps": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_link": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic", null], + "type": ["string", "null"] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal", null], + "type": ["string", "null"] + } + }, + "title": "payment_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "payment_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/definitions/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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "payment_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/definitions/linked_account_options_us_bank_account" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections"] + }, + "payment_intent_processing": { + "description": "", + "properties": { + "card": { + "$ref": "#/definitions/payment_intent_card_processing" + }, + "type": { + "description": "Type of the payment method for which payment is in `processing` state, one of `card`.", + "enum": ["card"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentIntentProcessing", + "type": "object", + "x-expandableFields": ["card"] + }, + "payment_intent_processing_customer_notification": { + "description": "", + "properties": { + "approval_requested": { + "description": "Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.", + "type": ["boolean", "null"] + }, + "completes_at": { + "description": "If customer approval is required, they need to provide approval before this time.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "PaymentIntentProcessingCustomerNotification", + "type": "object", + "x-expandableFields": [] + }, + "payment_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual", "manual_preferred"], + "type": "string" + }, + "installments": { + "$ref": "#/definitions/payment_flows_installment_options" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "PaymentIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": ["installments"] + }, + "payment_link": { + "description": "A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.\n\nWhen a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.\n\nRelated guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)", + "properties": { + "active": { + "description": "Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.", + "type": "boolean" + }, + "after_completion": { + "$ref": "#/definitions/payment_links_resource_after_completion" + }, + "allow_promotion_codes": { + "description": "Whether user redeemable promotion codes are enabled.", + "type": "boolean" + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.", + "type": ["integer", "null"] + }, + "application_fee_percent": { + "description": "This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.", + "type": ["number", "null"] + }, + "automatic_tax": { + "$ref": "#/definitions/payment_links_resource_automatic_tax" + }, + "billing_address_collection": { + "description": "Configuration for collecting the customer's billing address.", + "enum": ["auto", "required"], + "type": "string" + }, + "consent_collection": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_consent_collection" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration to gather active consent from customers." + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "custom_fields": { + "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", + "items": { + "$ref": "#/definitions/payment_links_resource_custom_fields" + }, + "type": "array" + }, + "custom_text": { + "$ref": "#/definitions/payment_links_resource_custom_text" + }, + "customer_creation": { + "description": "Configuration for Customer creation during checkout.", + "enum": ["always", "if_required"], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice_creation": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_invoice_creation" + }, + { + "type": "null" + } + ], + "description": "Configuration for creating invoice for payment mode payment links." + }, + "line_items": { + "description": "The line items representing what is being sold.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "PaymentLinksResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_link"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "payment_intent_data": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_payment_intent_data" + }, + { + "type": "null" + } + ], + "description": "Indicates the parameters to be passed to PaymentIntent creation during checkout." + }, + "payment_method_collection": { + "description": "Configuration for collecting a payment method during checkout.", + "enum": ["always", "if_required"], + "type": "string" + }, + "payment_method_types": { + "description": "The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).", + "items": { + "enum": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": ["array", "null"] + }, + "phone_number_collection": { + "$ref": "#/definitions/payment_links_resource_phone_number_collection" + }, + "shipping_address_collection": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_shipping_address_collection" + }, + { + "type": "null" + } + ], + "description": "Configuration for collecting the customer's shipping address." + }, + "shipping_options": { + "description": "The shipping rate options applied to the session.", + "items": { + "$ref": "#/definitions/payment_links_resource_shipping_option" + }, + "type": "array" + }, + "submit_type": { + "description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.", + "enum": ["auto", "book", "donate", "pay"], + "type": "string" + }, + "subscription_data": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_subscription_data" + }, + { + "type": "null" + } + ], + "description": "When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`." + }, + "tax_id_collection": { + "$ref": "#/definitions/payment_links_resource_tax_id_collection" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to." + }, + "url": { + "description": "The public URL that can be shared with customers.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "active", + "after_completion", + "allow_promotion_codes", + "automatic_tax", + "billing_address_collection", + "currency", + "custom_fields", + "custom_text", + "customer_creation", + "id", + "livemode", + "metadata", + "object", + "payment_method_collection", + "phone_number_collection", + "shipping_options", + "submit_type", + "tax_id_collection", + "url" + ], + "title": "PaymentLink", + "type": "object", + "x-expandableFields": [ + "after_completion", + "automatic_tax", + "consent_collection", + "custom_fields", + "custom_text", + "invoice_creation", + "line_items", + "on_behalf_of", + "payment_intent_data", + "phone_number_collection", + "shipping_address_collection", + "shipping_options", + "subscription_data", + "tax_id_collection", + "transfer_data" + ], + "x-resourceId": "payment_link" + }, + "payment_links_resource_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "$ref": "#/definitions/payment_links_resource_completion_behavior_confirmation_page" + }, + "redirect": { + "$ref": "#/definitions/payment_links_resource_completion_behavior_redirect" + }, + "type": { + "description": "The specified behavior after the purchase is complete.", + "enum": ["hosted_confirmation", "redirect"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentLinksResourceAfterCompletion", + "type": "object", + "x-expandableFields": ["hosted_confirmation", "redirect"] + }, + "payment_links_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, tax will be calculated automatically using the customer's location.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_confirmation_page": { + "description": "", + "properties": { + "custom_message": { + "description": "The custom message that is displayed to the customer after the purchase is complete.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentLinksResourceCompletionBehaviorConfirmationPage", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_completion_behavior_redirect": { + "description": "", + "properties": { + "url": { + "description": "The URL the customer will be redirected to after the purchase is complete.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["url"], + "title": "PaymentLinksResourceCompletionBehaviorRedirect", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications.", + "enum": ["auto", "none", null], + "type": ["string", "null"] + }, + "terms_of_service": { + "description": "If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.", + "enum": ["none", "required", null], + "type": ["string", "null"] + } + }, + "title": "PaymentLinksResourceConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/definitions/payment_links_resource_custom_fields_label" + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "type": { + "description": "The type of the field.", + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "optional", "type"], + "title": "PaymentLinksResourceCustomFields", + "type": "object", + "x-expandableFields": ["dropdown", "label"] + }, + "payment_links_resource_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/definitions/payment_links_resource_custom_fields_dropdown_option" + }, + "type": "array" + } + }, + "required": ["options"], + "title": "PaymentLinksResourceCustomFieldsDropdown", + "type": "object", + "x-expandableFields": ["options"] + }, + "payment_links_resource_custom_fields_dropdown_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "PaymentLinksResourceCustomFieldsDropdownOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "type": { + "description": "The type of the label.", + "enum": ["custom"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentLinksResourceCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentLinksResourceCustomText", + "type": "object", + "x-expandableFields": ["shipping_address", "submit"] + }, + "payment_links_resource_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": ["message"], + "title": "PaymentLinksResourceCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Enable creating an invoice on successful payment.", + "type": "boolean" + }, + "invoice_data": { + "anyOf": [ + { + "$ref": "#/definitions/payment_links_resource_invoice_settings" + }, + { + "type": "null" + } + ], + "description": "Configuration for the invoice. Default invoice values will be used if unspecified." + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourceInvoiceCreation", + "type": "object", + "x-expandableFields": ["invoice_data"] + }, + "payment_links_resource_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_id" + }, + { + "$ref": "#/definitions/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_id" + }, + { + "$ref": "#/definitions/deleted_tax_id" + } + ] + } + }, + "type": ["array", "null"] + }, + "custom_fields": { + "description": "A list of up to 4 custom fields to be displayed on the invoice.", + "items": { + "$ref": "#/definitions/invoice_setting_custom_field" + }, + "type": ["array", "null"] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "footer": { + "description": "Footer to be displayed on the invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentLinksResourceInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_links_resource_payment_intent_data": { + "description": "", + "properties": { + "capture_method": { + "description": "Indicates when the funds will be captured from the customer's account.", + "enum": ["automatic", "manual", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with the payment method collected during checkout.", + "enum": ["off_session", "on_session", null], + "type": ["string", "null"] + } + }, + "title": "PaymentLinksResourcePaymentIntentData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a phone number will be collected during checkout.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourcePhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "PaymentLinksResourceShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/shipping_rate" + } + ], + "description": "The ID of the Shipping Rate to use for this shipping option.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/shipping_rate" + } + ] + } + } + }, + "required": ["shipping_amount", "shipping_rate"], + "title": "PaymentLinksResourceShippingOption", + "type": "object", + "x-expandableFields": ["shipping_rate"] + }, + "payment_links_resource_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": ["integer", "null"] + } + }, + "title": "PaymentLinksResourceSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentLinksResourceTaxIdCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_links_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": ["integer", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The connected account receiving the transfer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "PaymentLinksResourceTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "payment_method": { + "description": "PaymentMethod objects represent your customer's payment instruments.\nYou can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to\nCustomer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).", + "properties": { + "acss_debit": { + "$ref": "#/definitions/payment_method_acss_debit" + }, + "affirm": { + "$ref": "#/definitions/payment_method_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/definitions/payment_method_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/definitions/payment_flows_private_payment_methods_alipay" + }, + "au_becs_debit": { + "$ref": "#/definitions/payment_method_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/definitions/payment_method_bacs_debit" + }, + "bancontact": { + "$ref": "#/definitions/payment_method_bancontact" + }, + "billing_details": { + "$ref": "#/definitions/billing_details" + }, + "blik": { + "$ref": "#/definitions/payment_method_blik" + }, + "boleto": { + "$ref": "#/definitions/payment_method_boleto" + }, + "card": { + "$ref": "#/definitions/payment_method_card" + }, + "card_present": { + "$ref": "#/definitions/payment_method_card_present" + }, + "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": "#/definitions/customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + } + ] + } + }, + "customer_balance": { + "$ref": "#/definitions/payment_method_customer_balance" + }, + "eps": { + "$ref": "#/definitions/payment_method_eps" + }, + "fpx": { + "$ref": "#/definitions/payment_method_fpx" + }, + "giropay": { + "$ref": "#/definitions/payment_method_giropay" + }, + "grabpay": { + "$ref": "#/definitions/payment_method_grabpay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/definitions/payment_method_ideal" + }, + "interac_present": { + "$ref": "#/definitions/payment_method_interac_present" + }, + "klarna": { + "$ref": "#/definitions/payment_method_klarna" + }, + "konbini": { + "$ref": "#/definitions/payment_method_konbini" + }, + "link": { + "$ref": "#/definitions/payment_method_link" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["payment_method"], + "type": "string" + }, + "oxxo": { + "$ref": "#/definitions/payment_method_oxxo" + }, + "p24": { + "$ref": "#/definitions/payment_method_p24" + }, + "paynow": { + "$ref": "#/definitions/payment_method_paynow" + }, + "pix": { + "$ref": "#/definitions/payment_method_pix" + }, + "promptpay": { + "$ref": "#/definitions/payment_method_promptpay" + }, + "radar_options": { + "$ref": "#/definitions/radar_radar_options" + }, + "sepa_debit": { + "$ref": "#/definitions/payment_method_sepa_debit" + }, + "sofort": { + "$ref": "#/definitions/payment_method_sofort" + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/definitions/payment_method_us_bank_account" + }, + "wechat_pay": { + "$ref": "#/definitions/payment_method_wechat_pay" + } + }, + "required": [ + "billing_details", + "created", + "id", + "livemode", + "object", + "type" + ], + "title": "PaymentMethod", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billing_details", + "blik", + "boleto", + "card", + "card_present", + "customer", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "radar_options", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "x-resourceId": "payment_method" + }, + "payment_method_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "institution_number": { + "description": "Institution number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "transit_number": { + "description": "Transit number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_afterpay_clearpay": { + "description": "", + "properties": {}, + "title": "payment_method_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Six-digit number identifying bank and branch associated with this bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_bancontact": { + "description": "", + "properties": {}, + "title": "payment_method_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_blik": { + "description": "", + "properties": {}, + "title": "payment_method_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "Uniquely identifies the customer tax id (CNPJ or CPF)", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "payment_method_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "checks": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_card_checks" + }, + { + "type": "null" + } + ], + "description": "Checks on Card address and CVC if provided." + }, + "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, + "type": ["string", "null"] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": ["string", "null"] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": "string" + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_card_generated_card" + }, + { + "type": "null" + } + ], + "description": "Details of the original PaymentMethod that created this object." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": "string" + }, + "networks": { + "anyOf": [ + { + "$ref": "#/definitions/networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about card networks that can be used to process the payment." + }, + "three_d_secure_usage": { + "anyOf": [ + { + "$ref": "#/definitions/three_d_secure_usage" + }, + { + "type": "null" + } + ], + "description": "Contains details on how this Card may be used for 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": ["brand", "exp_month", "exp_year", "funding", "last4"], + "title": "payment_method_card", + "type": "object", + "x-expandableFields": [ + "checks", + "generated_from", + "networks", + "three_d_secure_usage", + "wallet" + ] + }, + "payment_method_card_checks": { + "description": "", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_generated_card": { + "description": "", + "properties": { + "charge": { + "description": "The charge that created this object.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "payment_method_details": { + "anyOf": [ + { + "$ref": "#/definitions/card_generated_from_payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Transaction-specific details of the payment method used in the payment." + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_attempt" + } + ] + } + } + }, + "title": "payment_method_card_generated_card", + "type": "object", + "x-expandableFields": ["payment_method_details", "setup_attempt"] + }, + "payment_method_card_present": { + "description": "", + "properties": {}, + "title": "payment_method_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/definitions/payment_method_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/definitions/payment_method_card_wallet_apple_pay" + }, + "dynamic_last4": { + "description": "(For tokenized numbers only.) The last four digits of the device account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "google_pay": { + "$ref": "#/definitions/payment_method_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/definitions/payment_method_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/definitions/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`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/definitions/payment_method_card_wallet_visa_checkout" + } + }, + "required": ["type"], + "title": "payment_method_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_masterpass", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_customer_balance": { + "description": "", + "properties": {}, + "title": "payment_method_customer_balance", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details": { + "description": "", + "properties": { + "ach_credit_transfer": { + "$ref": "#/definitions/payment_method_details_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/definitions/payment_method_details_ach_debit" + }, + "acss_debit": { + "$ref": "#/definitions/payment_method_details_acss_debit" + }, + "affirm": { + "$ref": "#/definitions/payment_method_details_affirm" + }, + "afterpay_clearpay": { + "$ref": "#/definitions/payment_method_details_afterpay_clearpay" + }, + "alipay": { + "$ref": "#/definitions/payment_flows_private_payment_methods_alipay_details" + }, + "au_becs_debit": { + "$ref": "#/definitions/payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/definitions/payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/definitions/payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/definitions/payment_method_details_blik" + }, + "boleto": { + "$ref": "#/definitions/payment_method_details_boleto" + }, + "card": { + "$ref": "#/definitions/payment_method_details_card" + }, + "card_present": { + "$ref": "#/definitions/payment_method_details_card_present" + }, + "customer_balance": { + "$ref": "#/definitions/payment_method_details_customer_balance" + }, + "eps": { + "$ref": "#/definitions/payment_method_details_eps" + }, + "fpx": { + "$ref": "#/definitions/payment_method_details_fpx" + }, + "giropay": { + "$ref": "#/definitions/payment_method_details_giropay" + }, + "grabpay": { + "$ref": "#/definitions/payment_method_details_grabpay" + }, + "ideal": { + "$ref": "#/definitions/payment_method_details_ideal" + }, + "interac_present": { + "$ref": "#/definitions/payment_method_details_interac_present" + }, + "klarna": { + "$ref": "#/definitions/payment_method_details_klarna" + }, + "konbini": { + "$ref": "#/definitions/payment_method_details_konbini" + }, + "link": { + "$ref": "#/definitions/payment_method_details_link" + }, + "multibanco": { + "$ref": "#/definitions/payment_method_details_multibanco" + }, + "oxxo": { + "$ref": "#/definitions/payment_method_details_oxxo" + }, + "p24": { + "$ref": "#/definitions/payment_method_details_p24" + }, + "paynow": { + "$ref": "#/definitions/payment_method_details_paynow" + }, + "pix": { + "$ref": "#/definitions/payment_method_details_pix" + }, + "promptpay": { + "$ref": "#/definitions/payment_method_details_promptpay" + }, + "sepa_debit": { + "$ref": "#/definitions/payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/definitions/payment_method_details_sofort" + }, + "stripe_account": { + "$ref": "#/definitions/payment_method_details_stripe_account" + }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.\nAn additional hash is included on `payment_method_details` with a name matching this value.\nIt contains information specific to the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/definitions/payment_method_details_us_bank_account" + }, + "wechat": { + "$ref": "#/definitions/payment_method_details_wechat" + }, + "wechat_pay": { + "$ref": "#/definitions/payment_method_details_wechat_pay" + } + }, + "required": ["type"], + "title": "payment_method_details", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "multibanco", + "oxxo", + "p24", + "paynow", + "pix", + "promptpay", + "sepa_debit", + "sofort", + "stripe_account", + "us_bank_account", + "wechat", + "wechat_pay" + ] + }, + "payment_method_details_ach_credit_transfer": { + "description": "", + "properties": { + "account_number": { + "description": "Account number to transfer funds to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the routing number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "routing_number": { + "description": "Routing transit number for the bank account to transfer funds to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "swift_code": { + "description": "SWIFT code of the bank associated with the routing number.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_ach_credit_transfer", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ach_debit": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Type of entity that holds the account. This can be either `individual` or `company`.", + "enum": ["company", "individual", null], + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "routing_number": { + "description": "Routing transit number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_ach_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_acss_debit": { + "description": "", + "properties": { + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "institution_number": { + "description": "Institution number of the bank account", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_affirm": { + "description": "", + "properties": {}, + "title": "payment_method_details_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_afterpay_clearpay": { + "description": "", + "properties": { + "reference": { + "description": "Order identifier shown to the merchant in Afterpay’s online portal.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_au_becs_debit": { + "description": "", + "properties": { + "bsb_number": { + "description": "Bank-State-Branch number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bacs_debit": { + "description": "", + "properties": { + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "sort_code": { + "description": "Sort code of the bank account. (e.g., `10-20-30`)", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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", null], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_boleto": { + "description": "", + "properties": { + "tax_id": { + "description": "The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["tax_id"], + "title": "payment_method_details_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "checks": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_card_checks" + }, + { + "type": "null" + } + ], + "description": "Check results by Card networks on Card address and CVC at time of payment." + }, + "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, + "type": ["string", "null"] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": ["string", "null"] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "installments": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_card_installments" + }, + { + "type": "null" + } + ], + "description": "Installment details for this payment (Mexico only).\n\nFor more information, see the [installments integration guide](https://stripe.com/docs/payments/installments)." + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "mandate": { + "description": "ID of the mandate used to make this payment or created by it.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/definitions/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this transaction used 3D Secure authentication." + }, + "wallet": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_card_wallet" + }, + { + "type": "null" + } + ], + "description": "If this Card is part of a card wallet, this contains the details of the card wallet." + } + }, + "required": ["exp_month", "exp_year"], + "title": "payment_method_details_card", + "type": "object", + "x-expandableFields": [ + "checks", + "installments", + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_card_checks", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_installments": { + "description": "", + "properties": { + "plan": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for the payment." + } + }, + "title": "payment_method_details_card_installments", + "type": "object", + "x-expandableFields": ["plan"] + }, + "payment_method_details_card_installments_plan": { + "description": "", + "properties": { + "count": { + "description": "For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.", + "type": ["integer", "null"] + }, + "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", null], + "type": ["string", "null"] + }, + "type": { + "description": "Type of installment plan, one of `fixed_count`.", + "enum": ["fixed_count"], + "type": "string" + } + }, + "required": ["type"], + "title": "payment_method_details_card_installments_plan", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_present": { + "description": "", + "properties": { + "amount_authorized": { + "description": "The authorized amount", + "type": ["integer", "null"] + }, + "brand": { + "description": "Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": ["string", "null"] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "incremental_authorization_supported": { + "description": "Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).", + "type": "boolean" + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "overcapture_supported": { + "description": "Defines whether the authorized amount can be over-captured or not", + "type": "boolean" + }, + "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", + null + ], + "type": ["string", "null"] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_card_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": [ + "exp_month", + "exp_year", + "incremental_authorization_supported", + "overcapture_supported" + ], + "title": "payment_method_details_card_present", + "type": "object", + "x-expandableFields": ["receipt"] + }, + "payment_method_details_card_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": ["checking", "credit", "prepaid", "unknown"], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_card_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet": { + "description": "", + "properties": { + "amex_express_checkout": { + "$ref": "#/definitions/payment_method_details_card_wallet_amex_express_checkout" + }, + "apple_pay": { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "google_pay": { + "$ref": "#/definitions/payment_method_details_card_wallet_google_pay" + }, + "masterpass": { + "$ref": "#/definitions/payment_method_details_card_wallet_masterpass" + }, + "samsung_pay": { + "$ref": "#/definitions/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`, or `visa_checkout`. 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", + "masterpass", + "samsung_pay", + "visa_checkout" + ], + "type": "string" + }, + "visa_checkout": { + "$ref": "#/definitions/payment_method_details_card_wallet_visa_checkout" + } + }, + "required": ["type"], + "title": "payment_method_details_card_wallet", + "type": "object", + "x-expandableFields": [ + "amex_express_checkout", + "apple_pay", + "google_pay", + "masterpass", + "samsung_pay", + "visa_checkout" + ] + }, + "payment_method_details_card_wallet_amex_express_checkout": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_amex_express_checkout", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_apple_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_apple_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_google_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_google_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_masterpass": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_masterpass", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "payment_method_details_card_wallet_samsung_pay": { + "description": "", + "properties": {}, + "title": "payment_method_details_card_wallet_samsung_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_card_wallet_visa_checkout": { + "description": "", + "properties": { + "billing_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "shipping_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + } + }, + "title": "payment_method_details_card_wallet_visa_checkout", + "type": "object", + "x-expandableFields": ["billing_address", "shipping_address"] + }, + "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", + null + ], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + }, + "transaction_id": { + "description": "Unique transaction id generated by FPX for every request from the merchant", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["bank"], + "title": "payment_method_details_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_giropay": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_grabpay": { + "description": "", + "properties": { + "transaction_id": { + "description": "Unique transaction id generated by GrabPay", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": ["string", "null"] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": ["string", "null"] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_interac_present": { + "description": "", + "properties": { + "brand": { + "description": "Card brand. Can be `interac`, `mastercard` or `visa`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "emv_auth_data": { + "description": "Authorization response cryptogram.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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*Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*", + "maxLength": 5000, + "type": ["string", "null"] + }, + "funding": { + "description": "Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "The last four digits of the card.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "network": { + "description": "Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "preferred_locales": { + "description": "EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "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", + null + ], + "type": ["string", "null"] + }, + "receipt": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_interac_present_receipt" + }, + { + "type": "null" + } + ], + "description": "A collection of fields required to be displayed on receipts. Only required for EMV transactions." + } + }, + "required": ["exp_month", "exp_year"], + "title": "payment_method_details_interac_present", + "type": "object", + "x-expandableFields": ["receipt"] + }, + "payment_method_details_interac_present_receipt": { + "description": "", + "properties": { + "account_type": { + "description": "The type of account being debited or credited", + "enum": ["checking", "savings", "unknown"], + "type": "string", + "x-stripeBypassValidation": true + }, + "application_cryptogram": { + "description": "EMV tag 9F26, cryptogram generated by the integrated circuit chip.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "application_preferred_name": { + "description": "Mnenomic of the Application Identifier.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "authorization_code": { + "description": "Identifier for this transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "authorization_response_code": { + "description": "EMV tag 8A. A code returned by the card issuer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "cardholder_verification_method": { + "description": "How the cardholder verified ownership of the card.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "dedicated_file_name": { + "description": "EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "terminal_verification_results": { + "description": "The outcome of a series of EMV functions performed by the card reader.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "transaction_status_information": { + "description": "An indication of various EMV functions performed during the transaction.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_interac_present_receipt", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_klarna": { + "description": "", + "properties": { + "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, + "type": ["string", "null"] + }, + "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`, `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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_konbini": { + "description": "", + "properties": { + "store": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_konbini_store" + }, + { + "type": "null" + } + ], + "description": "If the payment succeeded, this contains the details of the convenience store where the payment was completed." + } + }, + "title": "payment_method_details_konbini", + "type": "object", + "x-expandableFields": ["store"] + }, + "payment_method_details_konbini_store": { + "description": "", + "properties": { + "chain": { + "description": "The name of the convenience store chain where the payment was completed.", + "enum": ["familymart", "lawson", "ministop", "seicomart", null], + "type": ["string", "null"] + } + }, + "title": "payment_method_details_konbini_store", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_link": { + "description": "", + "properties": {}, + "title": "payment_method_details_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_multibanco": { + "description": "", + "properties": { + "entity": { + "description": "Entity number associated with this Multibanco payment.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "reference": { + "description": "Reference number associated with this Multibanco payment.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_multibanco", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_oxxo": { + "description": "", + "properties": { + "number": { + "description": "OXXO reference number", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `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", + "volkswagen_bank", + null + ], + "type": ["string", "null"] + }, + "reference": { + "description": "Unique reference for this Przelewy24 payment.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_paynow": { + "description": "", + "properties": { + "reference": { + "description": "Reference number associated with this PayNow payment", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_pix": { + "description": "", + "properties": { + "bank_transaction_id": { + "description": "Unique transaction id generated by BCB", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_promptpay": { + "description": "", + "properties": { + "reference": { + "description": "Bill reference generated by PromptPay", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "mandate": { + "description": "ID of the mandate used to make this payment.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_sofort": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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", null], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "payment_method_details_stripe_account": { + "description": "", + "properties": {}, + "title": "payment_method_details_stripe_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_details_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual", null], + "type": ["string", "null"] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings", null], + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "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, + "type": ["string", "null"] + }, + "transaction_id": { + "description": "Transaction ID of this particular WeChat Pay transaction.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_details_wechat_pay", + "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", + null + ], + "type": ["string", "null"] + } + }, + "title": "payment_method_eps", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_fpx": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.", + "enum": [ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob" + ], + "type": "string" + } + }, + "required": ["bank"], + "title": "payment_method_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_giropay": { + "description": "", + "properties": {}, + "title": "payment_method_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_grabpay": { + "description": "", + "properties": {}, + "title": "payment_method_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": ["string", "null"] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank, if the bank was provided.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": ["string", "null"] + } + }, + "title": "payment_method_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_klarna": { + "description": "", + "properties": { + "dob": { + "anyOf": [ + { + "$ref": "#/definitions/payment_flows_private_payment_methods_klarna_dob" + }, + { + "type": "null" + } + ], + "description": "The customer's date of birth, if provided." + } + }, + "title": "payment_method_klarna", + "type": "object", + "x-expandableFields": ["dob"] + }, + "payment_method_konbini": { + "description": "", + "properties": {}, + "title": "payment_method_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_link": { + "description": "", + "properties": { + "email": { + "description": "Account owner's email address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "payment_method_link", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_affirm": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_affirm", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_afterpay_clearpay": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "reference": { + "description": "Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about\nthe payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_afterpay_clearpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_alipay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_alipay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bacs_debit": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "title": "payment_method_options_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_bancontact": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the Bancontact authorization page that the customer is redirected to.", + "enum": ["de", "en", "fr", "nl"], + "type": "string" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "required": ["preferred_language"], + "title": "payment_method_options_bancontact", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_boleto": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session", "on_session"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "payment_method_options_boleto", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_installments": { + "description": "", + "properties": { + "available_plans": { + "description": "Installment plans that may be selected for this PaymentIntent.", + "items": { + "$ref": "#/definitions/payment_method_details_card_installments_plan" + }, + "type": ["array", "null"] + }, + "enabled": { + "description": "Whether Installments are enabled for this PaymentIntent.", + "type": "boolean" + }, + "plan": { + "anyOf": [ + { + "$ref": "#/definitions/payment_method_details_card_installments_plan" + }, + { + "type": "null" + } + ], + "description": "Installment plan selected for this PaymentIntent." + } + }, + "required": ["enabled"], + "title": "payment_method_options_card_installments", + "type": "object", + "x-expandableFields": ["available_plans", "plan"] + }, + "payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": ["fixed", "maximum"], + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": ["string", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "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`.", + "type": ["integer", "null"] + }, + "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" + }, + "type": ["array", "null"] + } + }, + "required": [ + "amount", + "amount_type", + "interval", + "reference", + "start_date" + ], + "title": "payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_card_present": { + "description": "", + "properties": { + "request_extended_authorization": { + "description": "Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)", + "type": ["boolean", "null"] + }, + "request_incremental_authorization_support": { + "description": "Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.", + "type": ["boolean", "null"] + } + }, + "title": "payment_method_options_card_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_customer_balance": { + "description": "", + "properties": { + "bank_transfer": { + "$ref": "#/definitions/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", null], + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_customer_balance", + "type": "object", + "x-expandableFields": ["bank_transfer"] + }, + "payment_method_options_customer_balance_bank_transfer": { + "description": "", + "properties": { + "eu_bank_transfer": { + "$ref": "#/definitions/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": ["iban", "sepa", "sort_code", "spei", "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`, or `mx_bank_transfer`.", + "enum": [ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_options_customer_balance_bank_transfer", + "type": "object", + "x-expandableFields": ["eu_bank_transfer"] + }, + "payment_method_options_customer_balance_eu_bank_account": { + "description": "", + "properties": { + "country": { + "description": "The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.", + "enum": ["BE", "DE", "ES", "FR", "IE", "NL"], + "type": "string" + } + }, + "required": ["country"], + "title": "payment_method_options_customer_balance_eu_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_fpx": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_fpx", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_giropay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_giropay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_grabpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_grabpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_ideal": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_ideal", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_interac_present": { + "description": "", + "properties": {}, + "title": "payment_method_options_interac_present", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_klarna": { + "description": "", + "properties": { + "capture_method": { + "description": "Controls when the funds will be captured from the customer's account.", + "enum": ["manual"], + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale of the Klarna checkout page that the customer is redirected to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_klarna", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_konbini": { + "description": "", + "properties": { + "confirmation_number": { + "description": "An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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.", + "type": ["integer", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "product_description": { + "description": "A product descriptor of up to 22 characters, which will appear to customers at the convenience store.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_konbini", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_oxxo": { + "description": "", + "properties": { + "expires_after_days": { + "description": "The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.", + "type": "integer" + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "required": ["expires_after_days"], + "title": "payment_method_options_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_p24": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_p24", + "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\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_pix": { + "description": "", + "properties": { + "expires_after_seconds": { + "description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire.", + "type": ["integer", "null"] + }, + "expires_at": { + "description": "The timestamp at which the Pix expires.", + "type": ["integer", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_promptpay": { + "description": "", + "properties": { + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_sofort": { + "description": "", + "properties": { + "preferred_language": { + "description": "Preferred language of the SOFORT authorization page that the customer is redirected to.", + "enum": ["de", "en", "es", "fr", "it", "nl", "pl", null], + "type": ["string", "null"] + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none", "off_session"], + "type": "string" + } + }, + "title": "payment_method_options_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_options_wechat_pay": { + "description": "", + "properties": { + "app_id": { + "description": "The app ID registered with WeChat Pay. Only required when client is ios or android.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "client": { + "description": "The client type that the end customer will pay from", + "enum": ["android", "ios", "web", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "setup_future_usage": { + "description": "Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).", + "enum": ["none"], + "type": "string" + } + }, + "title": "payment_method_options_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_oxxo": { + "description": "", + "properties": {}, + "title": "payment_method_oxxo", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_p24": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank, if provided.", + "enum": [ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "volkswagen_bank", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + } + }, + "title": "payment_method_p24", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_paynow": { + "description": "", + "properties": {}, + "title": "payment_method_paynow", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_pix": { + "description": "", + "properties": {}, + "title": "payment_method_pix", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_promptpay": { + "description": "", + "properties": {}, + "title": "payment_method_promptpay", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_sepa_debit": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "branch_code": { + "description": "Branch code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_from": { + "anyOf": [ + { + "$ref": "#/definitions/sepa_debit_generated_from" + }, + { + "type": "null" + } + ], + "description": "Information about the object that generated this PaymentMethod." + }, + "last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_sepa_debit", + "type": "object", + "x-expandableFields": ["generated_from"] + }, + "payment_method_sofort": { + "description": "", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country the bank account is located in.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_sofort", + "type": "object", + "x-expandableFields": [] + }, + "payment_method_us_bank_account": { + "description": "", + "properties": { + "account_holder_type": { + "description": "Account holder type: individual or company.", + "enum": ["company", "individual", null], + "type": ["string", "null"] + }, + "account_type": { + "description": "Account type: checkings or savings. Defaults to checking if omitted.", + "enum": ["checking", "savings", null], + "type": ["string", "null"] + }, + "bank_name": { + "description": "The name of the bank.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "financial_connections_account": { + "description": "The ID of the Financial Connections Account used to create the payment method.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fingerprint": { + "description": "Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "Last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "networks": { + "anyOf": [ + { + "$ref": "#/definitions/us_bank_account_networks" + }, + { + "type": "null" + } + ], + "description": "Contains information about US bank account networks that can be used." + }, + "routing_number": { + "description": "Routing number of the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "payment_method_us_bank_account", + "type": "object", + "x-expandableFields": ["networks"] + }, + "payment_method_wechat_pay": { + "description": "", + "properties": {}, + "title": "payment_method_wechat_pay", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_after_expiration": { + "description": "", + "properties": { + "recovery": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_after_expiration_recovery" + }, + { + "type": "null" + } + ], + "description": "When set, configuration used to recover the Checkout Session on expiry." + } + }, + "title": "PaymentPagesCheckoutSessionAfterExpiration", + "type": "object", + "x-expandableFields": ["recovery"] + }, + "payment_pages_checkout_session_after_expiration_recovery": { + "description": "", + "properties": { + "allow_promotion_codes": { + "description": "Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`", + "type": "boolean" + }, + "enabled": { + "description": "If `true`, a recovery url will be generated to recover this Checkout Session if it\nexpires before a transaction is completed. It will be attached to the\nCheckout Session object upon expiration.", + "type": "boolean" + }, + "expires_at": { + "description": "The timestamp at which the recovery URL will expire.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "url": { + "description": "URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["allow_promotion_codes", "enabled"], + "title": "PaymentPagesCheckoutSessionAfterExpirationRecovery", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether automatic tax is enabled for the session", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this session.", + "enum": ["complete", "failed", "requires_location_inputs", null], + "type": ["string", "null"] + } + }, + "required": ["enabled"], + "title": "PaymentPagesCheckoutSessionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent": { + "description": "", + "properties": { + "promotions": { + "description": "If `opt_in`, the customer consents to receiving promotional communications\nfrom the merchant about this Checkout Session.", + "enum": ["opt_in", "opt_out", null], + "type": ["string", "null"] + }, + "terms_of_service": { + "description": "If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.", + "enum": ["accepted", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + } + }, + "title": "PaymentPagesCheckoutSessionConsent", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_consent_collection": { + "description": "", + "properties": { + "promotions": { + "description": "If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout\nSession will determine whether to display an option to opt into promotional communication\nfrom the merchant depending on the customer's locale. Only available to US merchants.", + "enum": ["auto", "none", null], + "type": ["string", "null"] + }, + "terms_of_service": { + "description": "If set to `required`, it requires customers to accept the terms of service before being able to pay.", + "enum": ["none", "required", null], + "type": ["string", "null"] + } + }, + "title": "PaymentPagesCheckoutSessionConsentCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields": { + "description": "", + "properties": { + "dropdown": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_custom_fields_dropdown" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=dropdown` fields." + }, + "key": { + "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", + "maxLength": 5000, + "type": "string" + }, + "label": { + "$ref": "#/definitions/payment_pages_checkout_session_custom_fields_label" + }, + "numeric": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_custom_fields_numeric" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=numeric` fields." + }, + "optional": { + "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", + "type": "boolean" + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_custom_fields_text" + }, + { + "type": "null" + } + ], + "description": "Configuration for `type=text` fields." + }, + "type": { + "description": "The type of the field.", + "enum": ["dropdown", "numeric", "text"], + "type": "string" + } + }, + "required": ["key", "label", "optional", "type"], + "title": "PaymentPagesCheckoutSessionCustomFields", + "type": "object", + "x-expandableFields": ["dropdown", "label", "numeric", "text"] + }, + "payment_pages_checkout_session_custom_fields_dropdown": { + "description": "", + "properties": { + "options": { + "description": "The options available for the customer to select. Up to 200 options allowed.", + "items": { + "$ref": "#/definitions/payment_pages_checkout_session_custom_fields_option" + }, + "type": "array" + }, + "value": { + "description": "The option selected by the customer. This will be the `value` for the option.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["options"], + "title": "PaymentPagesCheckoutSessionCustomFieldsDropdown", + "type": "object", + "x-expandableFields": ["options"] + }, + "payment_pages_checkout_session_custom_fields_label": { + "description": "", + "properties": { + "custom": { + "description": "Custom text for the label, displayed to the customer. Up to 50 characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "type": { + "description": "The type of the label.", + "enum": ["custom"], + "type": "string" + } + }, + "required": ["type"], + "title": "PaymentPagesCheckoutSessionCustomFieldsLabel", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_numeric": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer, containing only digits.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsNumeric", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_option": { + "description": "", + "properties": { + "label": { + "description": "The label for the option, displayed to the customer. Up to 100 characters.", + "maxLength": 5000, + "type": "string" + }, + "value": { + "description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["label", "value"], + "title": "PaymentPagesCheckoutSessionCustomFieldsOption", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_fields_text": { + "description": "", + "properties": { + "value": { + "description": "The value entered by the customer.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PaymentPagesCheckoutSessionCustomFieldsText", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_custom_text": { + "description": "", + "properties": { + "shipping_address": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside shipping address collection." + }, + "submit": { + "anyOf": [ + { + "$ref": "#/definitions/payment_pages_checkout_session_custom_text_position" + }, + { + "type": "null" + } + ], + "description": "Custom text that should be displayed alongside the payment confirmation button." + } + }, + "title": "PaymentPagesCheckoutSessionCustomText", + "type": "object", + "x-expandableFields": ["shipping_address", "submit"] + }, + "payment_pages_checkout_session_custom_text_position": { + "description": "", + "properties": { + "message": { + "description": "Text may be up to 1000 characters in length.", + "maxLength": 500, + "type": "string" + } + }, + "required": ["message"], + "title": "PaymentPagesCheckoutSessionCustomTextPosition", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022." + }, + "email": { + "description": "The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.\nOtherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "phone": { + "description": "The customer's phone number after a completed Checkout Session.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "tax_exempt": { + "description": "The customer’s tax exempt status after a completed Checkout Session.", + "enum": ["exempt", "none", "reverse", null], + "type": ["string", "null"] + }, + "tax_ids": { + "description": "The customer’s tax IDs after a completed Checkout Session.", + "items": { + "$ref": "#/definitions/payment_pages_checkout_session_tax_id" + }, + "type": ["array", "null"] + } + }, + "title": "PaymentPagesCheckoutSessionCustomerDetails", + "type": "object", + "x-expandableFields": ["address", "tax_ids"] + }, + "payment_pages_checkout_session_invoice_creation": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether invoice creation is enabled for the Checkout Session.", + "type": "boolean" + }, + "invoice_data": { + "$ref": "#/definitions/payment_pages_checkout_session_invoice_settings" + } + }, + "required": ["enabled", "invoice_data"], + "title": "PaymentPagesCheckoutSessionInvoiceCreation", + "type": "object", + "x-expandableFields": ["invoice_data"] + }, + "payment_pages_checkout_session_invoice_settings": { + "description": "", + "properties": { + "account_tax_ids": { + "description": "The account tax IDs associated with the invoice.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_id" + }, + { + "$ref": "#/definitions/deleted_tax_id" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_id" + }, + { + "$ref": "#/definitions/deleted_tax_id" + } + ] + } + }, + "type": ["array", "null"] + }, + "custom_fields": { + "description": "Custom fields displayed on the invoice.", + "items": { + "$ref": "#/definitions/invoice_setting_custom_field" + }, + "type": ["array", "null"] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "footer": { + "description": "Footer displayed on the invoice.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "rendering_options": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_rendering_options" + }, + { + "type": "null" + } + ], + "description": "Options for invoice PDF rendering." + } + }, + "title": "PaymentPagesCheckoutSessionInvoiceSettings", + "type": "object", + "x-expandableFields": [ + "account_tax_ids", + "custom_fields", + "rendering_options" + ] + }, + "payment_pages_checkout_session_phone_number_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether phone number collection is enabled for the session", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentPagesCheckoutSessionPhoneNumberCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_address_collection": { + "description": "", + "properties": { + "allowed_countries": { + "description": "An array of two-letter ISO country codes representing which countries Checkout should provide as options for\nshipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.", + "items": { + "enum": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["allowed_countries"], + "title": "PaymentPagesCheckoutSessionShippingAddressCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_shipping_cost": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total shipping cost before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_tax": { + "description": "Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.", + "type": "integer" + }, + "amount_total": { + "description": "Total shipping cost after discounts and taxes are applied.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/shipping_rate" + }, + { + "type": "null" + } + ], + "description": "The ID of the ShippingRate for this order.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/shipping_rate" + } + ] + } + }, + "taxes": { + "description": "The taxes applied to the shipping rate.", + "items": { + "$ref": "#/definitions/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["amount_subtotal", "amount_tax", "amount_total"], + "title": "PaymentPagesCheckoutSessionShippingCost", + "type": "object", + "x-expandableFields": ["shipping_rate", "taxes"] + }, + "payment_pages_checkout_session_shipping_option": { + "description": "", + "properties": { + "shipping_amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "shipping_rate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/shipping_rate" + } + ], + "description": "The shipping rate.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/shipping_rate" + } + ] + } + } + }, + "required": ["shipping_amount", "shipping_rate"], + "title": "PaymentPagesCheckoutSessionShippingOption", + "type": "object", + "x-expandableFields": ["shipping_rate"] + }, + "payment_pages_checkout_session_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `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`, or `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["type"], + "title": "PaymentPagesCheckoutSessionTaxID", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_tax_id_collection": { + "description": "", + "properties": { + "enabled": { + "description": "Indicates whether tax ID collection is enabled for the session", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PaymentPagesCheckoutSessionTaxIDCollection", + "type": "object", + "x-expandableFields": [] + }, + "payment_pages_checkout_session_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": ["integer", "null"] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/definitions/payment_pages_checkout_session_total_details_resource_breakdown" + } + }, + "required": ["amount_discount", "amount_tax"], + "title": "PaymentPagesCheckoutSessionTotalDetails", + "type": "object", + "x-expandableFields": ["breakdown"] + }, + "payment_pages_checkout_session_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/definitions/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/definitions/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["discounts", "taxes"], + "title": "PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": ["discounts", "taxes"] + }, + "payment_source": { + "anyOf": [ + { + "$ref": "#/definitions/account" + }, + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + } + ], + "title": "Polymorphic", + "x-resourceId": "payment_source", + "x-stripeBypassValidation": true + }, + "payout": { + "description": "A `Payout` object is created when you receive funds from Stripe, or when you\ninitiate a payout to either a bank account or debit card of a [connected\nStripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,\nas well as list all payouts. Payouts are made on [varying\nschedules](/docs/connect/manage-payout-schedule), depending on your country and\nindustry.\n\nRelated guide: [Receiving Payouts](https://stripe.com/docs/payouts).", + "properties": { + "amount": { + "description": "Amount (in %s) to be transferred to your bank account or debit card.", + "type": "integer" + }, + "arrival_date": { + "description": "Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.", + "format": "unix-time", + "type": "integer" + }, + "automatic": { + "description": "Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts).", + "type": "boolean" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "ID of the balance transaction that describes the impact of this payout on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/deleted_bank_account" + }, + { + "$ref": "#/definitions/deleted_card" + }, + { + "type": "null" + } + ], + "description": "ID of the bank account or card the payout was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/deleted_bank_account" + }, + { + "$ref": "#/definitions/deleted_card" + } + ] + }, + "x-stripeBypassValidation": true + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "failure_code": { + "description": "Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "failure_message": { + "description": "Message to user further explaining reason for payout failure if available.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "method": { + "description": "The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)", + "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": "#/definitions/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout reverses another, this is the ID of the original payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payout" + } + ] + } + }, + "reversed_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payout" + }, + { + "type": "null" + } + ], + "description": "If the payout was reversed, this is the ID of the payout that reverses this payout.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payout" + } + ] + } + }, + "source_type": { + "description": "The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about a payout to be displayed on the user's bank statement.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Can be `bank_account` or `card`.", + "enum": ["bank_account", "card"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": [ + "amount", + "arrival_date", + "automatic", + "created", + "currency", + "id", + "livemode", + "method", + "object", + "source_type", + "status", + "type" + ], + "title": "Payout", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "failure_balance_transaction", + "original_payout", + "reversed_by" + ], + "x-resourceId": "payout" + }, + "period": { + "description": "", + "properties": { + "end": { + "description": "The end date of this usage period. All usage up to and including this point in time is included.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "start": { + "description": "The start date of this usage period. All usage after this point in time is included.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "Period", + "type": "object", + "x-expandableFields": [] + }, + "person": { + "description": "This is an object representing a person associated with a Stripe account.\n\nA platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.\nSee the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.\n\nRelated guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).", + "properties": { + "account": { + "description": "The account the person is associated with.", + "maxLength": 5000, + "type": "string" + }, + "address": { + "$ref": "#/definitions/address" + }, + "address_kana": { + "anyOf": [ + { + "$ref": "#/definitions/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "address_kanji": { + "anyOf": [ + { + "$ref": "#/definitions/legal_entity_japan_address" + }, + { + "type": "null" + } + ] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "dob": { + "$ref": "#/definitions/legal_entity_dob" + }, + "email": { + "description": "The person's email address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "first_name": { + "description": "The person's first name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "first_name_kana": { + "description": "The Kana variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "first_name_kanji": { + "description": "The Kanji variation of the person's first name (Japan only).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "full_name_aliases": { + "description": "A list of alternate names or aliases that the person is known by.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "future_requirements": { + "anyOf": [ + { + "$ref": "#/definitions/person_future_requirements" + }, + { + "type": "null" + } + ] + }, + "gender": { + "description": "The person's gender (International regulations require either \"male\" or \"female\").", + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "id_number_provided": { + "description": "Whether the person's `id_number` was provided.", + "type": "boolean" + }, + "id_number_secondary_provided": { + "description": "Whether the person's `id_number_secondary` was provided.", + "type": "boolean" + }, + "last_name": { + "description": "The person's last name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last_name_kana": { + "description": "The Kana variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last_name_kanji": { + "description": "The Kanji variation of the person's last name (Japan only).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "maiden_name": { + "description": "The person's maiden name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nationality": { + "description": "The country where the person is a national.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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": "#/definitions/address" + }, + "relationship": { + "$ref": "#/definitions/person_relationship" + }, + "requirements": { + "anyOf": [ + { + "$ref": "#/definitions/person_requirements" + }, + { + "type": "null" + } + ] + }, + "ssn_last_4_provided": { + "description": "Whether the last four digits of the person's Social Security number have been provided (U.S. only).", + "type": "boolean" + }, + "verification": { + "$ref": "#/definitions/legal_entity_person_verification" + } + }, + "required": ["account", "created", "id", "object"], + "title": "Person", + "type": "object", + "x-expandableFields": [ + "address", + "address_kana", + "address_kanji", + "dob", + "future_requirements", + "registered_address", + "relationship", + "requirements", + "verification" + ], + "x-resourceId": "person" + }, + "person_future_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/definitions/account_requirements_alternative" + }, + "type": ["array", "null"] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/definitions/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonFutureRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "person_relationship": { + "description": "", + "properties": { + "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.", + "type": ["boolean", "null"] + }, + "executive": { + "description": "Whether the person has significant responsibility to control, manage, or direct the organization.", + "type": ["boolean", "null"] + }, + "owner": { + "description": "Whether the person is an owner of the account’s legal entity.", + "type": ["boolean", "null"] + }, + "percent_ownership": { + "description": "The percent owned by the person of the account's legal entity.", + "type": ["number", "null"] + }, + "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.", + "type": ["boolean", "null"] + }, + "title": { + "description": "The person's title (e.g., CEO, Support Engineer).", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PersonRelationship", + "type": "object", + "x-expandableFields": [] + }, + "person_requirements": { + "description": "", + "properties": { + "alternatives": { + "description": "Fields that are due and can be satisfied by providing the corresponding alternative fields instead.", + "items": { + "$ref": "#/definitions/account_requirements_alternative" + }, + "type": ["array", "null"] + }, + "currently_due": { + "description": "Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "errors": { + "description": "Fields that are `currently_due` and need to be collected again because validation or verification failed.", + "items": { + "$ref": "#/definitions/account_requirements_error" + }, + "type": "array" + }, + "eventually_due": { + "description": "Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "past_due": { + "description": "Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "pending_verification": { + "description": "Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "currently_due", + "errors", + "eventually_due", + "past_due", + "pending_verification" + ], + "title": "PersonRequirements", + "type": "object", + "x-expandableFields": ["alternatives", "errors"] + }, + "plan": { + "description": "You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.\n\nPlans define the base price, currency, and billing cycle for recurring purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has plans for $10/month, $100/year, €9/month, and €90/year.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the plan can be used for new purchases.", + "type": "boolean" + }, + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": ["last_during_period", "last_ever", "max", "sum", null], + "type": ["string", "null"] + }, + "amount": { + "description": "The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": ["integer", "null"] + }, + "amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": ["string", "null"] + }, + "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).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "nickname": { + "description": "A brief description of the plan, hidden from customers.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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": "#/definitions/product" + }, + { + "$ref": "#/definitions/deleted_product" + }, + { + "type": "null" + } + ], + "description": "The product whose pricing this plan determines.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/product" + }, + { + "$ref": "#/definitions/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": "#/definitions/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", null], + "type": ["string", "null"] + }, + "transform_usage": { + "anyOf": [ + { + "$ref": "#/definitions/transform_usage" + }, + { + "type": "null" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`." + }, + "trial_period_days": { + "description": "Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).", + "type": ["integer", "null"] + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "interval", + "interval_count", + "livemode", + "object", + "usage_type" + ], + "title": "Plan", + "type": "object", + "x-expandableFields": ["product", "tiers", "transform_usage"], + "x-resourceId": "plan" + }, + "plan_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "type": ["integer", "null"] + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "type": ["integer", "null"] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "type": ["integer", "null"] + } + }, + "title": "PlanTier", + "type": "object", + "x-expandableFields": [] + }, + "platform_tax_fee": { + "description": "", + "properties": { + "account": { + "description": "The Connected account that incurred this charge.", + "maxLength": 5000, + "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": ["platform_tax_fee"], + "type": "string" + }, + "source_transaction": { + "description": "The payment object that caused this tax to be inflicted.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of tax (VAT).", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["account", "id", "object", "source_transaction", "type"], + "title": "PlatformTax", + "type": "object", + "x-expandableFields": [] + }, + "portal_business_profile": { + "description": "", + "properties": { + "headline": { + "description": "The messaging shown to customers in the portal.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "privacy_policy_url": { + "description": "A link to the business’s publicly available privacy policy.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "terms_of_service_url": { + "description": "A link to the business’s publicly available terms of service.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PortalBusinessProfile", + "type": "object", + "x-expandableFields": [] + }, + "portal_customer_update": { + "description": "", + "properties": { + "allowed_updates": { + "description": "The types of customer updates that are supported. When empty, customers are not updateable.", + "items": { + "enum": ["address", "email", "name", "phone", "shipping", "tax_id"], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["allowed_updates", "enabled"], + "title": "PortalCustomerUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_features": { + "description": "", + "properties": { + "customer_update": { + "$ref": "#/definitions/portal_customer_update" + }, + "invoice_history": { + "$ref": "#/definitions/portal_invoice_list" + }, + "payment_method_update": { + "$ref": "#/definitions/portal_payment_method_update" + }, + "subscription_cancel": { + "$ref": "#/definitions/portal_subscription_cancel" + }, + "subscription_pause": { + "$ref": "#/definitions/portal_subscription_pause" + }, + "subscription_update": { + "$ref": "#/definitions/portal_subscription_update" + } + }, + "required": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_pause", + "subscription_update" + ], + "title": "PortalFeatures", + "type": "object", + "x-expandableFields": [ + "customer_update", + "invoice_history", + "payment_method_update", + "subscription_cancel", + "subscription_pause", + "subscription_update" + ] + }, + "portal_flows_after_completion_hosted_confirmation": { + "description": "", + "properties": { + "custom_message": { + "description": "A custom message to display to the customer after the flow is completed.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "PortalFlowsAfterCompletionHostedConfirmation", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_after_completion_redirect": { + "description": "", + "properties": { + "return_url": { + "description": "The URL the customer will be redirected to after the flow is completed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["return_url"], + "title": "PortalFlowsAfterCompletionRedirect", + "type": "object", + "x-expandableFields": [] + }, + "portal_flows_flow": { + "description": "", + "properties": { + "after_completion": { + "$ref": "#/definitions/portal_flows_flow_after_completion" + }, + "subscription_cancel": { + "anyOf": [ + { + "$ref": "#/definitions/portal_flows_flow_subscription_cancel" + }, + { + "type": "null" + } + ], + "description": "Configuration when `flow.type=subscription_cancel`." + }, + "type": { + "description": "Type of flow that the customer will go through.", + "enum": ["payment_method_update", "subscription_cancel"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["after_completion", "type"], + "title": "PortalFlowsFlow", + "type": "object", + "x-expandableFields": ["after_completion", "subscription_cancel"] + }, + "portal_flows_flow_after_completion": { + "description": "", + "properties": { + "hosted_confirmation": { + "anyOf": [ + { + "$ref": "#/definitions/portal_flows_after_completion_hosted_confirmation" + }, + { + "type": "null" + } + ], + "description": "Configuration when `after_completion.type=hosted_confirmation`." + }, + "redirect": { + "anyOf": [ + { + "$ref": "#/definitions/portal_flows_after_completion_redirect" + }, + { + "type": "null" + } + ], + "description": "Configuration when `after_completion.type=redirect`." + }, + "type": { + "description": "The specified type of behavior after the flow is completed.", + "enum": ["hosted_confirmation", "portal_homepage", "redirect"], + "type": "string" + } + }, + "required": ["type"], + "title": "PortalFlowsFlowAfterCompletion", + "type": "object", + "x-expandableFields": ["hosted_confirmation", "redirect"] + }, + "portal_flows_flow_subscription_cancel": { + "description": "", + "properties": { + "subscription": { + "description": "The ID of the subscription to be canceled.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["subscription"], + "title": "PortalFlowsFlowSubscriptionCancel", + "type": "object", + "x-expandableFields": [] + }, + "portal_invoice_list": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PortalInvoiceList", + "type": "object", + "x-expandableFields": [] + }, + "portal_login_page": { + "description": "", + "properties": { + "enabled": { + "description": "If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.\n\nIf `false`, the previously generated `url`, if any, will be deactivated.", + "type": "boolean" + }, + "url": { + "description": "A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["enabled"], + "title": "PortalLoginPage", + "type": "object", + "x-expandableFields": [] + }, + "portal_payment_method_update": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PortalPaymentMethodUpdate", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_cancel": { + "description": "", + "properties": { + "cancellation_reason": { + "$ref": "#/definitions/portal_subscription_cancellation_reason" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "mode": { + "description": "Whether to cancel subscriptions immediately or at the end of the billing period.", + "enum": ["at_period_end", "immediately"], + "type": "string" + }, + "proration_behavior": { + "description": "Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "required": [ + "cancellation_reason", + "enabled", + "mode", + "proration_behavior" + ], + "title": "PortalSubscriptionCancel", + "type": "object", + "x-expandableFields": ["cancellation_reason"] + }, + "portal_subscription_cancellation_reason": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "options": { + "description": "Which cancellation reasons will be given as options to the customer.", + "items": { + "enum": [ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": ["enabled", "options"], + "title": "PortalSubscriptionCancellationReason", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_pause": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "PortalSubscriptionPause", + "type": "object", + "x-expandableFields": [] + }, + "portal_subscription_update": { + "description": "", + "properties": { + "default_allowed_updates": { + "description": "The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.", + "items": { + "enum": ["price", "promotion_code", "quantity"], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Whether the feature is enabled.", + "type": "boolean" + }, + "products": { + "description": "The list of products that support subscription updates.", + "items": { + "$ref": "#/definitions/portal_subscription_update_product" + }, + "type": ["array", "null"] + }, + "proration_behavior": { + "description": "Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + } + }, + "required": ["default_allowed_updates", "enabled", "proration_behavior"], + "title": "PortalSubscriptionUpdate", + "type": "object", + "x-expandableFields": ["products"] + }, + "portal_subscription_update_product": { + "description": "", + "properties": { + "prices": { + "description": "The list of price IDs which, when subscribed to, a subscription can be updated.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "product": { + "description": "The product ID.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["prices", "product"], + "title": "PortalSubscriptionUpdateProduct", + "type": "object", + "x-expandableFields": [] + }, + "price": { + "description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).", + "properties": { + "active": { + "description": "Whether the price can be used for new purchases.", + "type": "boolean" + }, + "billing_scheme": { + "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.", + "enum": ["per_unit", "tiered"], + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/definitions/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": "#/definitions/custom_unit_amount" + }, + { + "type": "null" + } + ], + "description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "lookup_key": { + "description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "nickname": { + "description": "A brief description of the price, hidden from customers.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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": "#/definitions/product" + }, + { + "$ref": "#/definitions/deleted_product" + } + ], + "description": "The ID of the product this price is associated with.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/product" + }, + { + "$ref": "#/definitions/deleted_product" + } + ] + } + }, + "recurring": { + "anyOf": [ + { + "$ref": "#/definitions/recurring" + }, + { + "type": "null" + } + ], + "description": "The recurring components of a price such as `interval` and `usage_type`." + }, + "tax_behavior": { + "description": "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", null], + "type": ["string", "null"] + }, + "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": "#/definitions/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", null], + "type": ["string", "null"] + }, + "transform_quantity": { + "anyOf": [ + { + "$ref": "#/definitions/transform_quantity" + }, + { + "type": "null" + } + ], + "description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`." + }, + "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 %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.", + "type": ["integer", "null"] + }, + "unit_amount_decimal": { + "description": "The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.", + "format": "decimal", + "type": ["string", "null"] + } + }, + "required": [ + "active", + "billing_scheme", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "product", + "type" + ], + "title": "Price", + "type": "object", + "x-expandableFields": [ + "currency_options", + "custom_unit_amount", + "product", + "recurring", + "tiers", + "transform_quantity" + ], + "x-resourceId": "price" + }, + "price_tier": { + "description": "", + "properties": { + "flat_amount": { + "description": "Price for the entire tier.", + "type": ["integer", "null"] + }, + "flat_amount_decimal": { + "description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + }, + "unit_amount": { + "description": "Per unit price for units relevant to the tier.", + "type": ["integer", "null"] + }, + "unit_amount_decimal": { + "description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.", + "format": "decimal", + "type": ["string", "null"] + }, + "up_to": { + "description": "Up to and including to this quantity will be contained in the tier.", + "type": ["integer", "null"] + } + }, + "title": "PriceTier", + "type": "object", + "x-expandableFields": [] + }, + "product": { + "description": "Products describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),\n[share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),\n[accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),\nand more about [Products and Prices](https://stripe.com/docs/products-prices/overview)", + "properties": { + "active": { + "description": "Whether the product is currently available for purchase.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/price" + }, + { + "type": "null" + } + ], + "description": "The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "images": { + "description": "A list of up to 8 URLs of images for this product, meant to be displayable to the customer.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The product's name, meant to be displayable to the customer.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["product"], + "type": "string" + }, + "package_dimensions": { + "anyOf": [ + { + "$ref": "#/definitions/package_dimensions" + }, + { + "type": "null" + } + ], + "description": "The dimensions of this product for shipping purposes." + }, + "shippable": { + "description": "Whether this product is shipped (i.e., physical goods).", + "type": ["boolean", "null"] + }, + "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.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_code" + } + ] + } + }, + "unit_label": { + "description": "A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "required": [ + "active", + "created", + "id", + "images", + "livemode", + "metadata", + "name", + "object", + "updated" + ], + "title": "Product", + "type": "object", + "x-expandableFields": ["default_price", "package_dimensions", "tax_code"], + "x-resourceId": "product" + }, + "promotion_code": { + "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.", + "properties": { + "active": { + "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.", + "type": "boolean" + }, + "code": { + "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.", + "maxLength": 5000, + "type": "string" + }, + "coupon": { + "$ref": "#/definitions/coupon" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer that this promotion code can be used by.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "expires_at": { + "description": "Date at which the promotion code can no longer be redeemed.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "max_redemptions": { + "description": "Maximum number of times this promotion code can be redeemed.", + "type": ["integer", "null"] + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["promotion_code"], + "type": "string" + }, + "restrictions": { + "$ref": "#/definitions/promotion_codes_resource_restrictions" + }, + "times_redeemed": { + "description": "Number of times this promotion code has been used.", + "type": "integer" + } + }, + "required": [ + "active", + "code", + "coupon", + "created", + "id", + "livemode", + "object", + "restrictions", + "times_redeemed" + ], + "title": "PromotionCode", + "type": "object", + "x-expandableFields": ["coupon", "customer", "restrictions"], + "x-resourceId": "promotion_code" + }, + "promotion_code_currency_option": { + "description": "", + "properties": { + "minimum_amount": { + "description": "Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).", + "type": "integer" + } + }, + "required": ["minimum_amount"], + "title": "PromotionCodeCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "promotion_codes_resource_restrictions": { + "description": "", + "properties": { + "currency_options": { + "additionalProperties": { + "$ref": "#/definitions/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).", + "type": ["integer", "null"] + }, + "minimum_amount_currency": { + "description": "Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["first_time_transaction"], + "title": "PromotionCodesResourceRestrictions", + "type": "object", + "x-expandableFields": ["currency_options"] + }, + "quote": { + "description": "A Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule.", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + } + ] + } + }, + "application_fee_amount": { + "description": "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.", + "type": ["integer", "null"] + }, + "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 subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.", + "type": ["number", "null"] + }, + "automatic_tax": { + "$ref": "#/definitions/quotes_resource_automatic_tax" + }, + "collection_method": { + "description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.", + "enum": ["charge_automatically", "send_invoice"], + "type": "string" + }, + "computed": { + "$ref": "#/definitions/quotes_resource_computed" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "default_tax_rates": { + "description": "The tax rates applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_rate" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_rate" + } + ] + } + }, + "type": "array" + }, + "description": { + "description": "A description that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "discounts": { + "description": "The discounts applied to this quote.", + "items": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/discount" + } + ], + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/discount" + } + ] + } + }, + "type": "array" + }, + "expires_at": { + "description": "The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "footer": { + "description": "A footer that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "from_quote": { + "anyOf": [ + { + "$ref": "#/definitions/quotes_resource_from_quote" + }, + { + "type": "null" + } + ], + "description": "Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details." + }, + "header": { + "description": "A header that will be displayed on the quote PDF.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "$ref": "#/definitions/deleted_invoice" + }, + { + "type": "null" + } + ], + "description": "The invoice that was created from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + }, + { + "$ref": "#/definitions/deleted_invoice" + } + ] + } + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_quote_setting" + }, + { + "type": "null" + } + ], + "description": "All invoices will be billed using the specified settings." + }, + "line_items": { + "description": "A list of items the customer is being quoted for.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "number": { + "description": "A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["quote"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "status": { + "description": "The status of the quote.", + "enum": ["accepted", "canceled", "draft", "open"], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_transitions": { + "$ref": "#/definitions/quotes_resource_status_transitions" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription" + }, + { + "type": "null" + } + ], + "description": "The subscription that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/subscription" + } + ] + } + }, + "subscription_data": { + "$ref": "#/definitions/quotes_resource_subscription_data_subscription_data" + }, + "subscription_schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule that was created or updated from this quote.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/subscription_schedule" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this quote belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/test_helpers.test_clock" + } + ] + } + }, + "total_details": { + "$ref": "#/definitions/quotes_resource_total_details" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/quotes_resource_transfer_data" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices." + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "automatic_tax", + "collection_method", + "computed", + "created", + "discounts", + "expires_at", + "id", + "livemode", + "metadata", + "object", + "status", + "status_transitions", + "subscription_data", + "total_details" + ], + "title": "Quote", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "computed", + "customer", + "default_tax_rates", + "discounts", + "from_quote", + "invoice", + "invoice_settings", + "line_items", + "on_behalf_of", + "status_transitions", + "subscription", + "subscription_data", + "subscription_schedule", + "test_clock", + "total_details", + "transfer_data" + ], + "x-resourceId": "quote" + }, + "quotes_resource_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Automatically calculate taxes", + "type": "boolean" + }, + "status": { + "description": "The status of the most recent automated tax calculation for this quote.", + "enum": ["complete", "failed", "requires_location_inputs", null], + "type": ["string", "null"] + } + }, + "required": ["enabled"], + "title": "QuotesResourceAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_computed": { + "description": "", + "properties": { + "recurring": { + "anyOf": [ + { + "$ref": "#/definitions/quotes_resource_recurring" + }, + { + "type": "null" + } + ], + "description": "The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices." + }, + "upfront": { + "$ref": "#/definitions/quotes_resource_upfront" + } + }, + "required": ["upfront"], + "title": "QuotesResourceComputed", + "type": "object", + "x-expandableFields": ["recurring", "upfront"] + }, + "quotes_resource_from_quote": { + "description": "", + "properties": { + "is_revision": { + "description": "Whether this quote is a revision of a different quote.", + "type": "boolean" + }, + "quote": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/quote" + } + ], + "description": "The quote that was cloned.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/quote" + } + ] + } + } + }, + "required": ["is_revision", "quote"], + "title": "QuotesResourceFromQuote", + "type": "object", + "x-expandableFields": ["quote"] + }, + "quotes_resource_recurring": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "interval": { + "description": "The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.", + "type": "integer" + }, + "total_details": { + "$ref": "#/definitions/quotes_resource_total_details" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "interval", + "interval_count", + "total_details" + ], + "title": "QuotesResourceRecurring", + "type": "object", + "x-expandableFields": ["total_details"] + }, + "quotes_resource_status_transitions": { + "description": "", + "properties": { + "accepted_at": { + "description": "The time that the quote was accepted. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "canceled_at": { + "description": "The time that the quote was canceled. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "finalized_at": { + "description": "The time that the quote was finalized. Measured in seconds since Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "QuotesResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_subscription_data_subscription_data": { + "description": "", + "properties": { + "description": { + "description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "effective_date": { + "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "trial_period_days": { + "description": "Integer representing the number of trial period days before the customer is charged for the first time.", + "type": ["integer", "null"] + } + }, + "title": "QuotesResourceSubscriptionDataSubscriptionData", + "type": "object", + "x-expandableFields": [] + }, + "quotes_resource_total_details": { + "description": "", + "properties": { + "amount_discount": { + "description": "This is the sum of all the discounts.", + "type": "integer" + }, + "amount_shipping": { + "description": "This is the sum of all the shipping amounts.", + "type": ["integer", "null"] + }, + "amount_tax": { + "description": "This is the sum of all the tax amounts.", + "type": "integer" + }, + "breakdown": { + "$ref": "#/definitions/quotes_resource_total_details_resource_breakdown" + } + }, + "required": ["amount_discount", "amount_tax"], + "title": "QuotesResourceTotalDetails", + "type": "object", + "x-expandableFields": ["breakdown"] + }, + "quotes_resource_total_details_resource_breakdown": { + "description": "", + "properties": { + "discounts": { + "description": "The aggregated discounts.", + "items": { + "$ref": "#/definitions/line_items_discount_amount" + }, + "type": "array" + }, + "taxes": { + "description": "The aggregated tax amounts by rate.", + "items": { + "$ref": "#/definitions/line_items_tax_amount" + }, + "type": "array" + } + }, + "required": ["discounts", "taxes"], + "title": "QuotesResourceTotalDetailsResourceBreakdown", + "type": "object", + "x-expandableFields": ["discounts", "taxes"] + }, + "quotes_resource_transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.", + "type": ["integer", "null"] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.", + "type": ["number", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "QuotesResourceTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "quotes_resource_upfront": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total before any discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total after discounts and taxes are applied.", + "type": "integer" + }, + "line_items": { + "description": "The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "QuotesResourceListLineItems", + "type": "object", + "x-expandableFields": ["data"] + }, + "total_details": { + "$ref": "#/definitions/quotes_resource_total_details" + } + }, + "required": ["amount_subtotal", "amount_total", "total_details"], + "title": "QuotesResourceUpfront", + "type": "object", + "x-expandableFields": ["line_items", "total_details"] + }, + "radar.early_fraud_warning": { + "description": "An early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.\n\nRelated guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).", + "properties": { + "actionable": { + "description": "An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.", + "type": "boolean" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + } + ], + "description": "ID of the charge this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "fraud_type": { + "description": "The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.early_fraud_warning"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + } + ], + "description": "ID of the Payment Intent this early fraud warning is for, optionally expanded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + } + }, + "required": [ + "actionable", + "charge", + "created", + "fraud_type", + "id", + "livemode", + "object" + ], + "title": "RadarEarlyFraudWarning", + "type": "object", + "x-expandableFields": ["charge", "payment_intent"], + "x-resourceId": "radar.early_fraud_warning" + }, + "radar.value_list": { + "description": "Value lists allow you to group values together which can then be referenced in rules.\n\nRelated guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).", + "properties": { + "alias": { + "description": "The name of the value list for use in rules.", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who created this value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "item_type": { + "description": "The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.", + "enum": [ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "string" + ], + "type": "string" + }, + "list_items": { + "description": "List of items contained within this value list.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/radar.value_list_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "RadarListListItemList", + "type": "object", + "x-expandableFields": ["data"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "name": { + "description": "The name of the value list.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list"], + "type": "string" + } + }, + "required": [ + "alias", + "created", + "created_by", + "id", + "item_type", + "list_items", + "livemode", + "metadata", + "name", + "object" + ], + "title": "RadarListList", + "type": "object", + "x-expandableFields": ["list_items"], + "x-resourceId": "radar.value_list" + }, + "radar.value_list_item": { + "description": "Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.\n\nRelated guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "created_by": { + "description": "The name or email address of the user who added this item to the value list.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["radar.value_list_item"], + "type": "string" + }, + "value": { + "description": "The value of the item.", + "maxLength": 5000, + "type": "string" + }, + "value_list": { + "description": "The identifier of the value list this item belongs to.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "created_by", + "id", + "livemode", + "object", + "value", + "value_list" + ], + "title": "RadarListListItem", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "radar.value_list_item" + }, + "radar_radar_options": { + "description": "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.", + "properties": { + "session": { + "description": "A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "RadarRadarOptions", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the payment originated.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "country": { + "description": "Two-letter ISO code representing the country where the payment originated.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "latitude": { + "description": "The geographic latitude where the payment originated.", + "type": ["number", "null"] + }, + "longitude": { + "description": "The geographic longitude where the payment originated.", + "type": ["number", "null"] + }, + "region": { + "description": "The state/county/province/region where the payment originated.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "RadarReviewResourceLocation", + "type": "object", + "x-expandableFields": [] + }, + "radar_review_resource_session": { + "description": "", + "properties": { + "browser": { + "description": "The browser used in this browser session (e.g., `Chrome`).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "device": { + "description": "Information about the device used for the browser session (e.g., `Samsung SM-G930T`).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "platform": { + "description": "The platform for the browser session (e.g., `Macintosh`).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "version": { + "description": "The version for the browser session (e.g., `61.0.3163.100`).", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "RadarReviewResourceSession", + "type": "object", + "x-expandableFields": [] + }, + "received_payment_method_details_financial_account": { + "description": "", + "properties": { + "id": { + "description": "The FinancialAccount ID.", + "maxLength": 5000, + "type": "string" + }, + "network": { + "description": "The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.", + "enum": ["stripe"], + "type": "string" + } + }, + "required": ["id", "network"], + "title": "received_payment_method_details_financial_account", + "type": "object", + "x-expandableFields": [] + }, + "recurring": { + "description": "", + "properties": { + "aggregate_usage": { + "description": "Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.", + "enum": ["last_during_period", "last_ever", "max", "sum", null], + "type": ["string", "null"] + }, + "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" + }, + "usage_type": { + "description": "Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.", + "enum": ["licensed", "metered"], + "type": "string" + } + }, + "required": ["interval", "interval_count", "usage_type"], + "title": "Recurring", + "type": "object", + "x-expandableFields": [] + }, + "refund": { + "description": "`Refund` objects allow you to refund a charge that has previously been created\nbut not yet refunded. Funds will be refunded to the credit or debit card that\nwas originally charged.\n\nRelated guide: [Refunds](https://stripe.com/docs/refunds).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)", + "maxLength": 5000, + "type": "string" + }, + "failure_balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + } + ], + "description": "If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/balance_transaction" + } + ] + } + }, + "failure_reason": { + "description": "If the refund failed, the reason for refund failure if known. 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": "Email to which refund instructions, if required, are sent to.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "next_action": { + "$ref": "#/definitions/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": "#/definitions/payment_intent" + }, + { + "type": "null" + } + ], + "description": "ID of the PaymentIntent that was refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "reason": { + "description": "Reason for the refund, 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", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this refund.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "source_transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/transfer_reversal" + } + ] + } + }, + "status": { + "description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "transfer_reversal": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/transfer_reversal" + }, + { + "type": "null" + } + ], + "description": "If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/transfer_reversal" + } + ] + } + } + }, + "required": ["amount", "created", "currency", "id", "object"], + "title": "Refund", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "charge", + "failure_balance_transaction", + "next_action", + "payment_intent", + "source_transfer_reversal", + "transfer_reversal" + ], + "x-resourceId": "refund" + }, + "refund_next_action": { + "description": "", + "properties": { + "display_details": { + "anyOf": [ + { + "$ref": "#/definitions/refund_next_action_display_details" + }, + { + "type": "null" + } + ], + "description": "Contains the refund details." + }, + "type": { + "description": "Type of the next action to perform.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "RefundNextAction", + "type": "object", + "x-expandableFields": ["display_details"] + }, + "refund_next_action_display_details": { + "description": "", + "properties": { + "email_sent": { + "$ref": "#/definitions/email_sent" + }, + "expires_at": { + "description": "The expiry timestamp.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["email_sent", "expires_at"], + "title": "RefundNextActionDisplayDetails", + "type": "object", + "x-expandableFields": ["email_sent"] + }, + "reporting.report_run": { + "description": "The Report Run object represents an instance of a report type generated with\nspecific run parameters. Once the object is created, Stripe begins processing the report.\nWhen the report has finished running, it will give you a reference to a file\nwhere you can retrieve your results. For an overview, see\n[API Access to Reports](https://stripe.com/docs/reporting/statements/api).\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "description": "If something should go wrong during the run, a message about the failure (populated when\n `status=failed`).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "`true` if the report is run on live mode data and `false` if it is run on test mode data.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["reporting.report_run"], + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/financial_reporting_finance_report_run_run_parameters" + }, + "report_type": { + "description": "The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `\"balance.summary.1\"`.", + "maxLength": 5000, + "type": "string" + }, + "result": { + "anyOf": [ + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The file object representing the result of the report run (populated when\n `status=succeeded`)." + }, + "status": { + "description": "Status of this report run. This will be `pending` when the run is initially created.\n When the run finishes, this will be set to `succeeded` and the `result` field will be populated.\n Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.", + "maxLength": 5000, + "type": "string" + }, + "succeeded_at": { + "description": "Timestamp at which this run successfully finished (populated when\n `status=succeeded`). Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "parameters", + "report_type", + "status" + ], + "title": "reporting_report_run", + "type": "object", + "x-expandableFields": ["parameters", "result"], + "x-resourceId": "reporting.report_run" + }, + "reporting.report_type": { + "description": "The Report Type resource corresponds to a particular type of report, such as\nthe \"Activity summary\" or \"Itemized payouts\" reports. These objects are\nidentified by an ID belonging to a set of enumerated values. See\n[API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)\nfor those Report Type IDs, along with required and optional parameters.\n\nNote that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).", + "properties": { + "data_available_end": { + "description": "Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_available_start": { + "description": "Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "default_columns": { + "description": "List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": ["array", "null"] + }, + "id": { + "description": "The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "Human-readable name of the Report Type", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["reporting.report_type"], + "type": "string" + }, + "updated": { + "description": "When this Report Type was latest updated. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "version": { + "description": "Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.", + "type": "integer" + } + }, + "required": [ + "data_available_end", + "data_available_start", + "id", + "livemode", + "name", + "object", + "updated", + "version" + ], + "title": "reporting_report_type", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "reporting.report_type" + }, + "reserve_transaction": { + "description": "", + "properties": { + "amount": { + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["reserve_transaction"], + "type": "string" + } + }, + "required": ["amount", "currency", "id", "object"], + "title": "ReserveTransaction", + "type": "object", + "x-expandableFields": [] + }, + "review": { + "description": "Reviews can be used to supplement automated fraud detection with human expertise.\n\nLearn more about [Radar](/radar) and reviewing payments\n[here](https://stripe.com/docs/radar/reviews).", + "properties": { + "billing_zip": { + "description": "The ZIP or postal code of the card used, if applicable.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "The charge associated with this review.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "closed_reason": { + "description": "The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "enum": [ + "approved", + "disputed", + "redacted", + "refunded", + "refunded_as_fraud", + null + ], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "ip_address_location": { + "anyOf": [ + { + "$ref": "#/definitions/radar_review_resource_location" + }, + { + "type": "null" + } + ], + "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." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["review"], + "type": "string" + }, + "open": { + "description": "If `true`, the review needs action.", + "type": "boolean" + }, + "opened_reason": { + "description": "The reason the review was opened. One of `rule` or `manual`.", + "enum": ["manual", "rule"], + "type": "string" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + } + ], + "description": "The PaymentIntent ID associated with this review, if one exists.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.", + "maxLength": 5000, + "type": "string" + }, + "session": { + "anyOf": [ + { + "$ref": "#/definitions/radar_review_resource_session" + }, + { + "type": "null" + } + ], + "description": "Information related to the browsing session of the user who initiated the payment." + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "open", + "opened_reason", + "reason" + ], + "title": "RadarReview", + "type": "object", + "x-expandableFields": [ + "charge", + "ip_address_location", + "payment_intent", + "session" + ], + "x-resourceId": "review" + }, + "rule": { + "description": "", + "properties": { + "action": { + "description": "The action taken on the payment.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "predicate": { + "description": "The predicate to evaluate the payment against.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["action", "id", "predicate"], + "title": "RadarRule", + "type": "object", + "x-expandableFields": [] + }, + "scheduled_query_run": { + "description": "If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "data_load_time": { + "description": "When the query was run, Sigma contained a snapshot of your Stripe data at this time.", + "format": "unix-time", + "type": "integer" + }, + "error": { + "$ref": "#/definitions/sigma_scheduled_query_run_error" + }, + "file": { + "anyOf": [ + { + "$ref": "#/definitions/file" + }, + { + "type": "null" + } + ], + "description": "The file object representing the results of the query." + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["scheduled_query_run"], + "type": "string" + }, + "result_available_until": { + "description": "Time at which the result expires and is no longer available for download.", + "format": "unix-time", + "type": "integer" + }, + "sql": { + "description": "SQL for the query.", + "maxLength": 100000, + "type": "string" + }, + "status": { + "description": "The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.", + "maxLength": 5000, + "type": "string" + }, + "title": { + "description": "Title of the query.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "data_load_time", + "id", + "livemode", + "object", + "result_available_until", + "sql", + "status", + "title" + ], + "title": "ScheduledQueryRun", + "type": "object", + "x-expandableFields": ["error", "file"], + "x-resourceId": "scheduled_query_run" + }, + "schedules_phase_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "SchedulesPhaseAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "secret_service_resource_scope": { + "description": "", + "properties": { + "type": { + "description": "The secret scope type.", + "enum": ["account", "user"], + "type": "string" + }, + "user": { + "description": "The user ID, if type is set to \"user\"", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["type"], + "title": "SecretServiceResourceScope", + "type": "object", + "x-expandableFields": [] + }, + "sepa_debit_generated_from": { + "description": "", + "properties": { + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "The ID of the Charge that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "setup_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The ID of the SetupAttempt that generated this PaymentMethod, if any.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_attempt" + } + ] + } + } + }, + "title": "sepa_debit_generated_from", + "type": "object", + "x-expandableFields": ["charge", "setup_attempt"] + }, + "setup_attempt": { + "description": "A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was 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": "#/definitions/application" + }, + { + "type": "null" + } + ], + "description": "The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "description": "The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": ["inbound", "outbound"], + "type": "string" + }, + "type": ["array", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["setup_attempt"], + "type": "string" + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + } + ], + "description": "ID of the payment method used with this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "payment_method_details": { + "$ref": "#/definitions/setup_attempt_payment_method_details" + }, + "setup_error": { + "anyOf": [ + { + "$ref": "#/definitions/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered during this attempt to confirm the SetupIntent, if any." + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_intent" + } + ], + "description": "ID of the SetupIntent that this attempt belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_intent" + } + ] + } + }, + "status": { + "description": "Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.", + "maxLength": 5000, + "type": "string" + }, + "usage": { + "description": "The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method", + "payment_method_details", + "setup_intent", + "status", + "usage" + ], + "title": "PaymentFlowsSetupIntentSetupAttempt", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "on_behalf_of", + "payment_method", + "payment_method_details", + "setup_error", + "setup_intent" + ], + "x-resourceId": "setup_attempt" + }, + "setup_attempt_payment_method_details": { + "description": "", + "properties": { + "acss_debit": { + "$ref": "#/definitions/setup_attempt_payment_method_details_acss_debit" + }, + "au_becs_debit": { + "$ref": "#/definitions/setup_attempt_payment_method_details_au_becs_debit" + }, + "bacs_debit": { + "$ref": "#/definitions/setup_attempt_payment_method_details_bacs_debit" + }, + "bancontact": { + "$ref": "#/definitions/setup_attempt_payment_method_details_bancontact" + }, + "blik": { + "$ref": "#/definitions/setup_attempt_payment_method_details_blik" + }, + "boleto": { + "$ref": "#/definitions/setup_attempt_payment_method_details_boleto" + }, + "card": { + "$ref": "#/definitions/setup_attempt_payment_method_details_card" + }, + "card_present": { + "$ref": "#/definitions/setup_attempt_payment_method_details_card_present" + }, + "ideal": { + "$ref": "#/definitions/setup_attempt_payment_method_details_ideal" + }, + "klarna": { + "$ref": "#/definitions/setup_attempt_payment_method_details_klarna" + }, + "link": { + "$ref": "#/definitions/setup_attempt_payment_method_details_link" + }, + "sepa_debit": { + "$ref": "#/definitions/setup_attempt_payment_method_details_sepa_debit" + }, + "sofort": { + "$ref": "#/definitions/setup_attempt_payment_method_details_sofort" + }, + "type": { + "description": "The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_account": { + "$ref": "#/definitions/setup_attempt_payment_method_details_us_bank_account" + } + }, + "required": ["type"], + "title": "SetupAttemptPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "ideal", + "klarna", + "link", + "sepa_debit", + "sofort", + "us_bank_account" + ] + }, + "setup_attempt_payment_method_details_acss_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_au_becs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_au_becs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bacs_debit": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_bacs_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_attempt_payment_method_details_bancontact": { + "description": "", + "properties": { + "bank_code": { + "description": "Bank code of bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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", null], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "setup_attempt_payment_method_details_bancontact", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_blik": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_blik", + "type": "object", + "x-expandableFields": [] + }, + "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": { + "three_d_secure": { + "anyOf": [ + { + "$ref": "#/definitions/three_d_secure_details" + }, + { + "type": "null" + } + ], + "description": "Populated if this authorization used 3D Secure authentication." + } + }, + "title": "setup_attempt_payment_method_details_card", + "type": "object", + "x-expandableFields": ["three_d_secure"] + }, + "setup_attempt_payment_method_details_card_present": { + "description": "", + "properties": { + "generated_card": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the Card PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + } + }, + "title": "setup_attempt_payment_method_details_card_present", + "type": "object", + "x-expandableFields": ["generated_card"] + }, + "setup_attempt_payment_method_details_ideal": { + "description": "", + "properties": { + "bank": { + "description": "The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.", + "enum": [ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + null + ], + "type": ["string", "null"] + }, + "bic": { + "description": "The Bank Identifier Code of the customer's bank.", + "enum": [ + "ABNANL2A", + "ASNBNL21", + "BITSNL2A", + "BUNQNL2A", + "FVLBNL22", + "HANDNL2A", + "INGBNL2A", + "KNABNL2H", + "MOYONL21", + "RABONL2U", + "RBRBNL21", + "REVOLT21", + "SNSBNL2A", + "TRIONL2U", + null + ], + "type": ["string", "null"] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "setup_attempt_payment_method_details_ideal", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_klarna": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_klarna", + "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_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, + "type": ["string", "null"] + }, + "bank_name": { + "description": "Name of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "bic": { + "description": "Bank Identifier Code of the bank associated with the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "generated_sepa_debit": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "generated_sepa_debit_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "iban_last4": { + "description": "Last four characters of the IBAN.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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", null], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "setup_attempt_payment_method_details_sofort", + "type": "object", + "x-expandableFields": [ + "generated_sepa_debit", + "generated_sepa_debit_mandate" + ] + }, + "setup_attempt_payment_method_details_us_bank_account": { + "description": "", + "properties": {}, + "title": "setup_attempt_payment_method_details_us_bank_account", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent": { + "description": "A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.\nFor example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.\n\nCreate a SetupIntent as soon as you're ready to collect your customer's payment credentials.\nDo not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.\nThe SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/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](/guides/strong-customer-authentication) may need to be run through\n[Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection\nin order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).\nIf the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,\nit will automatically attach the resulting payment method to that Customer.\nWe recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on\nPaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.\n\nBy using SetupIntents, you ensure that your customers experience the minimum set of required friction,\neven as regulations change over time.\n\nRelated guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect application that created the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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" + }, + "cancellation_reason": { + "description": "Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.", + "enum": ["abandoned", "duplicate", "requested_by_customer", null], + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "flow_directions": { + "description": "Indicates the directions of money movement for which this payment method is intended to be used.\n\nInclude `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.", + "items": { + "enum": ["inbound", "outbound"], + "type": "string" + }, + "type": ["array", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "last_setup_error": { + "anyOf": [ + { + "$ref": "#/definitions/api_errors" + }, + { + "type": "null" + } + ], + "description": "The error encountered in the previous SetupIntent confirmation." + }, + "latest_attempt": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_attempt" + }, + { + "type": "null" + } + ], + "description": "The most recent SetupAttempt for this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_attempt" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the multi use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "next_action": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_next_action" + }, + { + "type": "null" + } + ], + "description": "If present, this property tells you what actions you need to take in order for your customer to continue payment setup." + }, + "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": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) for which the setup is intended.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the payment method used with this SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration for this SetupIntent." + }, + "payment_method_types": { + "description": "The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "single_use_mandate": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/mandate" + }, + { + "type": "null" + } + ], + "description": "ID of the single_use Mandate generated by the SetupIntent.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/mandate" + } + ] + } + }, + "status": { + "description": "[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.", + "enum": [ + "canceled", + "processing", + "requires_action", + "requires_confirmation", + "requires_payment_method", + "succeeded" + ], + "type": "string" + }, + "usage": { + "description": "Indicates how the payment method is intended to be used in the future.\n\nUse `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "payment_method_types", + "status", + "usage" + ], + "title": "SetupIntent", + "type": "object", + "x-expandableFields": [ + "application", + "customer", + "last_setup_error", + "latest_attempt", + "mandate", + "next_action", + "on_behalf_of", + "payment_method", + "payment_method_options", + "single_use_mandate" + ], + "x-resourceId": "setup_intent" + }, + "setup_intent_next_action": { + "description": "", + "properties": { + "redirect_to_url": { + "$ref": "#/definitions/setup_intent_next_action_redirect_to_url" + }, + "type": { + "description": "Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.", + "maxLength": 5000, + "type": "string" + }, + "use_stripe_sdk": { + "description": "When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.", + "type": "object" + }, + "verify_with_microdeposits": { + "$ref": "#/definitions/setup_intent_next_action_verify_with_microdeposits" + } + }, + "required": ["type"], + "title": "SetupIntentNextAction", + "type": "object", + "x-expandableFields": ["redirect_to_url", "verify_with_microdeposits"] + }, + "setup_intent_next_action_redirect_to_url": { + "description": "", + "properties": { + "return_url": { + "description": "If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "url": { + "description": "The URL you must redirect your customer to in order to authenticate.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "SetupIntentNextActionRedirectToUrl", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_next_action_verify_with_microdeposits": { + "description": "", + "properties": { + "arrival_date": { + "description": "The timestamp when the microdeposits are expected to land.", + "format": "unix-time", + "type": "integer" + }, + "hosted_verification_url": { + "description": "The URL for the hosted verification page, which allows customers to verify their bank account.", + "maxLength": 5000, + "type": "string" + }, + "microdeposit_type": { + "description": "The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.", + "enum": ["amounts", "descriptor_code", null], + "type": ["string", "null"] + } + }, + "required": ["arrival_date", "hosted_verification_url"], + "title": "SetupIntentNextActionVerifyWithMicrodeposits", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options_acss_debit" + }, + { + "$ref": "#/definitions/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "blik": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options_blik" + }, + { + "$ref": "#/definitions/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "card": { + "$ref": "#/definitions/setup_intent_payment_method_options_card" + }, + "link": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options_link" + }, + { + "$ref": "#/definitions/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "sepa_debit": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options_sepa_debit" + }, + { + "$ref": "#/definitions/setup_intent_type_specific_payment_method_options_client" + } + ] + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options_us_bank_account" + }, + { + "$ref": "#/definitions/setup_intent_type_specific_payment_method_options_client" + } + ] + } + }, + "title": "SetupIntentPaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "blik", + "card", + "link", + "sepa_debit", + "us_bank_account" + ] + }, + "setup_intent_payment_method_options_acss_debit": { + "description": "", + "properties": { + "currency": { + "description": "Currency supported by the bank account", + "enum": ["cad", "usd", null], + "type": ["string", "null"] + }, + "mandate_options": { + "$ref": "#/definitions/setup_intent_payment_method_options_mandate_options_acss_debit" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_acss_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_blik": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/definitions/setup_intent_payment_method_options_mandate_options_blik" + } + }, + "title": "setup_intent_payment_method_options_blik", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "anyOf": [ + { + "$ref": "#/definitions/setup_intent_payment_method_options_card_mandate_options" + }, + { + "type": "null" + } + ], + "description": "Configuration options for setting up an eMandate for cards issued in India." + }, + "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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": ["string", "null"] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": ["any", "automatic", "challenge_only", null], + "type": ["string", "null"] + } + }, + "title": "setup_intent_payment_method_options_card", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_card_mandate_options": { + "description": "", + "properties": { + "amount": { + "description": "Amount to be charged for future payments.", + "type": "integer" + }, + "amount_type": { + "description": "One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.", + "enum": ["fixed", "maximum"], + "type": "string" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "A description of the mandate or subscription that is meant to be displayed to the customer.", + "maxLength": 200, + "type": ["string", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "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`.", + "type": ["integer", "null"] + }, + "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" + }, + "type": ["array", "null"] + } + }, + "required": [ + "amount", + "amount_type", + "currency", + "interval", + "reference", + "start_date" + ], + "title": "setup_intent_payment_method_options_card_mandate_options", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_link": { + "description": "", + "properties": { + "persistent_token": { + "description": "Token used for persistent Link logins.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "setup_intent_payment_method_options_link", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_acss_debit": { + "description": "", + "properties": { + "custom_mandate_url": { + "description": "A URL for custom mandate text", + "maxLength": 5000, + "type": "string" + }, + "default_for": { + "description": "List of Stripe products where this mandate can be selected automatically.", + "items": { + "enum": ["invoice", "subscription"], + "type": "string" + }, + "type": "array" + }, + "interval_description": { + "description": "Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "payment_schedule": { + "description": "Payment schedule for the mandate.", + "enum": ["combined", "interval", "sporadic", null], + "type": ["string", "null"] + }, + "transaction_type": { + "description": "Transaction type of the mandate.", + "enum": ["business", "personal", null], + "type": ["string", "null"] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_acss_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_mandate_options_blik": { + "description": "", + "properties": { + "expires_after": { + "description": "Date at which the mandate expires.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "off_session": { + "$ref": "#/definitions/mandate_options_off_session_details_blik" + }, + "type": { + "description": "Type of the mandate.", + "enum": ["off_session", "on_session", null], + "type": ["string", "null"] + } + }, + "title": "setup_intent_payment_method_options_mandate_options_blik", + "type": "object", + "x-expandableFields": ["off_session"] + }, + "setup_intent_payment_method_options_mandate_options_sepa_debit": { + "description": "", + "properties": {}, + "title": "setup_intent_payment_method_options_mandate_options_sepa_debit", + "type": "object", + "x-expandableFields": [] + }, + "setup_intent_payment_method_options_sepa_debit": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/definitions/setup_intent_payment_method_options_mandate_options_sepa_debit" + } + }, + "title": "setup_intent_payment_method_options_sepa_debit", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "setup_intent_payment_method_options_us_bank_account": { + "description": "", + "properties": { + "financial_connections": { + "$ref": "#/definitions/linked_account_options_us_bank_account" + }, + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "setup_intent_payment_method_options_us_bank_account", + "type": "object", + "x-expandableFields": ["financial_connections"] + }, + "setup_intent_type_specific_payment_method_options_client": { + "description": "", + "properties": { + "verification_method": { + "description": "Bank account verification method.", + "enum": ["automatic", "instant", "microdeposits"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "title": "SetupIntentTypeSpecificPaymentMethodOptionsClient", + "type": "object", + "x-expandableFields": [] + }, + "shipping": { + "description": "", + "properties": { + "address": { + "$ref": "#/definitions/address" + }, + "carrier": { + "description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "Recipient name.", + "maxLength": 5000, + "type": "string" + }, + "phone": { + "description": "Recipient phone (including extension).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "Shipping", + "type": "object", + "x-expandableFields": ["address"] + }, + "shipping_rate": { + "description": "Shipping rates describe the price of shipping presented to your customers and can be\napplied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)\nand [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.", + "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": "#/definitions/shipping_rate_delivery_estimate" + }, + { + "type": "null" + } + ], + "description": "The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions." + }, + "display_name": { + "description": "The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "fixed_amount": { + "$ref": "#/definitions/shipping_rate_fixed_amount" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["shipping_rate"], + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": ["exclusive", "inclusive", "unspecified", null], + "type": ["string", "null"] + }, + "tax_code": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/tax_code" + }, + { + "type": "null" + } + ], + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/tax_code" + } + ] + } + }, + "type": { + "description": "The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.", + "enum": ["fixed_amount"], + "type": "string" + } + }, + "required": [ + "active", + "created", + "id", + "livemode", + "metadata", + "object", + "type" + ], + "title": "ShippingRate", + "type": "object", + "x-expandableFields": ["delivery_estimate", "fixed_amount", "tax_code"], + "x-resourceId": "shipping_rate" + }, + "shipping_rate_currency_option": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "tax_behavior": { + "description": "Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.", + "enum": ["exclusive", "inclusive", "unspecified"], + "type": "string" + } + }, + "required": ["amount", "tax_behavior"], + "title": "ShippingRateCurrencyOption", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_delivery_estimate": { + "description": "", + "properties": { + "maximum": { + "anyOf": [ + { + "$ref": "#/definitions/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite." + }, + "minimum": { + "anyOf": [ + { + "$ref": "#/definitions/shipping_rate_delivery_estimate_bound" + }, + { + "type": "null" + } + ], + "description": "The lower bound of the estimated range. If empty, represents no lower bound." + } + }, + "title": "ShippingRateDeliveryEstimate", + "type": "object", + "x-expandableFields": ["maximum", "minimum"] + }, + "shipping_rate_delivery_estimate_bound": { + "description": "", + "properties": { + "unit": { + "description": "A unit of time.", + "enum": ["business_day", "day", "hour", "month", "week"], + "type": "string" + }, + "value": { + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "required": ["unit", "value"], + "title": "ShippingRateDeliveryEstimateBound", + "type": "object", + "x-expandableFields": [] + }, + "shipping_rate_fixed_amount": { + "description": "", + "properties": { + "amount": { + "description": "A non-negative integer in cents representing how much to charge.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "currency_options": { + "additionalProperties": { + "$ref": "#/definitions/shipping_rate_currency_option" + }, + "description": "Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).", + "type": "object" + } + }, + "required": ["amount", "currency"], + "title": "ShippingRateFixedAmount", + "type": "object", + "x-expandableFields": ["currency_options"] + }, + "sigma_scheduled_query_run_error": { + "description": "", + "properties": { + "message": { + "description": "Information about the run failure.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["message"], + "title": "SigmaScheduledQueryRunError", + "type": "object", + "x-expandableFields": [] + }, + "source": { + "description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).", + "properties": { + "ach_credit_transfer": { + "$ref": "#/definitions/source_type_ach_credit_transfer" + }, + "ach_debit": { + "$ref": "#/definitions/source_type_ach_debit" + }, + "acss_debit": { + "$ref": "#/definitions/source_type_acss_debit" + }, + "alipay": { + "$ref": "#/definitions/source_type_alipay" + }, + "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.", + "type": ["integer", "null"] + }, + "au_becs_debit": { + "$ref": "#/definitions/source_type_au_becs_debit" + }, + "bancontact": { + "$ref": "#/definitions/source_type_bancontact" + }, + "card": { + "$ref": "#/definitions/source_type_card" + }, + "card_present": { + "$ref": "#/definitions/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": "#/definitions/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.", + "type": ["string", "null"] + }, + "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": "#/definitions/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": "#/definitions/source_type_giropay" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ideal": { + "$ref": "#/definitions/source_type_ideal" + }, + "klarna": { + "$ref": "#/definitions/source_type_klarna" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "multibanco": { + "$ref": "#/definitions/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": "#/definitions/source_owner" + }, + { + "type": "null" + } + ], + "description": "Information about the owner of the payment instrument that may be used or required by particular source types." + }, + "p24": { + "$ref": "#/definitions/source_type_p24" + }, + "receiver": { + "$ref": "#/definitions/source_receiver_flow" + }, + "redirect": { + "$ref": "#/definitions/source_redirect_flow" + }, + "sepa_debit": { + "$ref": "#/definitions/source_type_sepa_debit" + }, + "sofort": { + "$ref": "#/definitions/source_type_sofort" + }, + "source_order": { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "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": "#/definitions/source_type_three_d_secure" + }, + "type": { + "description": "The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "alipay", + "au_becs_debit", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "usage": { + "description": "Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "wechat": { + "$ref": "#/definitions/source_type_wechat" + } + }, + "required": [ + "client_secret", + "created", + "flow", + "id", + "livemode", + "object", + "status", + "type" + ], + "title": "Source", + "type": "object", + "x-expandableFields": [ + "code_verification", + "owner", + "receiver", + "redirect", + "source_order" + ], + "x-resourceId": "source" + }, + "source_code_verification_flow": { + "description": "", + "properties": { + "attempts_remaining": { + "description": "The number of attempts remaining to authenticate the source object with a verification code.", + "type": "integer" + }, + "status": { + "description": "The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["attempts_remaining", "status"], + "title": "SourceCodeVerificationFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification": { + "description": "Source mandate notifications should be created when a notification related to\na source mandate must be sent to the payer. They will trigger a webhook or\ndeliver an email to the customer.", + "properties": { + "acss_debit": { + "$ref": "#/definitions/source_mandate_notification_acss_debit_data" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.", + "type": ["integer", "null"] + }, + "bacs_debit": { + "$ref": "#/definitions/source_mandate_notification_bacs_debit_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["source_mandate_notification"], + "type": "string" + }, + "reason": { + "description": "The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.", + "maxLength": 5000, + "type": "string" + }, + "sepa_debit": { + "$ref": "#/definitions/source_mandate_notification_sepa_debit_data" + }, + "source": { + "$ref": "#/definitions/source" + }, + "status": { + "description": "The status of the mandate notification. Valid statuses are `pending` or `submitted`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "id", + "livemode", + "object", + "reason", + "source", + "status", + "type" + ], + "title": "SourceMandateNotification", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bacs_debit", + "sepa_debit", + "source" + ], + "x-resourceId": "source_mandate_notification" + }, + "source_mandate_notification_acss_debit_data": { + "description": "", + "properties": { + "statement_descriptor": { + "description": "The statement descriptor associate with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationAcssDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_bacs_debit_data": { + "description": "", + "properties": { + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationBacsDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_mandate_notification_sepa_debit_data": { + "description": "", + "properties": { + "creditor_identifier": { + "description": "SEPA creditor ID.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the debit.", + "maxLength": 5000, + "type": "string" + }, + "mandate_reference": { + "description": "Mandate reference associated with the debit.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceMandateNotificationSepaDebitData", + "type": "object", + "x-expandableFields": [] + }, + "source_order": { + "description": "", + "properties": { + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "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": "#/definitions/source_order_item" + }, + "type": ["array", "null"] + }, + "shipping": { + "$ref": "#/definitions/shipping" + } + }, + "required": ["amount", "currency"], + "title": "SourceOrder", + "type": "object", + "x-expandableFields": ["items", "shipping"] + }, + "source_order_item": { + "description": "", + "properties": { + "amount": { + "description": "The amount (price) for this order item.", + "type": ["integer", "null"] + }, + "currency": { + "description": "This currency of this order item. Required when `amount` is present.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "description": { + "description": "Human-readable description for this order item.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "parent": { + "description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "SourceOrderItem", + "type": "object", + "x-expandableFields": [] + }, + "source_owner": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "description": "Owner's address." + }, + "email": { + "description": "Owner's email address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "Owner's full name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "phone": { + "description": "Owner's phone number (including extension).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "verified_address": { + "anyOf": [ + { + "$ref": "#/definitions/address" + }, + { + "type": "null" + } + ], + "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." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "title": "SourceOwner", + "type": "object", + "x-expandableFields": ["address", "verified_address"] + }, + "source_receiver_flow": { + "description": "", + "properties": { + "address": { + "description": "The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "amount_charged": { + "description": "The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.", + "type": "integer" + }, + "amount_received": { + "description": "The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.", + "type": "integer" + }, + "amount_returned": { + "description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.", + "type": "integer" + }, + "refund_attributes_method": { + "description": "Type of refund attribute method, one of `email`, `manual`, or `none`.", + "maxLength": 5000, + "type": "string" + }, + "refund_attributes_status": { + "description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_charged", + "amount_received", + "amount_returned", + "refund_attributes_method", + "refund_attributes_status" + ], + "title": "SourceReceiverFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_redirect_flow": { + "description": "", + "properties": { + "failure_reason": { + "description": "The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "return_url": { + "description": "The URL you provide to redirect the customer to after they authenticated their payment.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.", + "maxLength": 2048, + "type": "string" + } + }, + "required": ["return_url", "status", "url"], + "title": "SourceRedirectFlow", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction": { + "description": "Some payment methods have no required amount that a customer must send.\nCustomers can be instructed to send any amount, and it can be made up of\nmultiple transactions. As such, sources can have multiple associated\ntransactions.", + "properties": { + "ach_credit_transfer": { + "$ref": "#/definitions/source_transaction_ach_credit_transfer_data" + }, + "amount": { + "description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.", + "type": "integer" + }, + "chf_credit_transfer": { + "$ref": "#/definitions/source_transaction_chf_credit_transfer_data" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "gbp_credit_transfer": { + "$ref": "#/definitions/source_transaction_gbp_credit_transfer_data" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["source_transaction"], + "type": "string" + }, + "paper_check": { + "$ref": "#/definitions/source_transaction_paper_check_data" + }, + "sepa_credit_transfer": { + "$ref": "#/definitions/source_transaction_sepa_credit_transfer_data" + }, + "source": { + "description": "The ID of the source this transaction is attached to.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the transaction, one of `succeeded`, `pending`, or `failed`.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of source this transaction is attached to.", + "enum": [ + "ach_credit_transfer", + "ach_debit", + "alipay", + "bancontact", + "card", + "card_present", + "eps", + "giropay", + "ideal", + "klarna", + "multibanco", + "p24", + "sepa_debit", + "sofort", + "three_d_secure", + "wechat" + ], + "type": "string" + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "object", + "source", + "status", + "type" + ], + "title": "SourceTransaction", + "type": "object", + "x-expandableFields": [ + "ach_credit_transfer", + "chf_credit_transfer", + "gbp_credit_transfer", + "paper_check", + "sepa_credit_transfer" + ], + "x-resourceId": "source_transaction" + }, + "source_transaction_ach_credit_transfer_data": { + "description": "", + "properties": { + "customer_data": { + "description": "Customer data associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "fingerprint": { + "description": "Bank account fingerprint associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of the account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionAchCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_chf_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_country": { + "description": "Sender's country address.", + "maxLength": 5000, + "type": "string" + }, + "sender_address_line1": { + "description": "Sender's line 1 address.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionChfCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_gbp_credit_transfer_data": { + "description": "", + "properties": { + "fingerprint": { + "description": "Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.", + "maxLength": 5000, + "type": "string" + }, + "funding_method": { + "description": "The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported.", + "maxLength": 5000, + "type": "string" + }, + "last4": { + "description": "Last 4 digits of sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "Sender entered arbitrary information about the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_account_number": { + "description": "Sender account number associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender name associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_sort_code": { + "description": "Sender sort code associated with the transfer.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionGbpCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_paper_check_data": { + "description": "", + "properties": { + "available_at": { + "description": "Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.", + "maxLength": 5000, + "type": "string" + }, + "invoices": { + "description": "Comma-separated list of invoice IDs associated with the paper check.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionPaperCheckData", + "type": "object", + "x-expandableFields": [] + }, + "source_transaction_sepa_credit_transfer_data": { + "description": "", + "properties": { + "reference": { + "description": "Reference associated with the transfer.", + "maxLength": 5000, + "type": "string" + }, + "sender_iban": { + "description": "Sender's bank account IBAN.", + "maxLength": 5000, + "type": "string" + }, + "sender_name": { + "description": "Sender's name.", + "maxLength": 5000, + "type": "string" + } + }, + "title": "SourceTransactionSepaCreditTransferData", + "type": "object", + "x-expandableFields": [] + }, + "source_type_ach_credit_transfer": { + "properties": { + "account_number": { + "type": ["string", "null"] + }, + "bank_name": { + "type": ["string", "null"] + }, + "fingerprint": { + "type": ["string", "null"] + }, + "refund_account_holder_name": { + "type": ["string", "null"] + }, + "refund_account_holder_type": { + "type": ["string", "null"] + }, + "refund_routing_number": { + "type": ["string", "null"] + }, + "routing_number": { + "type": ["string", "null"] + }, + "swift_code": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_ach_debit": { + "properties": { + "bank_name": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "fingerprint": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + }, + "routing_number": { + "type": ["string", "null"] + }, + "type": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_acss_debit": { + "properties": { + "bank_address_city": { + "type": ["string", "null"] + }, + "bank_address_line_1": { + "type": ["string", "null"] + }, + "bank_address_line_2": { + "type": ["string", "null"] + }, + "bank_address_postal_code": { + "type": ["string", "null"] + }, + "bank_name": { + "type": ["string", "null"] + }, + "category": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "fingerprint": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + }, + "routing_number": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_alipay": { + "properties": { + "data_string": { + "type": ["string", "null"] + }, + "native_url": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_au_becs_debit": { + "properties": { + "bsb_number": { + "type": ["string", "null"] + }, + "fingerprint": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_bancontact": { + "properties": { + "bank_code": { + "type": ["string", "null"] + }, + "bank_name": { + "type": ["string", "null"] + }, + "bic": { + "type": ["string", "null"] + }, + "iban_last4": { + "type": ["string", "null"] + }, + "preferred_language": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_card": { + "properties": { + "address_line1_check": { + "type": ["string", "null"] + }, + "address_zip_check": { + "type": ["string", "null"] + }, + "brand": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "cvc_check": { + "type": ["string", "null"] + }, + "dynamic_last4": { + "type": ["string", "null"] + }, + "exp_month": { + "type": ["integer", "null"] + }, + "exp_year": { + "type": ["integer", "null"] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + }, + "name": { + "type": ["string", "null"] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_card_present": { + "properties": { + "application_cryptogram": { + "type": "string" + }, + "application_preferred_name": { + "type": "string" + }, + "authorization_code": { + "type": ["string", "null"] + }, + "authorization_response_code": { + "type": "string" + }, + "brand": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "cvm_type": { + "type": "string" + }, + "data_type": { + "type": ["string", "null"] + }, + "dedicated_file_name": { + "type": "string" + }, + "emv_auth_data": { + "type": "string" + }, + "evidence_customer_signature": { + "type": ["string", "null"] + }, + "evidence_transaction_certificate": { + "type": ["string", "null"] + }, + "exp_month": { + "type": ["integer", "null"] + }, + "exp_year": { + "type": ["integer", "null"] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + }, + "pos_device_id": { + "type": ["string", "null"] + }, + "pos_entry_mode": { + "type": "string" + }, + "read_method": { + "type": ["string", "null"] + }, + "reader": { + "type": ["string", "null"] + }, + "terminal_verification_results": { + "type": "string" + }, + "transaction_status_information": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_eps": { + "properties": { + "reference": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_giropay": { + "properties": { + "bank_code": { + "type": ["string", "null"] + }, + "bank_name": { + "type": ["string", "null"] + }, + "bic": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_ideal": { + "properties": { + "bank": { + "type": ["string", "null"] + }, + "bic": { + "type": ["string", "null"] + }, + "iban_last4": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_klarna": { + "properties": { + "background_image_url": { + "type": "string" + }, + "client_token": { + "type": ["string", "null"] + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "page_title": { + "type": "string" + }, + "pay_later_asset_urls_descriptive": { + "type": "string" + }, + "pay_later_asset_urls_standard": { + "type": "string" + }, + "pay_later_name": { + "type": "string" + }, + "pay_later_redirect_url": { + "type": "string" + }, + "pay_now_asset_urls_descriptive": { + "type": "string" + }, + "pay_now_asset_urls_standard": { + "type": "string" + }, + "pay_now_name": { + "type": "string" + }, + "pay_now_redirect_url": { + "type": "string" + }, + "pay_over_time_asset_urls_descriptive": { + "type": "string" + }, + "pay_over_time_asset_urls_standard": { + "type": "string" + }, + "pay_over_time_name": { + "type": "string" + }, + "pay_over_time_redirect_url": { + "type": "string" + }, + "payment_method_categories": { + "type": "string" + }, + "purchase_country": { + "type": "string" + }, + "purchase_type": { + "type": "string" + }, + "redirect_url": { + "type": "string" + }, + "shipping_delay": { + "type": "integer" + }, + "shipping_first_name": { + "type": "string" + }, + "shipping_last_name": { + "type": "string" + } + }, + "type": "object" + }, + "source_type_multibanco": { + "properties": { + "entity": { + "type": ["string", "null"] + }, + "reference": { + "type": ["string", "null"] + }, + "refund_account_holder_address_city": { + "type": ["string", "null"] + }, + "refund_account_holder_address_country": { + "type": ["string", "null"] + }, + "refund_account_holder_address_line1": { + "type": ["string", "null"] + }, + "refund_account_holder_address_line2": { + "type": ["string", "null"] + }, + "refund_account_holder_address_postal_code": { + "type": ["string", "null"] + }, + "refund_account_holder_address_state": { + "type": ["string", "null"] + }, + "refund_account_holder_name": { + "type": ["string", "null"] + }, + "refund_iban": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_p24": { + "properties": { + "reference": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_sepa_debit": { + "properties": { + "bank_code": { + "type": ["string", "null"] + }, + "branch_code": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "fingerprint": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + }, + "mandate_reference": { + "type": ["string", "null"] + }, + "mandate_url": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_sofort": { + "properties": { + "bank_code": { + "type": ["string", "null"] + }, + "bank_name": { + "type": ["string", "null"] + }, + "bic": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "iban_last4": { + "type": ["string", "null"] + }, + "preferred_language": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_three_d_secure": { + "properties": { + "address_line1_check": { + "type": ["string", "null"] + }, + "address_zip_check": { + "type": ["string", "null"] + }, + "authenticated": { + "type": ["boolean", "null"] + }, + "brand": { + "type": ["string", "null"] + }, + "card": { + "type": ["string", "null"] + }, + "country": { + "type": ["string", "null"] + }, + "customer": { + "type": ["string", "null"] + }, + "cvc_check": { + "type": ["string", "null"] + }, + "dynamic_last4": { + "type": ["string", "null"] + }, + "exp_month": { + "type": ["integer", "null"] + }, + "exp_year": { + "type": ["integer", "null"] + }, + "fingerprint": { + "type": "string" + }, + "funding": { + "type": ["string", "null"] + }, + "last4": { + "type": ["string", "null"] + }, + "name": { + "type": ["string", "null"] + }, + "three_d_secure": { + "type": "string" + }, + "tokenization_method": { + "type": ["string", "null"] + } + }, + "type": "object" + }, + "source_type_wechat": { + "properties": { + "prepay_id": { + "type": "string" + }, + "qr_code_url": { + "type": ["string", "null"] + }, + "statement_descriptor": { + "type": "string" + } + }, + "type": "object" + }, + "subscription": { + "description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/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 subtotal that will be transferred to the application owner's Stripe account.", + "type": ["number", "null"] + }, + "automatic_tax": { + "$ref": "#/definitions/subscription_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "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", + "type": "integer" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "cancel_at": { + "description": "A date in the future at which the subscription will automatically get canceled", + "format": "unix-time", + "type": ["integer", "null"] + }, + "cancel_at_period_end": { + "description": "If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current 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", + "type": ["integer", "null"] + }, + "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).", + "type": "string" + }, + "current_period_end": { + "description": "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.", + "format": "unix-time", + "type": "integer" + }, + "current_period_start": { + "description": "Start of the current period that the subscription has been invoiced for.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "days_until_due": { + "description": "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.", + "type": ["integer", "null"] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "default_source": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + }, + { + "type": "null" + } + ], + "description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/bank_account" + }, + { + "$ref": "#/definitions/card" + }, + { + "$ref": "#/definitions/source" + } + ] + }, + "x-stripeBypassValidation": true + }, + "default_tax_rates": { + "description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.", + "items": { + "$ref": "#/definitions/tax_rate" + }, + "type": ["array", "null"] + }, + "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.", + "maxLength": 500, + "type": ["string", "null"] + }, + "discount": { + "anyOf": [ + { + "$ref": "#/definitions/discount" + }, + { + "type": "null" + } + ], + "description": "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis." + }, + "ended_at": { + "description": "If the subscription has ended, the date the subscription ended.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "items": { + "description": "List of subscription items, each with an attached price.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/subscription_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "SubscriptionItemList", + "type": "object", + "x-expandableFields": ["data"] + }, + "latest_invoice": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/invoice" + }, + { + "type": "null" + } + ], + "description": "The most recent invoice this subscription has generated.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/invoice" + } + ] + } + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "next_pending_invoice_item_invoice": { + "description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "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": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "pause_collection": { + "anyOf": [ + { + "$ref": "#/definitions/subscriptions_resource_pause_collection" + }, + { + "type": "null" + } + ], + "description": "If specified, payment collection for this subscription will be paused." + }, + "payment_settings": { + "anyOf": [ + { + "$ref": "#/definitions/subscriptions_resource_payment_settings" + }, + { + "type": "null" + } + ], + "description": "Payment settings passed on to invoices created by the subscription." + }, + "pending_invoice_item_interval": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_pending_invoice_item_interval" + }, + { + "type": "null" + } + ], + "description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." + }, + "pending_setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_intent" + }, + { + "type": "null" + } + ], + "description": "You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_intent" + } + ] + } + }, + "pending_update": { + "anyOf": [ + { + "$ref": "#/definitions/subscriptions_resource_pending_update" + }, + { + "type": "null" + } + ], + "description": "If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid." + }, + "schedule": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription_schedule" + }, + { + "type": "null" + } + ], + "description": "The schedule attached to the subscription", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, 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\nIf subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \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": "#/definitions/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/test_helpers.test_clock" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "If the subscription has a trial, the end of that trial.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "trial_settings": { + "anyOf": [ + { + "$ref": "#/definitions/subscriptions_trials_resource_trial_settings" + }, + { + "type": "null" + } + ], + "description": "Settings related to subscription trials." + }, + "trial_start": { + "description": "If the subscription has a trial, the beginning of that trial.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": [ + "automatic_tax", + "billing_cycle_anchor", + "cancel_at_period_end", + "collection_method", + "created", + "currency", + "current_period_end", + "current_period_start", + "customer", + "id", + "items", + "livemode", + "metadata", + "object", + "start_date", + "status" + ], + "title": "Subscription", + "type": "object", + "x-expandableFields": [ + "application", + "automatic_tax", + "billing_thresholds", + "customer", + "default_payment_method", + "default_source", + "default_tax_rates", + "discount", + "items", + "latest_invoice", + "on_behalf_of", + "pause_collection", + "payment_settings", + "pending_invoice_item_interval", + "pending_setup_intent", + "pending_update", + "schedule", + "test_clock", + "transfer_data", + "trial_settings" + ], + "x-resourceId": "subscription" + }, + "subscription_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on this subscription.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "SubscriptionAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "subscription_billing_thresholds": { + "description": "", + "properties": { + "amount_gte": { + "description": "Monetary threshold that triggers the subscription to create an invoice", + "type": ["integer", "null"] + }, + "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`.", + "type": ["boolean", "null"] + } + }, + "title": "SubscriptionBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_item": { + "description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["subscription_item"], + "type": "string" + }, + "price": { + "$ref": "#/definitions/price" + }, + "quantity": { + "description": "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.", + "type": "integer" + }, + "subscription": { + "description": "The `subscription` this `subscription_item` belongs to.", + "maxLength": 5000, + "type": "string" + }, + "tax_rates": { + "description": "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.", + "items": { + "$ref": "#/definitions/tax_rate" + }, + "type": ["array", "null"] + } + }, + "required": [ + "created", + "id", + "metadata", + "object", + "price", + "subscription" + ], + "title": "SubscriptionItem", + "type": "object", + "x-expandableFields": ["billing_thresholds", "price", "tax_rates"], + "x-resourceId": "subscription_item" + }, + "subscription_item_billing_thresholds": { + "description": "", + "properties": { + "usage_gte": { + "description": "Usage threshold that triggers the subscription to create an invoice", + "type": ["integer", "null"] + } + }, + "title": "SubscriptionItemBillingThresholds", + "type": "object", + "x-expandableFields": [] + }, + "subscription_payment_method_options_card": { + "description": "", + "properties": { + "mandate_options": { + "$ref": "#/definitions/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", + "interac", + "jcb", + "mastercard", + "unionpay", + "unknown", + "visa", + null + ], + "type": ["string", "null"] + }, + "request_three_d_secure": { + "description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.", + "enum": ["any", "automatic", null], + "type": ["string", "null"] + } + }, + "title": "subscription_payment_method_options_card", + "type": "object", + "x-expandableFields": ["mandate_options"] + }, + "subscription_pending_invoice_item_interval": { + "description": "", + "properties": { + "interval": { + "description": "Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.", + "enum": ["day", "month", "week", "year"], + "type": "string" + }, + "interval_count": { + "description": "The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).", + "type": "integer" + } + }, + "required": ["interval", "interval_count"], + "title": "SubscriptionPendingInvoiceItemInterval", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule": { + "description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "properties": { + "application": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + }, + { + "type": "null" + } + ], + "description": "ID of the Connect Application that created the schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/application" + }, + { + "$ref": "#/definitions/deleted_application" + } + ] + } + }, + "canceled_at": { + "description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "completed_at": { + "description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "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": "#/definitions/subscription_schedule_current_phase" + }, + { + "type": "null" + } + ], + "description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`." + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ], + "description": "ID of the customer who owns the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + }, + { + "$ref": "#/definitions/deleted_customer" + } + ] + } + }, + "default_settings": { + "$ref": "#/definitions/subscription_schedules_resource_default_settings" + }, + "end_behavior": { + "description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.", + "enum": ["cancel", "none", "release", "renew"], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "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": "#/definitions/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", + "type": ["integer", "null"] + }, + "released_subscription": { + "description": "ID of the subscription once managed by the subscription schedule (if it is released).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "status": { + "description": "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).", + "enum": [ + "active", + "canceled", + "completed", + "not_started", + "released" + ], + "type": "string" + }, + "subscription": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/subscription" + }, + { + "type": "null" + } + ], + "description": "ID of the subscription managed by the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/subscription" + } + ] + } + }, + "test_clock": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/test_helpers.test_clock" + }, + { + "type": "null" + } + ], + "description": "ID of the test clock this subscription schedule belongs to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/test_helpers.test_clock" + } + ] + } + } + }, + "required": [ + "created", + "customer", + "default_settings", + "end_behavior", + "id", + "livemode", + "object", + "phases", + "status" + ], + "title": "SubscriptionSchedule", + "type": "object", + "x-expandableFields": [ + "application", + "current_phase", + "customer", + "default_settings", + "phases", + "subscription", + "test_clock" + ], + "x-resourceId": "subscription_schedule" + }, + "subscription_schedule_add_invoice_item": { + "description": "An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.", + "properties": { + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/price" + }, + { + "$ref": "#/definitions/deleted_price" + } + ], + "description": "ID of the price used to generate the invoice item.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/price" + }, + { + "$ref": "#/definitions/deleted_price" + } + ] + } + }, + "quantity": { + "description": "The quantity of the invoice item.", + "type": ["integer", "null"] + }, + "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": "#/definitions/tax_rate" + }, + "type": ["array", "null"] + } + }, + "required": ["price"], + "title": "SubscriptionScheduleAddInvoiceItem", + "type": "object", + "x-expandableFields": ["price", "tax_rates"] + }, + "subscription_schedule_configuration_item": { + "description": "A phase item describes the price and quantity of a phase.", + "properties": { + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_item_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.", + "type": ["object", "null"] + }, + "price": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/price" + }, + { + "$ref": "#/definitions/deleted_price" + } + ], + "description": "ID of the price to which the customer should be subscribed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/price" + }, + { + "$ref": "#/definitions/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": "#/definitions/tax_rate" + }, + "type": ["array", "null"] + } + }, + "required": ["price"], + "title": "SubscriptionScheduleConfigurationItem", + "type": "object", + "x-expandableFields": ["billing_thresholds", "price", "tax_rates"] + }, + "subscription_schedule_current_phase": { + "description": "", + "properties": { + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + } + }, + "required": ["end_date", "start_date"], + "title": "SubscriptionScheduleCurrentPhase", + "type": "object", + "x-expandableFields": [] + }, + "subscription_schedule_phase_configuration": { + "description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.", + "properties": { + "add_invoice_items": { + "description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.", + "items": { + "$ref": "#/definitions/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 subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": ["number", "null"] + }, + "automatic_tax": { + "$ref": "#/definitions/schedules_phase_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": ["automatic", "phase_start", null], + "type": ["string", "null"] + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", null], + "type": ["string", "null"] + }, + "coupon": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/coupon" + }, + { + "$ref": "#/definitions/deleted_coupon" + }, + { + "type": "null" + } + ], + "description": "ID of the coupon to use during this phase of the subscription schedule.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/coupon" + }, + { + "$ref": "#/definitions/deleted_coupon" + } + ] + } + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "default_tax_rates": { + "description": "The default tax rates to apply to the subscription during this phase of the subscription schedule.", + "items": { + "$ref": "#/definitions/tax_rate" + }, + "type": ["array", "null"] + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "end_date": { + "description": "The end of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The invoice settings applicable during this phase." + }, + "items": { + "description": "Subscription items to configure the subscription to during this phase of the subscription schedule.", + "items": { + "$ref": "#/definitions/subscription_schedule_configuration_item" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.", + "type": ["object", "null"] + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "proration_behavior": { + "description": "If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.", + "enum": ["always_invoice", "create_prorations", "none"], + "type": "string" + }, + "start_date": { + "description": "The start of this phase of the subscription schedule.", + "format": "unix-time", + "type": "integer" + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + }, + "trial_end": { + "description": "When the trial ends within the phase.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": [ + "add_invoice_items", + "currency", + "end_date", + "items", + "proration_behavior", + "start_date" + ], + "title": "SubscriptionSchedulePhaseConfiguration", + "type": "object", + "x-expandableFields": [ + "add_invoice_items", + "automatic_tax", + "billing_thresholds", + "coupon", + "default_payment_method", + "default_tax_rates", + "invoice_settings", + "items", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings": { + "description": "", + "properties": { + "application_fee_percent": { + "description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.", + "type": ["number", "null"] + }, + "automatic_tax": { + "$ref": "#/definitions/subscription_schedules_resource_default_settings_automatic_tax" + }, + "billing_cycle_anchor": { + "description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).", + "enum": ["automatic", "phase_start"], + "type": "string" + }, + "billing_thresholds": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_billing_thresholds" + }, + { + "type": "null" + } + ], + "description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" + }, + "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", null], + "type": ["string", "null"] + }, + "default_payment_method": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_method" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_method" + } + ] + } + }, + "description": { + "description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "invoice_settings": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_setting_subscription_schedule_setting" + }, + { + "type": "null" + } + ], + "description": "The subscription schedule's default invoice settings." + }, + "on_behalf_of": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "transfer_data": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_transfer_data" + }, + { + "type": "null" + } + ], + "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." + } + }, + "required": ["billing_cycle_anchor"], + "title": "SubscriptionSchedulesResourceDefaultSettings", + "type": "object", + "x-expandableFields": [ + "automatic_tax", + "billing_thresholds", + "default_payment_method", + "invoice_settings", + "on_behalf_of", + "transfer_data" + ] + }, + "subscription_schedules_resource_default_settings_automatic_tax": { + "description": "", + "properties": { + "enabled": { + "description": "Whether Stripe automatically computes tax on invoices created during this phase.", + "type": "boolean" + } + }, + "required": ["enabled"], + "title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax", + "type": "object", + "x-expandableFields": [] + }, + "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 subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.", + "type": ["number", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The account where funds from the payment will be transferred to upon payment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "SubscriptionTransferData", + "type": "object", + "x-expandableFields": ["destination"] + }, + "subscriptions_resource_pause_collection": { + "description": "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.", + "properties": { + "behavior": { + "description": "The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.", + "enum": ["keep_as_draft", "mark_uncollectible", "void"], + "type": "string" + }, + "resumes_at": { + "description": "The time after which the subscription will resume collecting payments.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "required": ["behavior"], + "title": "SubscriptionsResourcePauseCollection", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_resource_payment_method_options": { + "description": "", + "properties": { + "acss_debit": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_acss_debit" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription." + }, + "bancontact": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_bancontact" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription." + }, + "card": { + "anyOf": [ + { + "$ref": "#/definitions/subscription_payment_method_options_card" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription." + }, + "customer_balance": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_customer_balance" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription." + }, + "konbini": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_konbini" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription." + }, + "us_bank_account": { + "anyOf": [ + { + "$ref": "#/definitions/invoice_payment_method_options_us_bank_account" + }, + { + "type": "null" + } + ], + "description": "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription." + } + }, + "title": "SubscriptionsResourcePaymentMethodOptions", + "type": "object", + "x-expandableFields": [ + "acss_debit", + "bancontact", + "card", + "customer_balance", + "konbini", + "us_bank_account" + ] + }, + "subscriptions_resource_payment_settings": { + "description": "", + "properties": { + "payment_method_options": { + "anyOf": [ + { + "$ref": "#/definitions/subscriptions_resource_payment_method_options" + }, + { + "type": "null" + } + ], + "description": "Payment-method-specific configuration to provide to invoices created by the subscription." + }, + "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", + "au_becs_debit", + "bacs_debit", + "bancontact", + "boleto", + "card", + "customer_balance", + "fpx", + "giropay", + "grabpay", + "ideal", + "konbini", + "link", + "paynow", + "promptpay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": ["array", "null"] + }, + "save_default_payment_method": { + "description": "Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.", + "enum": ["off", "on_subscription", null], + "type": ["string", "null"] + } + }, + "title": "SubscriptionsResourcePaymentSettings", + "type": "object", + "x-expandableFields": ["payment_method_options"] + }, + "subscriptions_resource_pending_update": { + "description": "Pending Updates store the changes pending from a previous update that will be applied\nto the Subscription upon successful payment.", + "properties": { + "billing_cycle_anchor": { + "description": "If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "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": "#/definitions/subscription_item" + }, + "type": ["array", "null"] + }, + "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", + "type": ["integer", "null"] + }, + "trial_from_plan": { + "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.", + "type": ["boolean", "null"] + } + }, + "required": ["expires_at"], + "title": "SubscriptionsResourcePendingUpdate", + "type": "object", + "x-expandableFields": ["subscription_items"] + }, + "subscriptions_trials_resource_end_behavior": { + "description": "Defines how a subscription behaves when a free trial ends.", + "properties": { + "missing_payment_method": { + "description": "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.", + "enum": ["cancel", "create_invoice", "pause"], + "type": "string" + } + }, + "required": ["missing_payment_method"], + "title": "SubscriptionsTrialsResourceEndBehavior", + "type": "object", + "x-expandableFields": [] + }, + "subscriptions_trials_resource_trial_settings": { + "description": "Configures how this subscription behaves during the trial period.", + "properties": { + "end_behavior": { + "$ref": "#/definitions/subscriptions_trials_resource_end_behavior" + } + }, + "required": ["end_behavior"], + "title": "SubscriptionsTrialsResourceTrialSettings", + "type": "object", + "x-expandableFields": ["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" + }, + "tax_deducted_at_source": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_deducted_at_source"], + "type": "string" + }, + "period_end": { + "description": "The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "period_start": { + "description": "The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.", + "format": "unix-time", + "type": "integer" + }, + "tax_deduction_account_number": { + "description": "The TAN that was supplied to Stripe when TDS was assessed", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "id", + "object", + "period_end", + "period_start", + "tax_deduction_account_number" + ], + "title": "TaxDeductedAtSource", + "type": "object", + "x-expandableFields": [] + }, + "tax_id": { + "description": "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.\n\nRelated guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).", + "properties": { + "country": { + "description": "Two-letter ISO code representing the country of the tax ID.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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": "#/definitions/customer" + }, + { + "type": "null" + } + ], + "description": "ID of the customer.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/customer" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_id"], + "type": "string" + }, + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "Value of the tax ID.", + "maxLength": 5000, + "type": "string" + }, + "verification": { + "anyOf": [ + { + "$ref": "#/definitions/tax_id_verification" + }, + { + "type": "null" + } + ], + "description": "Tax ID verification information." + } + }, + "required": ["created", "id", "livemode", "object", "type", "value"], + "title": "tax_id", + "type": "object", + "x-expandableFields": ["customer", "verification"], + "x-resourceId": "tax_id" + }, + "tax_id_verification": { + "description": "", + "properties": { + "status": { + "description": "Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.", + "enum": ["pending", "unavailable", "unverified", "verified"], + "type": "string" + }, + "verified_address": { + "description": "Verified address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "verified_name": { + "description": "Verified name.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["status"], + "title": "tax_id_verification", + "type": "object", + "x-expandableFields": [] + }, + "tax_rate": { + "description": "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + }, + "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" + }, + "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, + "type": ["string", "null"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["tax_rate"], + "type": "string" + }, + "percentage": { + "description": "This represents the tax rate percent out of 100.", + "type": "number" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "tax_type": { + "description": "The high-level tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "pst", + "qst", + "rst", + "sales_tax", + "vat", + null + ], + "type": ["string", "null"] + } + }, + "required": [ + "active", + "created", + "display_name", + "id", + "inclusive", + "livemode", + "object", + "percentage" + ], + "title": "TaxRate", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "tax_rate" + }, + "terminal.configuration": { + "description": "A Configurations object represents how features should be configured for terminal readers.", + "properties": { + "bbpos_wisepos_e": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_device_type_specific_config" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "is_account_default": { + "description": "Whether this Configuration is the default for your account", + "type": ["boolean", "null"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.configuration"], + "type": "string" + }, + "tipping": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_tipping" + }, + "verifone_p400": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_device_type_specific_config" + } + }, + "required": ["id", "livemode", "object"], + "title": "TerminalConfigurationConfiguration", + "type": "object", + "x-expandableFields": ["bbpos_wisepos_e", "tipping", "verifone_p400"], + "x-resourceId": "terminal.configuration" + }, + "terminal.connection_token": { + "description": "A Connection Token is used by the Stripe Terminal SDK to connect to a reader.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).", + "properties": { + "location": { + "description": "The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.connection_token"], + "type": "string" + }, + "secret": { + "description": "Your application should pass this token to the Stripe Terminal SDK.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["object", "secret"], + "title": "TerminalConnectionToken", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "terminal.connection_token" + }, + "terminal.location": { + "description": "A Location represents a grouping of readers.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).", + "properties": { + "address": { + "$ref": "#/definitions/address" + }, + "configuration_overrides": { + "description": "The ID of a configuration that will be used to customize all readers in this location.", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "The display name of the location.", + "maxLength": 5000, + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.location"], + "type": "string" + } + }, + "required": [ + "address", + "display_name", + "id", + "livemode", + "metadata", + "object" + ], + "title": "TerminalLocationLocation", + "type": "object", + "x-expandableFields": ["address"], + "x-resourceId": "terminal.location" + }, + "terminal.reader": { + "description": "A Reader represents a physical device for accepting payment details.\n\nRelated guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).", + "properties": { + "action": { + "anyOf": [ + { + "$ref": "#/definitions/terminal_reader_reader_resource_reader_action" + }, + { + "type": "null" + } + ], + "description": "The most recent action performed by the reader." + }, + "device_sw_version": { + "description": "The current software version of the reader.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "device_type": { + "description": "Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`.", + "enum": [ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "simulated_wisepos_e", + "stripe_m2", + "verifone_P400" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "ip_address": { + "description": "The local IP address of the reader.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "label": { + "description": "Custom label given to the reader for easier identification.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "location": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/terminal.location" + }, + { + "type": "null" + } + ], + "description": "The location identifier of the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/terminal.location" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["terminal.reader"], + "type": "string" + }, + "serial_number": { + "description": "Serial number of the reader.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The networking status of the reader.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "device_type", + "id", + "label", + "livemode", + "metadata", + "object", + "serial_number" + ], + "title": "TerminalReaderReader", + "type": "object", + "x-expandableFields": ["action", "location"], + "x-resourceId": "terminal.reader" + }, + "terminal_configuration_configuration_resource_currency_specific_config": { + "description": "", + "properties": { + "fixed_amounts": { + "description": "Fixed amounts displayed when collecting a tip", + "items": { + "type": "integer" + }, + "type": ["array", "null"] + }, + "percentages": { + "description": "Percentages displayed when collecting a tip", + "items": { + "type": "integer" + }, + "type": ["array", "null"] + }, + "smart_tip_threshold": { + "description": "Below this amount, fixed amounts will be displayed; above it, percentages will be displayed", + "type": "integer" + } + }, + "title": "TerminalConfigurationConfigurationResourceCurrencySpecificConfig", + "type": "object", + "x-expandableFields": [] + }, + "terminal_configuration_configuration_resource_device_type_specific_config": { + "description": "", + "properties": { + "splashscreen": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/file" + } + ], + "description": "A File ID representing an image you would like displayed on the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/file" + } + ] + } + } + }, + "title": "TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig", + "type": "object", + "x-expandableFields": ["splashscreen"] + }, + "terminal_configuration_configuration_resource_tipping": { + "description": "", + "properties": { + "aud": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "cad": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "chf": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "czk": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "dkk": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "eur": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "gbp": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "hkd": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "myr": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nok": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "nzd": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sek": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "sgd": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + }, + "usd": { + "$ref": "#/definitions/terminal_configuration_configuration_resource_currency_specific_config" + } + }, + "title": "TerminalConfigurationConfigurationResourceTipping", + "type": "object", + "x-expandableFields": [ + "aud", + "cad", + "chf", + "czk", + "dkk", + "eur", + "gbp", + "hkd", + "myr", + "nok", + "nzd", + "sek", + "sgd", + "usd" + ] + }, + "terminal_reader_reader_resource_cart": { + "description": "Represents a cart to be displayed on the reader", + "properties": { + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "line_items": { + "description": "List of line items in the cart.", + "items": { + "$ref": "#/definitions/terminal_reader_reader_resource_line_item" + }, + "type": "array" + }, + "tax": { + "description": "Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": ["integer", "null"] + }, + "total": { + "description": "Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + } + }, + "required": ["currency", "line_items", "total"], + "title": "TerminalReaderReaderResourceCart", + "type": "object", + "x-expandableFields": ["line_items"] + }, + "terminal_reader_reader_resource_line_item": { + "description": "Represents a line item to be displayed on the reader", + "properties": { + "amount": { + "description": "The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).", + "type": "integer" + }, + "description": { + "description": "Description of the line item.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The quantity of the line item.", + "type": "integer" + } + }, + "required": ["amount", "description", "quantity"], + "title": "TerminalReaderReaderResourceLineItem", + "type": "object", + "x-expandableFields": [] + }, + "terminal_reader_reader_resource_process_config": { + "description": "Represents a per-transaction override of a reader configuration", + "properties": { + "skip_tipping": { + "description": "Override showing a tipping selection screen on this transaction.", + "type": "boolean" + }, + "tipping": { + "$ref": "#/definitions/terminal_reader_reader_resource_tipping_config" + } + }, + "title": "TerminalReaderReaderResourceProcessConfig", + "type": "object", + "x-expandableFields": ["tipping"] + }, + "terminal_reader_reader_resource_process_payment_intent_action": { + "description": "Represents a reader action to process a payment intent", + "properties": { + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + } + ], + "description": "Most recent PaymentIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "process_config": { + "$ref": "#/definitions/terminal_reader_reader_resource_process_config" + } + }, + "required": ["payment_intent"], + "title": "TerminalReaderReaderResourceProcessPaymentIntentAction", + "type": "object", + "x-expandableFields": ["payment_intent", "process_config"] + }, + "terminal_reader_reader_resource_process_setup_intent_action": { + "description": "Represents a reader action to process a setup intent", + "properties": { + "generated_card": { + "description": "ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.", + "maxLength": 5000, + "type": "string" + }, + "setup_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/setup_intent" + } + ], + "description": "Most recent SetupIntent processed by the reader.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/setup_intent" + } + ] + } + } + }, + "required": ["setup_intent"], + "title": "TerminalReaderReaderResourceProcessSetupIntentAction", + "type": "object", + "x-expandableFields": ["setup_intent"] + }, + "terminal_reader_reader_resource_reader_action": { + "description": "Represents an action performed by the reader", + "properties": { + "failure_code": { + "description": "Failure code, only set if status is `failed`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "failure_message": { + "description": "Detailed failure message, only set if status is `failed`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "process_payment_intent": { + "$ref": "#/definitions/terminal_reader_reader_resource_process_payment_intent_action" + }, + "process_setup_intent": { + "$ref": "#/definitions/terminal_reader_reader_resource_process_setup_intent_action" + }, + "refund_payment": { + "$ref": "#/definitions/terminal_reader_reader_resource_refund_payment_action" + }, + "set_reader_display": { + "$ref": "#/definitions/terminal_reader_reader_resource_set_reader_display_action" + }, + "status": { + "description": "Status of the action performed by the reader.", + "enum": ["failed", "in_progress", "succeeded"], + "type": "string" + }, + "type": { + "description": "Type of action performed by the reader.", + "enum": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["status", "type"], + "title": "TerminalReaderReaderResourceReaderAction", + "type": "object", + "x-expandableFields": [ + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "set_reader_display" + ] + }, + "terminal_reader_reader_resource_refund_payment_action": { + "description": "Represents a reader action to refund a payment", + "properties": { + "amount": { + "description": "The amount being refunded.", + "type": "integer" + }, + "charge": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + } + ], + "description": "Charge that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "payment_intent": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/payment_intent" + } + ], + "description": "Payment intent that is being refunded.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/payment_intent" + } + ] + } + }, + "reason": { + "description": "The reason for the refund.", + "enum": ["duplicate", "fraudulent", "requested_by_customer"], + "type": "string" + }, + "refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/refund" + } + ], + "description": "Unique identifier for the refund object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/refund" + } + ] + } + }, + "refund_application_fee": { + "description": "Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.", + "type": "boolean" + }, + "reverse_transfer": { + "description": "Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.", + "type": "boolean" + } + }, + "title": "TerminalReaderReaderResourceRefundPaymentAction", + "type": "object", + "x-expandableFields": ["charge", "payment_intent", "refund"] + }, + "terminal_reader_reader_resource_set_reader_display_action": { + "description": "Represents a reader action to set the reader display", + "properties": { + "cart": { + "anyOf": [ + { + "$ref": "#/definitions/terminal_reader_reader_resource_cart" + }, + { + "type": "null" + } + ], + "description": "Cart object to be displayed by the reader." + }, + "type": { + "description": "Type of information to be displayed by the reader.", + "enum": ["cart"], + "type": "string" + } + }, + "required": ["type"], + "title": "TerminalReaderReaderResourceSetReaderDisplayAction", + "type": "object", + "x-expandableFields": ["cart"] + }, + "terminal_reader_reader_resource_tipping_config": { + "description": "Represents a per-transaction tipping configuration", + "properties": { + "amount_eligible": { + "description": "Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).", + "type": "integer" + } + }, + "title": "TerminalReaderReaderResourceTippingConfig", + "type": "object", + "x-expandableFields": [] + }, + "test_helpers.test_clock": { + "description": "A test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,\nyou can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "deletes_after": { + "description": "Time at which this clock is scheduled to auto delete.", + "format": "unix-time", + "type": "integer" + }, + "frozen_time": { + "description": "Time at which all objects belonging to this clock are frozen.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "name": { + "description": "The custom name supplied at creation.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "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" + } + }, + "required": [ + "created", + "deletes_after", + "frozen_time", + "id", + "livemode", + "object", + "status" + ], + "title": "TestClock", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "test_helpers.test_clock" + }, + "three_d_secure_details": { + "description": "", + "properties": { + "authentication_flow": { + "description": "For authenticated transactions: how the customer was authenticated by\nthe issuing bank.", + "enum": ["challenge", "frictionless", null], + "type": ["string", "null"] + }, + "result": { + "description": "Indicates the outcome of 3D Secure authentication.", + "enum": [ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + null + ], + "type": ["string", "null"] + }, + "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", + null + ], + "type": ["string", "null"] + }, + "version": { + "description": "The version of 3D Secure that was used.", + "enum": ["1.0.2", "2.1.0", "2.2.0", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + } + }, + "title": "three_d_secure_details", + "type": "object", + "x-expandableFields": [] + }, + "three_d_secure_usage": { + "description": "", + "properties": { + "supported": { + "description": "Whether 3D Secure is supported on this card.", + "type": "boolean" + } + }, + "required": ["supported"], + "title": "three_d_secure_usage", + "type": "object", + "x-expandableFields": [] + }, + "token": { + "description": "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. You should use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\nclient-side. This ensures that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you cannot use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. Keep in mind that if\nyour integration uses this method, you are responsible for any PCI compliance\nthat may be required, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information is not sent directly to\nStripe, so we cannot determine how it is handled or stored.\n\nTokens cannot be stored or used more than once. To store card or bank account\ninformation for later use, you can create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.\n\nRelated guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)", + "properties": { + "bank_account": { + "$ref": "#/definitions/bank_account" + }, + "card": { + "$ref": "#/definitions/card" + }, + "client_ip": { + "description": "IP address of the client that generated the token.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["token"], + "type": "string" + }, + "type": { + "description": "Type of the token: `account`, `bank_account`, `card`, or `pii`.", + "maxLength": 5000, + "type": "string" + }, + "used": { + "description": "Whether this token has already been used (tokens can be used only once).", + "type": "boolean" + } + }, + "required": ["created", "id", "livemode", "object", "type", "used"], + "title": "Token", + "type": "object", + "x-expandableFields": ["bank_account", "card"], + "x-resourceId": "token" + }, + "topup": { + "description": "To top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.\n\nRelated guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).", + "properties": { + "amount": { + "description": "Amount transferred.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "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.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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, + "type": ["string", "null"] + }, + "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.", + "type": ["integer", "null"] + }, + "failure_code": { + "description": "Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).", + "maxLength": 5000, + "type": ["string", "null"] + }, + "failure_message": { + "description": "Message to user further explaining reason for top-up failure if available.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["topup"], + "type": "string" + }, + "source": { + "anyOf": [ + { + "$ref": "#/definitions/source" + }, + { + "type": "null" + } + ], + "description": "For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account." + }, + "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, + "type": ["string", "null"] + }, + "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, + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "status" + ], + "title": "Topup", + "type": "object", + "x-expandableFields": ["balance_transaction", "source"], + "x-resourceId": "topup" + }, + "transfer": { + "description": "A `Transfer` object is created when you move funds between Stripe accounts as\npart of Connect.\n\nBefore April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more\ninformation, read about the\n[transfer/payout split](https://stripe.com/docs/transfer-payout-split).\n\nRelated guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).", + "properties": { + "amount": { + "description": "Amount in %s to be transferred.", + "type": "integer" + }, + "amount_reversed": { + "description": "Amount in %s 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": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact of this transfer on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + }, + { + "type": "null" + } + ], + "description": "ID of the Stripe account the transfer was sent to.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + }, + "destination_payment": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/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": "#/definitions/charge" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["transfer"], + "type": "string" + }, + "reversals": { + "description": "A list of reversals that have been applied to the transfer.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/transfer_reversal" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TransferReversalList", + "type": "object", + "x-expandableFields": ["data"] + }, + "reversed": { + "description": "Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.", + "type": "boolean" + }, + "source_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/charge" + }, + { + "type": "null" + } + ], + "description": "ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/charge" + } + ] + } + }, + "source_type": { + "description": "The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.", + "maxLength": 5000, + "type": "string" + }, + "transfer_group": { + "description": "A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": [ + "amount", + "amount_reversed", + "created", + "currency", + "id", + "livemode", + "metadata", + "object", + "reversals", + "reversed" + ], + "title": "Transfer", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination", + "destination_payment", + "reversals", + "source_transaction" + ], + "x-resourceId": "transfer" + }, + "transfer_data": { + "description": "", + "properties": { + "amount": { + "description": "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", + "type": "integer" + }, + "destination": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/account" + } + ], + "description": "The account (if any) the payment will be attributed to for tax\nreporting, and where funds from the payment will be transferred to upon\npayment success.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/account" + } + ] + } + } + }, + "required": ["destination"], + "title": "transfer_data", + "type": "object", + "x-expandableFields": ["destination"] + }, + "transfer_reversal": { + "description": "[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.\n\nReversing a transfer that was made for a [destination\ncharge](/docs/connect/destination-charges) is allowed only up to the amount of\nthe charge. It is possible to reverse a\n[transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)\ntransfer only if the destination account has enough balance to cover the\nreversal.\n\nRelated guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).", + "properties": { + "amount": { + "description": "Amount, in %s.", + "type": "integer" + }, + "balance_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/balance_transaction" + }, + { + "type": "null" + } + ], + "description": "Balance transaction that describes the impact on your account balance.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/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).", + "type": "string" + }, + "destination_payment_refund": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/refund" + }, + { + "type": "null" + } + ], + "description": "Linked payment refund for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/refund" + } + ] + } + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "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": "#/definitions/refund" + }, + { + "type": "null" + } + ], + "description": "ID of the refund responsible for the transfer reversal.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/refund" + } + ] + } + }, + "transfer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/transfer" + } + ], + "description": "ID of the transfer that was reversed.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/transfer" + } + ] + } + } + }, + "required": ["amount", "created", "currency", "id", "object", "transfer"], + "title": "TransferReversal", + "type": "object", + "x-expandableFields": [ + "balance_transaction", + "destination_payment_refund", + "source_refund", + "transfer" + ], + "x-resourceId": "transfer_reversal" + }, + "transfer_schedule": { + "description": "", + "properties": { + "delay_days": { + "description": "The number of days charges for the account will be held before being paid out.", + "type": "integer" + }, + "interval": { + "description": "How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.", + "maxLength": 5000, + "type": "string" + }, + "monthly_anchor": { + "description": "The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.", + "type": "integer" + }, + "weekly_anchor": { + "description": "The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.", + "maxLength": 5000, + "type": "string" + } + }, + "required": ["delay_days", "interval"], + "title": "TransferSchedule", + "type": "object", + "x-expandableFields": [] + }, + "transform_quantity": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": ["down", "up"], + "type": "string" + } + }, + "required": ["divide_by", "round"], + "title": "TransformQuantity", + "type": "object", + "x-expandableFields": [] + }, + "transform_usage": { + "description": "", + "properties": { + "divide_by": { + "description": "Divide usage by this number.", + "type": "integer" + }, + "round": { + "description": "After division, either round the result `up` or `down`.", + "enum": ["down", "up"], + "type": "string" + } + }, + "required": ["divide_by", "round"], + "title": "TransformUsage", + "type": "object", + "x-expandableFields": [] + }, + "treasury.credit_reversal": { + "description": "You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": ["ach", "stripe"], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.credit_reversal"], + "type": "string" + }, + "received_credit": { + "description": "The ReceivedCredit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the CreditReversal", + "enum": ["canceled", "posted", "processing"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/definitions/treasury_received_credits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "financial_account", + "id", + "livemode", + "metadata", + "network", + "object", + "received_credit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedCreditsResourceCreditReversal", + "type": "object", + "x-expandableFields": ["status_transitions", "transaction"], + "x-resourceId": "treasury.credit_reversal" + }, + "treasury.debit_reversal": { + "description": "You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "financial_account": { + "description": "The FinancialAccount to reverse funds from.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_received_debits_resource_debit_reversal_linked_flows" + }, + { + "type": "null" + } + ], + "description": "Other flows linked to a DebitReversal." + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "network": { + "description": "The rails used to reverse the funds.", + "enum": ["ach", "card"], + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.debit_reversal"], + "type": "string" + }, + "received_debit": { + "description": "The ReceivedDebit being reversed.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the DebitReversal", + "enum": ["failed", "processing", "succeeded"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/definitions/treasury_received_debits_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "id", + "livemode", + "metadata", + "network", + "object", + "received_debit", + "status", + "status_transitions" + ], + "title": "TreasuryReceivedDebitsResourceDebitReversal", + "type": "object", + "x-expandableFields": [ + "linked_flows", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.debit_reversal" + }, + "treasury.financial_account": { + "description": "Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.\nFinancialAccounts serve as the source and destination of Treasury’s money movement APIs.", + "properties": { + "active_features": { + "description": "The array of paths to active Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "balance": { + "$ref": "#/definitions/treasury_financial_accounts_resource_balance" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "features": { + "$ref": "#/definitions/treasury.financial_account_features" + }, + "financial_addresses": { + "description": "The set of credentials that resolve to a FinancialAccount.", + "items": { + "$ref": "#/definitions/treasury_financial_accounts_resource_financial_address" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": ["object", "null"] + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.financial_account"], + "type": "string" + }, + "pending_features": { + "description": "The array of paths to pending Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "platform_restrictions": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_financial_accounts_resource_platform_restrictions" + }, + { + "type": "null" + } + ], + "description": "The set of functionalities that the platform can restrict on the FinancialAccount." + }, + "restricted_features": { + "description": "The array of paths to restricted Features in the Features hash.", + "items": { + "enum": [ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "status": { + "description": "The enum specifying what state the account is in.", + "enum": ["closed", "open"], + "type": "string", + "x-stripeBypassValidation": true + }, + "status_details": { + "$ref": "#/definitions/treasury_financial_accounts_resource_status_details" + }, + "supported_currencies": { + "description": "The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "balance", + "country", + "created", + "financial_addresses", + "id", + "livemode", + "object", + "status", + "status_details", + "supported_currencies" + ], + "title": "TreasuryFinancialAccountsResourceFinancialAccount", + "type": "object", + "x-expandableFields": [ + "balance", + "features", + "financial_addresses", + "platform_restrictions", + "status_details" + ], + "x-resourceId": "treasury.financial_account" + }, + "treasury.financial_account_features": { + "description": "Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.\nStripe or the platform can control Features via the requested field.", + "properties": { + "card_issuing": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggle_settings" + }, + "deposit_insurance": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggle_settings" + }, + "financial_addresses": { + "$ref": "#/definitions/treasury_financial_accounts_resource_financial_addresses_features" + }, + "inbound_transfers": { + "$ref": "#/definitions/treasury_financial_accounts_resource_inbound_transfers" + }, + "intra_stripe_flows": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggle_settings" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.financial_account_features"], + "type": "string" + }, + "outbound_payments": { + "$ref": "#/definitions/treasury_financial_accounts_resource_outbound_payments" + }, + "outbound_transfers": { + "$ref": "#/definitions/treasury_financial_accounts_resource_outbound_transfers" + } + }, + "required": ["object"], + "title": "TreasuryFinancialAccountsResourceFinancialAccountFeatures", + "type": "object", + "x-expandableFields": [ + "card_issuing", + "deposit_insurance", + "financial_addresses", + "inbound_transfers", + "intra_stripe_flows", + "outbound_payments", + "outbound_transfers" + ], + "x-resourceId": "treasury.financial_account_features" + }, + "treasury.inbound_transfer": { + "description": "Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the InboundTransfer is able to be canceled.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "failure_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_inbound_transfers_resource_failure_details" + }, + { + "type": "null" + } + ], + "description": "Details about this InboundTransfer's failure. Only set when status is `failed`." + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "linked_flows": { + "$ref": "#/definitions/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.inbound_transfer"], + "type": "string" + }, + "origin_payment_method": { + "description": "The origin payment method to be debited for an InboundTransfer.", + "maxLength": 5000, + "type": "string" + }, + "origin_payment_method_details": { + "anyOf": [ + { + "$ref": "#/definitions/inbound_transfers" + }, + { + "type": "null" + } + ], + "description": "Details about the PaymentMethod for an InboundTransfer." + }, + "returned": { + "description": "Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.", + "type": ["boolean", "null"] + }, + "statement_descriptor": { + "description": "Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been \"confirmed\" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.", + "enum": ["canceled", "failed", "processing", "succeeded"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/definitions/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "financial_account", + "id", + "linked_flows", + "livemode", + "metadata", + "object", + "origin_payment_method", + "statement_descriptor", + "status", + "status_transitions" + ], + "title": "TreasuryInboundTransfersResourceInboundTransfer", + "type": "object", + "x-expandableFields": [ + "failure_details", + "linked_flows", + "origin_payment_method_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.inbound_transfer" + }, + "treasury.outbound_payment": { + "description": "Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).\n\nSimulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "customer": { + "description": "ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "destination_payment_method": { + "description": "The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "destination_payment_method_details": { + "anyOf": [ + { + "$ref": "#/definitions/outbound_payments_payment_method_details" + }, + { + "type": "null" + } + ], + "description": "Details about the PaymentMethod for an OutboundPayment." + }, + "end_user_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details" + }, + { + "type": "null" + } + ], + "description": "Details about the end user." + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.outbound_payment"], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_outbound_payments_resource_returned_status" + }, + { + "type": "null" + } + ], + "description": "Details about a returned OutboundPayment. Only set when the status is `returned`." + }, + "statement_descriptor": { + "description": "The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been \"confirmed\" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.", + "enum": ["canceled", "failed", "posted", "processing", "returned"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/definitions/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundPaymentsResourceOutboundPayment", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "end_user_details", + "returned_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.outbound_payment" + }, + "treasury.outbound_transfer": { + "description": "Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.\n\nSimulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "cancelable": { + "description": "Returns `true` if the object can be canceled, and `false` otherwise.", + "type": "boolean" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "destination_payment_method": { + "description": "The PaymentMethod used as the payment instrument for an OutboundTransfer.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "destination_payment_method_details": { + "$ref": "#/definitions/outbound_transfers_payment_method_details" + }, + "expected_arrival_date": { + "description": "The date when funds are expected to arrive in the destination account.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": "string" + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.outbound_transfer"], + "type": "string" + }, + "returned_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_outbound_transfers_resource_returned_details" + }, + { + "type": "null" + } + ], + "description": "Details about a returned OutboundTransfer. Only set when the status is `returned`." + }, + "statement_descriptor": { + "description": "Information about the OutboundTransfer to be sent to the recipient account.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been \"confirmed\" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.", + "enum": ["canceled", "failed", "posted", "processing", "returned"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/definitions/treasury_outbound_transfers_resource_status_transitions" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "cancelable", + "created", + "currency", + "destination_payment_method_details", + "expected_arrival_date", + "financial_account", + "id", + "livemode", + "metadata", + "object", + "statement_descriptor", + "status", + "status_transitions", + "transaction" + ], + "title": "TreasuryOutboundTransfersResourceOutboundTransfer", + "type": "object", + "x-expandableFields": [ + "destination_payment_method_details", + "returned_details", + "status_transitions", + "transaction" + ], + "x-resourceId": "treasury.outbound_transfer" + }, + "treasury.received_credit": { + "description": "ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.", + "enum": ["account_closed", "account_frozen", "other", null], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "financial_account": { + "description": "The FinancialAccount that received the funds.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/definitions/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/definitions/treasury_received_credits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The rails used to send the funds.", + "enum": ["ach", "card", "stripe", "us_domestic_wire"], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.received_credit"], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_received_credits_resource_reversal_details" + }, + { + "type": "null" + } + ], + "description": "Details describing when a ReceivedCredit may be reversed." + }, + "status": { + "description": "Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.", + "enum": ["failed", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "initiating_payment_method_details", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedCreditsResourceReceivedCredit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_credit" + }, + "treasury.received_debit": { + "description": "ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "failure_code": { + "description": "Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.", + "enum": [ + "account_closed", + "account_frozen", + "insufficient_funds", + "other", + null + ], + "type": ["string", "null"] + }, + "financial_account": { + "description": "The FinancialAccount that funds were pulled from.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "hosted_regulatory_receipt_url": { + "description": "A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "initiating_payment_method_details": { + "$ref": "#/definitions/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + }, + "linked_flows": { + "$ref": "#/definitions/treasury_received_debits_resource_linked_flows" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "network": { + "description": "The network used for the ReceivedDebit.", + "enum": ["ach", "card", "stripe"], + "type": "string", + "x-stripeBypassValidation": true + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.received_debit"], + "type": "string" + }, + "reversal_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_received_debits_resource_reversal_details" + }, + { + "type": "null" + } + ], + "description": "Details describing when a ReceivedDebit might be reversed." + }, + "status": { + "description": "Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.", + "enum": ["failed", "succeeded"], + "type": "string", + "x-stripeBypassValidation": true + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + }, + { + "type": "null" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": [ + "amount", + "created", + "currency", + "description", + "id", + "linked_flows", + "livemode", + "network", + "object", + "status" + ], + "title": "TreasuryReceivedDebitsResourceReceivedDebit", + "type": "object", + "x-expandableFields": [ + "initiating_payment_method_details", + "linked_flows", + "reversal_details", + "transaction" + ], + "x-resourceId": "treasury.received_debit" + }, + "treasury.transaction": { + "description": "Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.", + "properties": { + "amount": { + "description": "Amount (in cents) transferred.", + "type": "integer" + }, + "balance_impact": { + "$ref": "#/definitions/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "description": { + "description": "An arbitrary string attached to the object. Often useful for displaying to users.", + "maxLength": 5000, + "type": "string" + }, + "entries": { + "description": "A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/definitions/treasury.transaction_entry" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": ["list"], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/treasury/transaction_entries", + "type": "string" + } + }, + "required": ["data", "has_more", "object", "url"], + "title": "TreasuryTransactionsResourceTransactionEntryList", + "type": ["object", "null"], + "x-expandableFields": ["data"] + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "ID of the flow that created the Transaction.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_transactions_resource_flow_details" + }, + { + "type": "null" + } + ], + "description": "Details of the flow that created the Transaction." + }, + "flow_type": { + "description": "Type of the flow that created the Transaction.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.transaction"], + "type": "string" + }, + "status": { + "description": "Status of the Transaction.", + "enum": ["open", "posted", "void"], + "type": "string" + }, + "status_transitions": { + "$ref": "#/definitions/treasury_transactions_resource_abstract_transaction_resource_status_transitions" + } + }, + "required": [ + "amount", + "balance_impact", + "created", + "currency", + "description", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "status", + "status_transitions" + ], + "title": "TreasuryTransactionsResourceTransaction", + "type": "object", + "x-expandableFields": [ + "balance_impact", + "entries", + "flow_details", + "status_transitions" + ], + "x-resourceId": "treasury.transaction" + }, + "treasury.transaction_entry": { + "description": "TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).", + "properties": { + "balance_impact": { + "$ref": "#/definitions/treasury_transactions_resource_balance_impact" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", + "type": "string" + }, + "effective_at": { + "description": "When the TransactionEntry will impact the FinancialAccount's balance.", + "format": "unix-time", + "type": "integer" + }, + "financial_account": { + "description": "The FinancialAccount associated with this object.", + "maxLength": 5000, + "type": "string" + }, + "flow": { + "description": "Token of the flow associated with the TransactionEntry.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "flow_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_transactions_resource_flow_details" + }, + { + "type": "null" + } + ], + "description": "Details of the flow associated with the TransactionEntry." + }, + "flow_type": { + "description": "Type of the flow associated with the TransactionEntry.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["treasury.transaction_entry"], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + }, + "type": { + "description": "The specific money movement that generated the TransactionEntry.", + "enum": [ + "credit_reversal", + "credit_reversal_posting", + "debit_reversal", + "inbound_transfer", + "inbound_transfer_return", + "issuing_authorization_hold", + "issuing_authorization_release", + "other", + "outbound_payment", + "outbound_payment_cancellation", + "outbound_payment_failure", + "outbound_payment_posting", + "outbound_payment_return", + "outbound_transfer", + "outbound_transfer_cancellation", + "outbound_transfer_failure", + "outbound_transfer_posting", + "outbound_transfer_return", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": [ + "balance_impact", + "created", + "currency", + "effective_at", + "financial_account", + "flow_type", + "id", + "livemode", + "object", + "transaction", + "type" + ], + "title": "TreasuryTransactionsResourceTransactionEntry", + "type": "object", + "x-expandableFields": ["balance_impact", "flow_details", "transaction"], + "x-resourceId": "treasury.transaction_entry" + }, + "treasury_financial_accounts_resource_aba_record": { + "description": "ABA Records contain U.S. bank account details per the ABA format.", + "properties": { + "account_holder_name": { + "description": "The name of the person or business that owns the bank account.", + "maxLength": 5000, + "type": "string" + }, + "account_number": { + "description": "The account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "account_number_last4": { + "description": "The last four characters of the account number.", + "maxLength": 5000, + "type": "string" + }, + "bank_name": { + "description": "Name of the bank.", + "maxLength": 5000, + "type": "string" + }, + "routing_number": { + "description": "Routing number for the account.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "account_holder_name", + "account_number_last4", + "bank_name", + "routing_number" + ], + "title": "TreasuryFinancialAccountsResourceABARecord", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_ach_toggle_settings": { + "description": "Toggle settings for enabling/disabling an ACH specific feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": ["active", "pending", "restricted"], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": ["requested", "status", "status_details"], + "title": "TreasuryFinancialAccountsResourceAchToggleSettings", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "treasury_financial_accounts_resource_balance": { + "description": "Balance information for the FinancialAccount", + "properties": { + "cash": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds the user can spend right now.", + "type": "object" + }, + "inbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds not spendable yet, but will become available at a later time.", + "type": "object" + }, + "outbound_pending": { + "additionalProperties": { + "type": "integer" + }, + "description": "Funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "object" + } + }, + "required": ["cash", "inbound_pending", "outbound_pending"], + "title": "TreasuryFinancialAccountsResourceBalance", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_closed_status_details": { + "description": "", + "properties": { + "reasons": { + "description": "The array that contains reasons for a FinancialAccount closure.", + "items": { + "enum": ["account_rejected", "closed_by_platform", "other"], + "type": "string" + }, + "type": "array" + } + }, + "required": ["reasons"], + "title": "TreasuryFinancialAccountsResourceClosedStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_financial_address": { + "description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.", + "properties": { + "aba": { + "$ref": "#/definitions/treasury_financial_accounts_resource_aba_record" + }, + "supported_networks": { + "description": "The list of networks that the address supports", + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "type": { + "description": "The type of financial address", + "enum": ["aba"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "TreasuryFinancialAccountsResourceFinancialAddress", + "type": "object", + "x-expandableFields": ["aba"] + }, + "treasury_financial_accounts_resource_financial_addresses_features": { + "description": "Settings related to Financial Addresses features on a Financial Account", + "properties": { + "aba": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceFinancialAddressesFeatures", + "type": "object", + "x-expandableFields": ["aba"] + }, + "treasury_financial_accounts_resource_inbound_transfers": { + "description": "InboundTransfers contains inbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/definitions/treasury_financial_accounts_resource_ach_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceInboundTransfers", + "type": "object", + "x-expandableFields": ["ach"] + }, + "treasury_financial_accounts_resource_outbound_payments": { + "description": "Settings related to Outbound Payments features on a Financial Account", + "properties": { + "ach": { + "$ref": "#/definitions/treasury_financial_accounts_resource_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundPayments", + "type": "object", + "x-expandableFields": ["ach", "us_domestic_wire"] + }, + "treasury_financial_accounts_resource_outbound_transfers": { + "description": "OutboundTransfers contains outbound transfers features for a FinancialAccount.", + "properties": { + "ach": { + "$ref": "#/definitions/treasury_financial_accounts_resource_ach_toggle_settings" + }, + "us_domestic_wire": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggle_settings" + } + }, + "title": "TreasuryFinancialAccountsResourceOutboundTransfers", + "type": "object", + "x-expandableFields": ["ach", "us_domestic_wire"] + }, + "treasury_financial_accounts_resource_platform_restrictions": { + "description": "Restrictions that a Connect Platform has placed on this FinancialAccount.", + "properties": { + "inbound_flows": { + "description": "Restricts all inbound money movement.", + "enum": ["restricted", "unrestricted", null], + "type": ["string", "null"] + }, + "outbound_flows": { + "description": "Restricts all outbound money movement.", + "enum": ["restricted", "unrestricted", null], + "type": ["string", "null"] + } + }, + "title": "TreasuryFinancialAccountsResourcePlatformRestrictions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_financial_accounts_resource_status_details": { + "description": "", + "properties": { + "closed": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_financial_accounts_resource_closed_status_details" + }, + { + "type": "null" + } + ], + "description": "Details related to the closure of this FinancialAccount" + } + }, + "title": "TreasuryFinancialAccountsResourceStatusDetails", + "type": "object", + "x-expandableFields": ["closed"] + }, + "treasury_financial_accounts_resource_toggle_settings": { + "description": "Toggle settings for enabling/disabling a feature", + "properties": { + "requested": { + "description": "Whether the FinancialAccount should have the Feature.", + "type": "boolean" + }, + "status": { + "description": "Whether the Feature is operational.", + "enum": ["active", "pending", "restricted"], + "type": "string" + }, + "status_details": { + "description": "Additional details; includes at least one entry when the status is not `active`.", + "items": { + "$ref": "#/definitions/treasury_financial_accounts_resource_toggles_setting_status_details" + }, + "type": "array" + } + }, + "required": ["requested", "status", "status_details"], + "title": "TreasuryFinancialAccountsResourceToggleSettings", + "type": "object", + "x-expandableFields": ["status_details"] + }, + "treasury_financial_accounts_resource_toggles_setting_status_details": { + "description": "Additional details on the FinancialAccount Features information.", + "properties": { + "code": { + "description": "Represents the reason why the status is `pending` or `restricted`.", + "enum": [ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "resolution": { + "description": "Represents what the user should do, if anything, to activate the Feature.", + "enum": [ + "contact_stripe", + "provide_information", + "remove_restriction", + null + ], + "type": ["string", "null"], + "x-stripeBypassValidation": true + }, + "restriction": { + "description": "The `platform_restrictions` that are restricting this Feature.", + "enum": ["inbound_flows", "outbound_flows"], + "type": "string" + } + }, + "required": ["code"], + "title": "TreasuryFinancialAccountsResourceTogglesSettingStatusDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_failure_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the failure.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + } + }, + "required": ["code"], + "title": "TreasuryInboundTransfersResourceFailureDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows": { + "description": "", + "properties": { + "received_debit": { + "description": "If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `canceled`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "failed_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `failed`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "succeeded_at": { + "description": "Timestamp describing when an InboundTransfer changed status to `succeeded`.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_end_user_details": { + "description": "", + "properties": { + "ip_address": { + "description": "IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "present": { + "description": "`true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.", + "type": "boolean" + } + }, + "required": ["present"], + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_outbound_payment_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `canceled`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "failed_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `failed`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "posted_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `posted`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "returned_at": { + "description": "Timestamp describing when an OutboundPayment changed status to `returned`.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_outbound_payments_resource_returned_status": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": ["code", "transaction"], + "title": "TreasuryOutboundPaymentsResourceReturnedStatus", + "type": "object", + "x-expandableFields": ["transaction"] + }, + "treasury_outbound_transfers_resource_returned_details": { + "description": "", + "properties": { + "code": { + "description": "Reason for the return.", + "enum": [ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other" + ], + "type": "string" + }, + "transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/definitions/treasury.transaction" + } + ], + "description": "The Transaction associated with this object.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/definitions/treasury.transaction" + } + ] + } + } + }, + "required": ["code", "transaction"], + "title": "TreasuryOutboundTransfersResourceReturnedDetails", + "type": "object", + "x-expandableFields": ["transaction"] + }, + "treasury_outbound_transfers_resource_status_transitions": { + "description": "", + "properties": { + "canceled_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `canceled`", + "format": "unix-time", + "type": ["integer", "null"] + }, + "failed_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `failed`", + "format": "unix-time", + "type": ["integer", "null"] + }, + "posted_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `posted`", + "format": "unix-time", + "type": ["integer", "null"] + }, + "returned_at": { + "description": "Timestamp describing when an OutboundTransfer changed status to `returned`", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "TreasuryOutboundTransfersResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_linked_flows": { + "description": "", + "properties": { + "credit_reversal": { + "description": "The CreditReversal created as a result of this ReceivedCredit being reversed.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "issuing_authorization": { + "description": "Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "issuing_transaction": { + "description": "Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "source_flow": { + "description": "ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "source_flow_details": { + "anyOf": [ + { + "$ref": "#/definitions/treasury_received_credits_resource_source_flows_details" + }, + { + "type": "null" + } + ], + "description": "The expandable object of the source flow." + }, + "source_flow_type": { + "description": "The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "TreasuryReceivedCreditsResourceLinkedFlows", + "type": "object", + "x-expandableFields": ["source_flow_details"] + }, + "treasury_received_credits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedCredit can be reversed.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "restricted_reason": { + "description": "Set if a ReceivedCredit cannot be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted", + null + ], + "type": ["string", "null"] + } + }, + "title": "TreasuryReceivedCreditsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_credits_resource_source_flows_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/definitions/treasury.credit_reversal" + }, + "outbound_payment": { + "$ref": "#/definitions/treasury.outbound_payment" + }, + "payout": { + "$ref": "#/definitions/payout" + }, + "type": { + "description": "The type of the source flow that originated the ReceivedCredit.", + "enum": ["credit_reversal", "other", "outbound_payment", "payout"], + "type": "string", + "x-stripeBypassValidation": true + } + }, + "required": ["type"], + "title": "TreasuryReceivedCreditsResourceSourceFlowsDetails", + "type": "object", + "x-expandableFields": ["credit_reversal", "outbound_payment", "payout"] + }, + "treasury_received_credits_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the CreditReversal changed status to `posted`", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "TreasuryReceivedCreditsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_debit_reversal_linked_flows": { + "description": "", + "properties": { + "issuing_dispute": { + "description": "Set if there is an Issuing dispute associated with the DebitReversal.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "TreasuryReceivedDebitsResourceDebitReversalLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_linked_flows": { + "description": "", + "properties": { + "debit_reversal": { + "description": "The DebitReversal created as a result of this ReceivedDebit being reversed.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "inbound_transfer": { + "description": "Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "issuing_authorization": { + "description": "Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "issuing_transaction": { + "description": "Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "TreasuryReceivedDebitsResourceLinkedFlows", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_reversal_details": { + "description": "", + "properties": { + "deadline": { + "description": "Time before which a ReceivedDebit can be reversed.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "restricted_reason": { + "description": "Set if a ReceivedDebit can't be reversed.", + "enum": [ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted", + null + ], + "type": ["string", "null"] + } + }, + "title": "TreasuryReceivedDebitsResourceReversalDetails", + "type": "object", + "x-expandableFields": [] + }, + "treasury_received_debits_resource_status_transitions": { + "description": "", + "properties": { + "completed_at": { + "description": "Timestamp describing when the DebitReversal changed status to `completed`.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "TreasuryReceivedDebitsResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_shared_resource_billing_details": { + "description": "", + "properties": { + "address": { + "$ref": "#/definitions/address" + }, + "email": { + "description": "Email address.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "name": { + "description": "Full name.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "required": ["address"], + "title": "TreasurySharedResourceBillingDetails", + "type": "object", + "x-expandableFields": ["address"] + }, + "treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details": { + "description": "", + "properties": { + "balance": { + "description": "Set when `type` is `balance`.", + "enum": ["payments"], + "type": "string" + }, + "billing_details": { + "$ref": "#/definitions/treasury_shared_resource_billing_details" + }, + "financial_account": { + "$ref": "#/definitions/received_payment_method_details_financial_account" + }, + "issuing_card": { + "description": "Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.", + "enum": [ + "balance", + "financial_account", + "issuing_card", + "stripe", + "us_bank_account" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "us_bank_account": { + "$ref": "#/definitions/treasury_shared_resource_initiating_payment_method_details_us_bank_account" + } + }, + "required": ["billing_details", "type"], + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails", + "type": "object", + "x-expandableFields": [ + "billing_details", + "financial_account", + "us_bank_account" + ] + }, + "treasury_shared_resource_initiating_payment_method_details_us_bank_account": { + "description": "", + "properties": { + "bank_name": { + "description": "Bank name.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "last4": { + "description": "The last four digits of the bank account number.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "routing_number": { + "description": "The routing number for the bank account.", + "maxLength": 5000, + "type": ["string", "null"] + } + }, + "title": "TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_abstract_transaction_resource_status_transitions": { + "description": "", + "properties": { + "posted_at": { + "description": "Timestamp describing when the Transaction changed status to `posted`.", + "format": "unix-time", + "type": ["integer", "null"] + }, + "void_at": { + "description": "Timestamp describing when the Transaction changed status to `void`.", + "format": "unix-time", + "type": ["integer", "null"] + } + }, + "title": "TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_balance_impact": { + "description": "Change to a FinancialAccount's balance", + "properties": { + "cash": { + "description": "The change made to funds the user can spend right now.", + "type": "integer" + }, + "inbound_pending": { + "description": "The change made to funds that are not spendable yet, but will become available at a later time.", + "type": "integer" + }, + "outbound_pending": { + "description": "The change made to funds in the account, but not spendable because they are being held for pending outbound flows.", + "type": "integer" + } + }, + "required": ["cash", "inbound_pending", "outbound_pending"], + "title": "TreasuryTransactionsResourceBalanceImpact", + "type": "object", + "x-expandableFields": [] + }, + "treasury_transactions_resource_flow_details": { + "description": "", + "properties": { + "credit_reversal": { + "$ref": "#/definitions/treasury.credit_reversal" + }, + "debit_reversal": { + "$ref": "#/definitions/treasury.debit_reversal" + }, + "inbound_transfer": { + "$ref": "#/definitions/treasury.inbound_transfer" + }, + "issuing_authorization": { + "$ref": "#/definitions/issuing.authorization" + }, + "outbound_payment": { + "$ref": "#/definitions/treasury.outbound_payment" + }, + "outbound_transfer": { + "$ref": "#/definitions/treasury.outbound_transfer" + }, + "received_credit": { + "$ref": "#/definitions/treasury.received_credit" + }, + "received_debit": { + "$ref": "#/definitions/treasury.received_debit" + }, + "type": { + "description": "Type of the flow that created the Transaction. Set to the same value as `flow_type`.", + "enum": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ], + "type": "string" + } + }, + "required": ["type"], + "title": "TreasuryTransactionsResourceFlowDetails", + "type": "object", + "x-expandableFields": [ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit" + ] + }, + "us_bank_account_networks": { + "description": "", + "properties": { + "preferred": { + "description": "The preferred network.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "supported": { + "description": "All supported networks.", + "items": { + "enum": ["ach", "us_domestic_wire"], + "type": "string" + }, + "type": "array" + } + }, + "required": ["supported"], + "title": "us_bank_account_networks", + "type": "object", + "x-expandableFields": [] + }, + "usage_record": { + "description": "Usage records allow you to report customer usage and metrics to Stripe for\nmetered billing of subscription prices.\n\nRelated guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing).", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["usage_record"], + "type": "string" + }, + "quantity": { + "description": "The usage quantity for the specified date.", + "type": "integer" + }, + "subscription_item": { + "description": "The ID of the subscription item this usage record contains data for.", + "maxLength": 5000, + "type": "string" + }, + "timestamp": { + "description": "The timestamp when this usage occurred.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "quantity", + "subscription_item", + "timestamp" + ], + "title": "UsageRecord", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "usage_record" + }, + "usage_record_summary": { + "description": "", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "invoice": { + "description": "The invoice in which this usage period has been billed for.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["usage_record_summary"], + "type": "string" + }, + "period": { + "$ref": "#/definitions/period" + }, + "subscription_item": { + "description": "The ID of the subscription item this summary is describing.", + "maxLength": 5000, + "type": "string" + }, + "total_usage": { + "description": "The total usage within this usage period.", + "type": "integer" + } + }, + "required": [ + "id", + "livemode", + "object", + "period", + "subscription_item", + "total_usage" + ], + "title": "UsageRecordSummary", + "type": "object", + "x-expandableFields": ["period"], + "x-resourceId": "usage_record_summary" + }, + "verification_session_redaction": { + "description": "", + "properties": { + "status": { + "description": "Indicates whether this object and its related objects have been redacted or not.", + "enum": ["processing", "redacted"], + "type": "string" + } + }, + "required": ["status"], + "title": "verification_session_redaction", + "type": "object", + "x-expandableFields": [] + }, + "webhook_endpoint": { + "description": "You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).", + "properties": { + "api_version": { + "description": "The API version events are rendered as for this webhook endpoint.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "application": { + "description": "The ID of the associated Connect application.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": ["string", "null"] + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["webhook_endpoint"], + "type": "string" + }, + "secret": { + "description": "The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the webhook. It can be `enabled` or `disabled`.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the webhook endpoint.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "enabled_events", + "id", + "livemode", + "metadata", + "object", + "status", + "url" + ], + "title": "NotificationWebhookEndpoint", + "type": "object", + "x-expandableFields": [], + "x-resourceId": "webhook_endpoint" + } + } +} diff --git a/apps/integrations/src/integrations/stripe/schemas/spec.ts b/apps/integrations/src/integrations/stripe/schemas/spec.ts deleted file mode 100644 index 8f1c7a2484d..00000000000 --- a/apps/integrations/src/integrations/stripe/schemas/spec.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { transformNullables } from "core/schemas/transformNullables"; -import { JSONSchema } from "core/schemas/types"; -import rawSpec from "./spec3.json"; -transformNullables(rawSpec); -export const spec: JSONSchema = rawSpec; diff --git a/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts index 422ad92ee98..61cd232c35c 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/events/checkoutSession.ts @@ -1,14 +1,8 @@ -import { schemaFromRef } from "core/schemas/makeSchema"; -import { JSONSchema } from "core/schemas/types"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; -import { spec } from "integrations/stripe/schemas/spec"; import { checkoutCompletedSuccess } from "./checkoutSession.examples"; -import { instructions, wrapEventWithWebhookData } from "./utilities"; +import { instructions } from "./utilities"; -export const checkoutSessionEventSchema: JSONSchema = wrapEventWithWebhookData( - "Checkout session", - schemaFromRef("#/components/schemas/checkout.session", spec) -); +const outputSchemaRef = "#/definitions/checkout.session"; export const checkoutCompleted: WebhookEvent = { name: "checkout.session.completed", @@ -17,7 +11,7 @@ export const checkoutCompleted: WebhookEvent = { description: "A checkout session was completed", tags: ["checkout"], }, - schema: checkoutSessionEventSchema, + outputSchemaRef, instructions: (data) => instructions("checkout session complete"), examples: [checkoutCompletedSuccess], key: "checkout.session.completed", @@ -53,7 +47,7 @@ export const checkoutExpired: WebhookEvent = { description: "A checkout session expired", tags: ["checkout"], }, - schema: checkoutSessionEventSchema, + outputSchemaRef, instructions: (data) => instructions("checkout session expired"), examples: [checkoutCompletedSuccess], key: "checkout.session.expired", @@ -90,7 +84,7 @@ export const checkoutAsyncPaymentFailed: WebhookEvent = { "Occurs when a payment intent using a delayed payment method fails.", tags: ["checkout"], }, - schema: checkoutSessionEventSchema, + outputSchemaRef, instructions: (data) => instructions("checkout session async payment failed"), examples: [checkoutCompletedSuccess], key: "checkout.session.async_payment_failed", @@ -128,7 +122,7 @@ export const checkoutAsyncPaymentSucceeded: WebhookEvent = { "Occurs when a payment intent using a delayed payment method finally succeeds.", tags: ["checkout"], }, - schema: checkoutSessionEventSchema, + outputSchemaRef, instructions: (data) => instructions("checkout session async payment succeeded"), examples: [checkoutCompletedSuccess], diff --git a/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts b/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts index 81b1b8c532c..8c96bc9f769 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/events/paymentIntent.ts @@ -1,14 +1,8 @@ -import { schemaFromRef } from "core/schemas/makeSchema"; -import { JSONSchema } from "core/schemas/types"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; -import { spec } from "integrations/stripe/schemas/spec"; import { checkoutCompletedSuccess } from "./checkoutSession.examples"; -import { instructions, wrapEventWithWebhookData } from "./utilities"; +import { instructions } from "./utilities"; -export const paymentIntentEventSchema: JSONSchema = wrapEventWithWebhookData( - "Payment intent", - schemaFromRef("#/components/schemas/payment_intent", spec) -); +const outputSchemaRef = "#/definitions/payment_intent"; export const paymentIntentSucceeded: WebhookEvent = { name: "payment_intent.succeeded", @@ -18,7 +12,7 @@ export const paymentIntentSucceeded: WebhookEvent = { "Occurs when a PaymentIntent has successfully completed payment.", tags: ["payment intent"], }, - schema: paymentIntentEventSchema, + outputSchemaRef, instructions: (data) => instructions("payment intent succeeded"), examples: [checkoutCompletedSuccess], key: "payment_intent.succeeded", diff --git a/apps/integrations/src/integrations/stripe/webhooks/specs.ts b/apps/integrations/src/integrations/stripe/webhooks/specs.ts index d6fafd0010b..2a8d09d4388 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/specs.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/specs.ts @@ -1,4 +1,3 @@ -import { createJSONPointer } from "core/common/pointer"; import { EndpointSpec } from "core/endpoint/types"; import { WebhookSpec } from "core/webhook/types"; diff --git a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts index dc200a1064f..1608b598db3 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/webhooks.ts @@ -28,7 +28,7 @@ const webhook = makeWebhook({ subscription: { type: "automatic", requiresSecret: true, - inputSchema: null, + inputSchemaRef: undefined, preSubscribe: (input) => { return { body: { diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index d2027885482..bf4193dee99 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -1,4 +1,3 @@ -import { createJSONPointer } from "core/common/pointer"; import { EndpointSpec } from "core/endpoint/types"; import { WebhookSpec } from "core/webhook/types"; diff --git a/apps/integrations/src/tools/schemas/openapi-3-to-3.1.ts b/apps/integrations/src/tools/schemas/openapi-3-to-3.1.ts new file mode 100644 index 00000000000..75741dca65e --- /dev/null +++ b/apps/integrations/src/tools/schemas/openapi-3-to-3.1.ts @@ -0,0 +1,30 @@ +import { Command } from "commander"; +import { transformNullables } from "core/schemas/transformNullables"; +import { promises as fs } from "node:fs"; + +const program = new Command(); + +program + .command("convert") + .description("Convert an OpenAPI 3 spec to 3.1") + .argument("", "The file path to the original spec file") + .action(async (original_file_path: string) => { + //get original file path minus the extension + const originalFilePathMinusExtension = original_file_path.replace( + ".json", + "" + ); + + try { + const originalFile = await fs.readFile(original_file_path, "utf8"); + const spec = JSON.parse(originalFile); + transformNullables(spec); + const newSpecFilePath = `${originalFilePathMinusExtension}_3.1.json`; + await fs.writeFile(newSpecFilePath, JSON.stringify(spec, null, 2)); + console.log(`New spec file created at ${newSpecFilePath}`); + } catch (e) { + console.error(e); + } + }); + +program.parseAsync(process.argv); diff --git a/apps/integrations/src/tools/schemas/typescript-to-json-schema.ts b/apps/integrations/src/tools/schemas/typescript-to-json-schema.ts index 6ee293f2e76..051991b44b2 100644 --- a/apps/integrations/src/tools/schemas/typescript-to-json-schema.ts +++ b/apps/integrations/src/tools/schemas/typescript-to-json-schema.ts @@ -2,7 +2,6 @@ import { Command } from "commander"; import { promises as fs } from "node:fs"; import * as tsj from "ts-json-schema-generator"; import $RefParser from "@apidevtools/json-schema-ref-parser"; -type JSONSchema7Definition = NonNullable[number]; const program = new Command(); diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 7f9f3a41130..0584b69fccc 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -1,13 +1,10 @@ -import { AutoReffer } from "core/schemas/autoReffer"; -import { makeAnyOf } from "core/schemas/makeSchema"; -import { JSONSchema } from "core/schemas/types"; +import { createJSONPointer } from "core/common/pointer"; +import { JSONSchema, SchemaRef } from "core/schemas/types"; import { Service } from "core/service/types"; import fs from "fs/promises"; -import { - combineSchemasAndHoistReferences, - generateInputOutputSchemas, -} from "generators/combineSchemas"; +import { createMinimalSchema } from "generators/combineSchemas"; import { getTypesFromSchema } from "generators/generateTypes"; +import pointer from "json-pointer"; import { parseSchema } from "json-schema-to-zod"; import path from "path"; import rimraf from "rimraf"; @@ -160,7 +157,10 @@ async function generateFunctionData(service: Service) { const title = TitleCaseWithSpaces(action.name); const name = action.name; const friendlyName = toFriendlyTypeName(name); - const schemas = generateInputOutputSchemas(action.spec, friendlyName); + const inputName = action.spec.input ? `${friendlyName}Input` : undefined; + const outputName = action.spec.output + ? `${friendlyName}Output` + : undefined; const functionCode = ` ${action.description ? `/** ${action.description} */` : ""} @@ -168,12 +168,12 @@ export async function ${action.name}( /** This key should be unique inside your workflow */ key: string, ${ - schemas.input + inputName ? `/** The params for this call */ - params: Prettify<${schemas.input.title}>` + params: Prettify<${inputName}>` : "" } -): Promise> { +): Promise> { const run = getTriggerRun(); if (!run) { @@ -184,7 +184,7 @@ export async function ${action.name}( version: "2", service: "${service.service}", endpoint: "${action.name}", - ${schemas.input ? "params," : "params: undefined,"} + ${inputName ? "params," : "params: undefined,"} }); return output; @@ -197,8 +197,8 @@ export async function ${action.name}( name, friendlyName, description: action.description, - input: schemas.input, - output: schemas.output, + inputRef: action.spec.input.body, + outputRef: action.spec.output.responses.find((r) => r.success)?.schema, functionCode, }; functions[name] = functionData; @@ -216,28 +216,32 @@ export async function ${action.name}( switch (webhook.subscription.type) { case "automatic": { const typeName = toTitleCase(event.name); - const inputSpec = webhook.subscription.inputSchema; - if (inputSpec) { - inputSpec.title = `${typeName}Input`; + let inputSpecTitle: undefined | string = undefined; + let inputRef: undefined | SchemaRef = undefined; + if (webhook.subscription.inputSchemaRef) { + inputRef = webhook.subscription.inputSchemaRef; + const ptr = createJSONPointer( + webhook.subscription.inputSchemaRef + ); + const inputSpec = pointer.get(service.schema, ptr); + if (inputSpec) { + inputSpecTitle = `${typeName}Input`; + } } - const outputSpec = event.schema; - outputSpec.title = `${typeName}Output`; + const title = event.metadata.title; const functionName = toCamelCase(`${typeName}Event`); const friendlyName = toFriendlyTypeName(functionName); - const zodReturnSchema = parseSchema(outputSpec as any); const zodSchemaName = `${functionName}Schema`; const functionCode = ` -const ${zodSchemaName} = ${zodReturnSchema} - ${event.metadata.description ? `/** ${event.metadata.description} */` : ""} function ${functionName}( ${ - inputSpec + inputSpecTitle ? `/** The params for this call */ - params: Prettify<${inputSpec.title}>` + params: Prettify<${inputSpecTitle}>` : "" } ): TriggerEvent { @@ -251,7 +255,7 @@ function ${functionName}( service: ["${service.service}"], event: ["${event.name}"], }, - source: ${inputSpec ? "params" : "undefined"}, + source: ${inputSpecTitle ? "params" : "undefined"}, }, schema: ${zodSchemaName}, }; @@ -264,8 +268,8 @@ function ${functionName}( name: functionName, friendlyName, description: event.metadata.description, - input: inputSpec ?? undefined, - output: outputSpec, + inputRef, + outputRef: event.outputSchemaRef, functionCode, }; functions[functionName] = functionData; @@ -288,51 +292,95 @@ async function createFunctionsAndTypesFiles( service: Service, functionsData: Record ) { - const typeSchemas = Object.values(functionsData) - .flatMap((f) => [f.input, f.output]) - .filter(Boolean) as JSONSchema[]; + const combinedSchema: JSONSchema = { + title: `${toFriendlyTypeName(service.service)}Types`, + allOf: Object.entries(functionsData).flatMap(([name, data]) => { + const schemas: JSONSchema[] = []; + + if (data.inputRef) { + schemas.push({ + title: `${data.friendlyName}Input`, + $ref: data.inputRef, + }); + } - const combinedSchema: JSONSchema = combineSchemasAndHoistReferences( - `${toFriendlyTypeName(service.service)}Types`, - typeSchemas - ); + if (data.outputRef) { + schemas.push({ + title: `${data.friendlyName}Output`, + $ref: data.outputRef, + }); + } + + return schemas; + }), + definitions: service.schema.definitions, + }; - const reffer = new AutoReffer(combinedSchema, { - refIfMoreThan: 4, + const importNames = Object.entries(functionsData).flatMap(([name, data]) => { + const imports: string[] = []; + if (data.inputRef) { + imports.push(`${data.friendlyName}Input`); + } + if (data.outputRef) { + imports.push(`${data.friendlyName}Output`); + } + return imports; }); - const optimizedSchema = reffer.optimize(); - //uncomment to write intermediate optimized schema to disk + //uncomment to write intermediate schema to disk await fs.mkdir(basePath, { recursive: true }); await fs.writeFile( `${basePath}/schema-optimized.json`, - JSON.stringify(optimizedSchema, null, 2) + JSON.stringify(combinedSchema, null, 2) ); - let allTypes = await getTypesFromSchema( - optimizedSchema, + let typesFileText = `import { z } from "zod";\n`; + + const allTypes = await getTypesFromSchema( + combinedSchema, `${service.service}Types` ); - allTypes += `\nexport type Prettify = { + typesFileText += allTypes; + + typesFileText += `\nexport type Prettify = { [K in keyof T]: T[K]; } & {};`; + //events used Zod schemas + const zodPromises = Object.entries(functionsData) + .filter(([name, data]) => data.type === "event" && data.outputRef) + .map(async ([name, data]) => { + if (!data.outputRef) throw new Error("No output ref"); + const minimalSchema = createMinimalSchema( + data.outputRef, + service.schema.definitions + ); + minimalSchema.title = `${data.friendlyName}Output`; + const schemaText = parseSchema(minimalSchema); + const schemaName = `${data.name}Schema`; + const code = `export const ${schemaName} = ${schemaText}`; + return { name: schemaName, code }; + }); + const zodSchemas = await Promise.all(zodPromises); + typesFileText += `\n${zodSchemas.map((z) => z.code).join("\n")}`; + const typesFile = project.createSourceFile( `${basePath}/src/types.ts`, - allTypes, + typesFileText, { overwrite: true, } ); typesFile.formatText(); + //import the sdk, zod, the types and schemas const imports = `import { getTriggerRun } from "@trigger.dev/sdk"; import type { TriggerEvent } from "@trigger.dev/sdk"; import { z } from "zod"; - import { ${typeSchemas - .map((t) => t && t.title) - .join(", ")}, Prettify } from "./types";`; + import { ${importNames.join(", ")}, Prettify ${ + zodSchemas.length > 0 ? `, ${zodSchemas.map((z) => z.name).join(", ")}` : "" + } } from "./types";`; const functions = `${Object.values(functionsData) .map((f) => f.functionCode) diff --git a/apps/integrations/src/trigger/sdk/types.ts b/apps/integrations/src/trigger/sdk/types.ts index 7866cef32fb..4fbde9acce9 100644 --- a/apps/integrations/src/trigger/sdk/types.ts +++ b/apps/integrations/src/trigger/sdk/types.ts @@ -1,4 +1,4 @@ -import { JSONSchema } from "core/schemas/types"; +import { SchemaRef } from "core/schemas/types"; export type FunctionData = { type: "action" | "event"; @@ -6,7 +6,7 @@ export type FunctionData = { name: string; friendlyName: string; description: string; - input?: JSONSchema; - output?: JSONSchema; + inputRef?: SchemaRef; + outputRef?: SchemaRef; functionCode: string; }; diff --git a/generated-integrations/stripe/docs/checkout-session-async-payment-failed-event.mdx b/generated-integrations/stripe/docs/checkout-session-async-payment-failed-event.mdx new file mode 100644 index 00000000000..1d233e066ae --- /dev/null +++ b/generated-integrations/stripe/docs/checkout-session-async-payment-failed-event.mdx @@ -0,0 +1,12 @@ +--- +title: Checkout session payment failed +sidebarTitle: Checkout session payment failed +description: Occurs when a payment intent using a delayed payment method fails. +--- + +## Params + + + A unique string. Please see the [Keys and Resumability](/guides/resumability) + doc for more info. + \ No newline at end of file diff --git a/generated-integrations/stripe/docs/checkout-session-async-payment-succeeded-event.mdx b/generated-integrations/stripe/docs/checkout-session-async-payment-succeeded-event.mdx new file mode 100644 index 00000000000..aa1102a1da4 --- /dev/null +++ b/generated-integrations/stripe/docs/checkout-session-async-payment-succeeded-event.mdx @@ -0,0 +1,12 @@ +--- +title: Checkout session async payment succeeded +sidebarTitle: Checkout session async payment succeeded +description: Occurs when a payment intent using a delayed payment method finally succeeds. +--- + +## Params + + + A unique string. Please see the [Keys and Resumability](/guides/resumability) + doc for more info. + \ No newline at end of file diff --git a/generated-integrations/stripe/docs/checkout-session-expired-event.mdx b/generated-integrations/stripe/docs/checkout-session-expired-event.mdx new file mode 100644 index 00000000000..de35a34b516 --- /dev/null +++ b/generated-integrations/stripe/docs/checkout-session-expired-event.mdx @@ -0,0 +1,12 @@ +--- +title: Checkout session expired +sidebarTitle: Checkout session expired +description: A checkout session expired +--- + +## Params + + + A unique string. Please see the [Keys and Resumability](/guides/resumability) + doc for more info. + \ No newline at end of file diff --git a/generated-integrations/stripe/docs/payment-intent-succeeded-event.mdx b/generated-integrations/stripe/docs/payment-intent-succeeded-event.mdx new file mode 100644 index 00000000000..36363114376 --- /dev/null +++ b/generated-integrations/stripe/docs/payment-intent-succeeded-event.mdx @@ -0,0 +1,12 @@ +--- +title: Payment intent succeeded +sidebarTitle: Payment intent succeeded +description: Occurs when a PaymentIntent has successfully completed payment. +--- + +## Params + + + A unique string. Please see the [Keys and Resumability](/guides/resumability) + doc for more info. + \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef39a323a82..c708f4eb092 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,6 +46,7 @@ importers: '@types/eslint': ^8.4.6 '@types/express': ^4.17.13 '@types/json-pointer': ^1.0.31 + '@types/json-schema': ^7.0.11 '@types/morgan': ^1.9.3 '@types/node': ^18.13.0 '@types/qs': ^6.9.7 @@ -65,6 +66,7 @@ importers: express-async-errors: ^3.1.1 graphile-worker: ^0.13.0 json-pointer: ^0.6.2 + json-schema: ^0.4.0 json-schema-deref-sync: ^0.14.0 json-schema-to-typescript: ^11.0.3 json-schema-to-zod: ^0.6.3 @@ -99,6 +101,7 @@ importers: express-async-errors: 3.1.1_express@4.18.2 graphile-worker: 0.13.0 json-pointer: 0.6.2 + json-schema: 0.4.0 json-schema-deref-sync: 0.14.0 json-schema-to-typescript: 11.0.4 loglevel: 1.8.1 @@ -114,6 +117,7 @@ importers: '@types/eslint': 8.4.10 '@types/express': 4.17.15 '@types/json-pointer': 1.0.31 + '@types/json-schema': 7.0.11 '@types/morgan': 1.9.4 '@types/node': 18.14.0 '@types/qs': 6.9.7 @@ -13010,7 +13014,6 @@ packages: /json-schema/0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - dev: true /json-stable-stringify-without-jsonify/1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} From 62ff1107d6ef8833f7512b6026383a02f112a3de Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 11:17:39 +0000 Subject: [PATCH 106/113] Improved the code generation --- apps/integrations/src/core/common/pointer.ts | 2 +- apps/integrations/src/trigger/sdk/generateService.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/integrations/src/core/common/pointer.ts b/apps/integrations/src/core/common/pointer.ts index 4b0b54ff4cf..fd5617362df 100644 --- a/apps/integrations/src/core/common/pointer.ts +++ b/apps/integrations/src/core/common/pointer.ts @@ -1,5 +1,5 @@ export type JSONPointer = string; export function createJSONPointer(path: string): JSONPointer { - return path.replace(/\//g, "~1").replace(/~/g, "~0").replace(/#/g, ""); + return path.replace(/\/\//g, "/~1").replace(/~/g, "~0").replace(/#/g, ""); } diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index 0584b69fccc..a773e6a4f2b 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -216,6 +216,10 @@ export async function ${action.name}( switch (webhook.subscription.type) { case "automatic": { const typeName = toTitleCase(event.name); + const title = event.metadata.title; + const functionName = toCamelCase(`${typeName}Event`); + const friendlyName = toFriendlyTypeName(functionName); + let inputSpecTitle: undefined | string = undefined; let inputRef: undefined | SchemaRef = undefined; if (webhook.subscription.inputSchemaRef) { @@ -225,14 +229,10 @@ export async function ${action.name}( ); const inputSpec = pointer.get(service.schema, ptr); if (inputSpec) { - inputSpecTitle = `${typeName}Input`; + inputSpecTitle = `${friendlyName}Input`; } } - const title = event.metadata.title; - const functionName = toCamelCase(`${typeName}Event`); - const friendlyName = toFriendlyTypeName(functionName); - const zodSchemaName = `${functionName}Schema`; const functionCode = ` From d1194511be3be6e226fea8a763b777460cf00911 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 11:17:46 +0000 Subject: [PATCH 107/113] Removed old schema code --- .../src/generators/combineSchemas.ts | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/apps/integrations/src/generators/combineSchemas.ts b/apps/integrations/src/generators/combineSchemas.ts index b503b15b70b..a6df2de41db 100644 --- a/apps/integrations/src/generators/combineSchemas.ts +++ b/apps/integrations/src/generators/combineSchemas.ts @@ -1,8 +1,6 @@ -import { makeAnyOf } from "core/schemas/makeSchema"; import { SchemaRefWalker } from "core/schemas/schemaRefWalker"; import { JSONSchema, SchemaRef } from "core/schemas/types"; import pointer from "json-pointer"; -import nodeObjectHash from "node-object-hash"; /** Creates the smallest schema with only the used references */ export function createMinimalSchema( @@ -28,47 +26,3 @@ export function createMinimalSchema( return schema; } - -const hasher = nodeObjectHash({ sort: true }); - -export function combineSchemasAndHoistReferences( - name: string, - schemas: JSONSchema[] -): JSONSchema { - const definitions = new Map(); - - schemas.forEach((s) => { - const walker = new SchemaRefWalker(s); - walker.run(s, ({ definition, ref, setRef }) => { - const existing = definitions.get(ref); - if (existing) { - if (existing && hasher.hash(existing) !== hasher.hash(definition)) { - console.log( - "duplicate definition with different hash, inventing a new name" - ); - for (let index = 0; index < 50; index++) { - const newName = `${ref}${index}`; - if (!definitions.has(newName)) { - definitions.set(newName, definition); - setRef(newName); - break; - } - } - } else { - definitions.set(ref, definition); - } - } else { - definitions.set(ref, definition); - } - }); - }); - - const combinedSchema = makeAnyOf(name, schemas); - - //add all of the definitions, using their paths - definitions.forEach((definition, ref) => { - pointer.set(combinedSchema, ref.replace("#", ""), definition); - }); - - return combinedSchema; -} From 9584876b1deb7ff8d366786aa4ee0e41a492e2f9 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 11:18:12 +0000 Subject: [PATCH 108/113] Updated the Typeform integration with refs --- .../src/integrations/typeform/index.ts | 2 + .../src/integrations/typeform/schemas/spec.ts | 70 +++++++++++++++++++ .../integrations/typeform/webhooks/specs.ts | 61 ++-------------- .../typeform/webhooks/webhooks.ts | 12 +--- 4 files changed, 80 insertions(+), 65 deletions(-) create mode 100644 apps/integrations/src/integrations/typeform/schemas/spec.ts diff --git a/apps/integrations/src/integrations/typeform/index.ts b/apps/integrations/src/integrations/typeform/index.ts index 1659d52f5c4..2d023e0d7e9 100644 --- a/apps/integrations/src/integrations/typeform/index.ts +++ b/apps/integrations/src/integrations/typeform/index.ts @@ -1,5 +1,6 @@ import { Service } from "core/service/types"; import { authentication } from "./authentication"; +import { spec } from "./schemas/spec"; import { webhooks } from "./webhooks/webhooks"; export const typeform: Service = { @@ -11,4 +12,5 @@ export const typeform: Service = { authentication, webhooks, retryableStatusCodes: [408, 429, 500, 502, 503, 504], + schema: spec, }; diff --git a/apps/integrations/src/integrations/typeform/schemas/spec.ts b/apps/integrations/src/integrations/typeform/schemas/spec.ts new file mode 100644 index 00000000000..dc862940e8e --- /dev/null +++ b/apps/integrations/src/integrations/typeform/schemas/spec.ts @@ -0,0 +1,70 @@ +import { makeObjectSchema, makeStringSchema } from "core/schemas/makeSchema"; +import { IntegrationSchema } from "core/schemas/types"; +import { formEventSchema } from "../webhooks/schemas"; + +export const spec: IntegrationSchema = { + definitions: { + form_id: { + type: "string", + }, + tag: { + type: "string", + }, + create_endpoint_request_body: { + type: "object", + properties: { + enabled: { + type: "boolean", + }, + secret: { + type: "string", + }, + url: { + type: "string", + }, + verify_ssl: { + type: "boolean", + }, + }, + }, + create_endpoint_response_body_success: { + type: "object", + properties: { + created_at: { + type: "string", + }, + enabled: { + type: "boolean", + }, + form_id: { + type: "string", + }, + id: { + type: "string", + }, + tag: { + type: "string", + }, + updated_at: { + type: "string", + }, + url: { + type: "string", + }, + verify_ssl: { + type: "boolean", + }, + }, + }, + error_response_body: { + type: "object", + additionalProperties: true, + }, + webhook_subscription_input: makeObjectSchema("Input", { + requiredProperties: { + form_id: makeStringSchema("Form ID"), + }, + }), + form_event: formEventSchema, + }, +}; diff --git a/apps/integrations/src/integrations/typeform/webhooks/specs.ts b/apps/integrations/src/integrations/typeform/webhooks/specs.ts index bf4193dee99..55c5ceff651 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/specs.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/specs.ts @@ -20,18 +20,14 @@ const createEndpoint: EndpointSpec = { name: "form_id", description: "The form ID", required: true, - schema: { - type: "string", - }, + schema: "#/definitions/form_id", in: "path", }, { name: "tag", description: "The webhook tag", required: true, - schema: { - type: "string", - }, + schema: "#/definitions/tag", in: "path", }, ], @@ -40,23 +36,7 @@ const createEndpoint: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: { - type: "object", - properties: { - enabled: { - type: "boolean", - }, - secret: { - type: "string", - }, - url: { - type: "string", - }, - verify_ssl: { - type: "boolean", - }, - }, - }, + schema: "#/definitions/create_endpoint_request_body", }, }, responses: [ @@ -64,44 +44,13 @@ const createEndpoint: EndpointSpec = { success: true, name: "Success", matches: ({ statusCode }) => statusCode >= 200 && statusCode < 300, - schema: { - type: "object", - properties: { - created_at: { - type: "string", - }, - enabled: { - type: "boolean", - }, - form_id: { - type: "string", - }, - id: { - type: "string", - }, - tag: { - type: "string", - }, - updated_at: { - type: "string", - }, - url: { - type: "string", - }, - verify_ssl: { - type: "boolean", - }, - }, - }, + schema: "#/definitions/create_endpoint_response_body_success", }, { success: false, name: "Error", matches: ({ statusCode }) => statusCode < 200 || statusCode >= 300, - schema: { - type: "object", - additionalProperties: true, - }, + schema: "#/definitions/error_response_body", }, ], }; diff --git a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts index e5b37308d75..56c996cc3bf 100644 --- a/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts +++ b/apps/integrations/src/integrations/typeform/webhooks/webhooks.ts @@ -1,11 +1,9 @@ import { makeWebhook } from "core/webhook"; import { WebhookEvent, WebhookReceiveRequest } from "core/webhook/types"; +import crypto from "node:crypto"; import { authentication } from "../authentication"; import { example } from "./examples"; -import { formEventSchema } from "./schemas"; import { formResponse } from "./specs"; -import crypto from "node:crypto"; -import { makeObjectSchema, makeStringSchema } from "core/schemas/makeSchema"; const baseUrl = "https://api.typeform.com"; @@ -16,7 +14,7 @@ export const formResponseEvent: WebhookEvent = { description: "A form response was submitted", tags: ["form"], }, - schema: formEventSchema, + outputSchemaRef: "#/definitions/form_event", instructions: (data) => `Fill in your Typeform (${data.form_id}) as a real user would`, examples: [example], @@ -52,11 +50,7 @@ const webhook = makeWebhook({ subscription: { type: "automatic", requiresSecret: true, - inputSchema: makeObjectSchema("Input", { - requiredProperties: { - form_id: makeStringSchema("Form ID"), - }, - }), + inputSchemaRef: "#/definitions/webhook_subscription_input", preSubscribe: (input) => { return { parameters: { From fe790aa270d3b4f66c48999b91735bd37d4fadfe Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 11:26:26 +0000 Subject: [PATCH 109/113] Stripe webhook endpoint specs --- .../src/integrations/stripe/schemas/spec.json | 479 +++++++++++++++++ .../src/integrations/stripe/webhooks/specs.ts | 498 +----------------- 2 files changed, 482 insertions(+), 495 deletions(-) diff --git a/apps/integrations/src/integrations/stripe/schemas/spec.json b/apps/integrations/src/integrations/stripe/schemas/spec.json index f9747686a50..190e433e9ee 100644 --- a/apps/integrations/src/integrations/stripe/schemas/spec.json +++ b/apps/integrations/src/integrations/stripe/schemas/spec.json @@ -35844,6 +35844,485 @@ "type": "object", "x-expandableFields": [], "x-resourceId": "webhook_endpoint" + }, + "create_webhook_endpoint_request_body": { + "additionalProperties": false, + "properties": { + "api_version": { + "description": "Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.", + "enum": [ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "connect": { + "description": "Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.", + "type": "boolean" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "type": "string" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", + "items": { + "enum": [ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "invoiceitem.updated", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "order.created", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "sku.created", + "sku.deleted", + "sku.updated", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created" + ], + "type": "string", + "x-stripeBypassValidation": true + }, + "type": "array" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "enum": [""], + "type": "string" + } + ], + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." + }, + "url": { + "description": "The URL of the webhook endpoint.", + "type": "string" + } + }, + "required": ["enabled_events", "url"], + "type": "object" + }, + "create_webhook_endpoint_response_body_success": { + "type": "object", + "description": "You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).", + "properties": { + "api_version": { + "description": "The API version events are rendered as for this webhook endpoint.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "application": { + "description": "The ID of the associated Connect application.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "description": { + "description": "An optional description of what the webhook is used for.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "enabled_events": { + "description": "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": ["webhook_endpoint"], + "type": "string" + }, + "secret": { + "description": "The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.", + "maxLength": 5000, + "type": "string" + }, + "status": { + "description": "The status of the webhook. It can be `enabled` or `disabled`.", + "maxLength": 5000, + "type": "string" + }, + "url": { + "description": "The URL of the webhook endpoint.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "created", + "enabled_events", + "id", + "livemode", + "metadata", + "object", + "status", + "url" + ], + "title": "NotificationWebhookEndpoint", + "x-expandableFields": [], + "x-resourceId": "webhook_endpoint" + }, + "error_response_body": { + "type": "object", + "description": "An error response from the Stripe API", + "properties": { + "error": { + "type": "object", + "additionalProperties": true + } + }, + "required": ["error"] } } } diff --git a/apps/integrations/src/integrations/stripe/webhooks/specs.ts b/apps/integrations/src/integrations/stripe/webhooks/specs.ts index 2a8d09d4388..8efae8e2941 100644 --- a/apps/integrations/src/integrations/stripe/webhooks/specs.ts +++ b/apps/integrations/src/integrations/stripe/webhooks/specs.ts @@ -37,393 +37,7 @@ const createEndpoint: EndpointSpec = { }, }, }, - schema: { - additionalProperties: false, - properties: { - api_version: { - description: - "Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.", - enum: [ - "2011-01-01", - "2011-06-21", - "2011-06-28", - "2011-08-01", - "2011-09-15", - "2011-11-17", - "2012-02-23", - "2012-03-25", - "2012-06-18", - "2012-06-28", - "2012-07-09", - "2012-09-24", - "2012-10-26", - "2012-11-07", - "2013-02-11", - "2013-02-13", - "2013-07-05", - "2013-08-12", - "2013-08-13", - "2013-10-29", - "2013-12-03", - "2014-01-31", - "2014-03-13", - "2014-03-28", - "2014-05-19", - "2014-06-13", - "2014-06-17", - "2014-07-22", - "2014-07-26", - "2014-08-04", - "2014-08-20", - "2014-09-08", - "2014-10-07", - "2014-11-05", - "2014-11-20", - "2014-12-08", - "2014-12-17", - "2014-12-22", - "2015-01-11", - "2015-01-26", - "2015-02-10", - "2015-02-16", - "2015-02-18", - "2015-03-24", - "2015-04-07", - "2015-06-15", - "2015-07-07", - "2015-07-13", - "2015-07-28", - "2015-08-07", - "2015-08-19", - "2015-09-03", - "2015-09-08", - "2015-09-23", - "2015-10-01", - "2015-10-12", - "2015-10-16", - "2016-02-03", - "2016-02-19", - "2016-02-22", - "2016-02-23", - "2016-02-29", - "2016-03-07", - "2016-06-15", - "2016-07-06", - "2016-10-19", - "2017-01-27", - "2017-02-14", - "2017-04-06", - "2017-05-25", - "2017-06-05", - "2017-08-15", - "2017-12-14", - "2018-01-23", - "2018-02-05", - "2018-02-06", - "2018-02-28", - "2018-05-21", - "2018-07-27", - "2018-08-23", - "2018-09-06", - "2018-09-24", - "2018-10-31", - "2018-11-08", - "2019-02-11", - "2019-02-19", - "2019-03-14", - "2019-05-16", - "2019-08-14", - "2019-09-09", - "2019-10-08", - "2019-10-17", - "2019-11-05", - "2019-12-03", - "2020-03-02", - "2020-08-27", - "2022-08-01", - "2022-11-15", - ], - maxLength: 5000, - type: "string", - "x-stripeBypassValidation": true, - }, - connect: { - description: - "Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.", - type: "boolean", - }, - description: { - description: - "An optional description of what the webhook is used for.", - maxLength: 5000, - type: "string", - }, - enabled_events: { - description: - "The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.", - items: { - enum: [ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.created", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "file.created", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.paid", - "invoice.payment_action_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoiceitem.created", - "invoiceitem.deleted", - "invoiceitem.updated", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_transaction.created", - "issuing_transaction.updated", - "mandate.updated", - "order.created", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accepted", - "quote.canceled", - "quote.created", - "quote.finalized", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "refund.created", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "sku.created", - "sku.deleted", - "sku.updated", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - ], - type: "string", - "x-stripeBypassValidation": true, - }, - type: "array", - }, - expand: { - description: - "Specifies which fields in the response should be expanded.", - items: { - maxLength: 5000, - type: "string", - }, - type: "array", - }, - metadata: { - anyOf: [ - { - additionalProperties: { - type: "string", - }, - type: "object", - }, - { - enum: [""], - type: "string", - }, - ], - description: - "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", - }, - url: { - description: "The URL of the webhook endpoint.", - type: "string", - }, - }, - required: ["enabled_events", "url"], - type: "object", - }, + schema: "#/definitions/create_webhook_endpoint_request_body", }, }, responses: [ @@ -431,119 +45,13 @@ const createEndpoint: EndpointSpec = { success: true, name: "Success", matches: ({ statusCode }) => statusCode >= 200 && statusCode < 300, - schema: { - type: "object", - description: - "You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).", - properties: { - api_version: { - description: - "The API version events are rendered as for this webhook endpoint.", - maxLength: 5000, - nullable: true, - type: "string", - }, - application: { - description: "The ID of the associated Connect application.", - maxLength: 5000, - nullable: true, - type: "string", - }, - created: { - description: - "Time at which the object was created. Measured in seconds since the Unix epoch.", - format: "unix-time", - type: "integer", - }, - description: { - description: - "An optional description of what the webhook is used for.", - maxLength: 5000, - nullable: true, - type: "string", - }, - enabled_events: { - description: - "The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.", - items: { - maxLength: 5000, - type: "string", - }, - type: "array", - }, - id: { - description: "Unique identifier for the object.", - maxLength: 5000, - type: "string", - }, - livemode: { - description: - "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", - type: "boolean", - }, - metadata: { - additionalProperties: { - maxLength: 500, - type: "string", - }, - description: - "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", - type: "object", - }, - object: { - description: - "String representing the object's type. Objects of the same type share the same value.", - enum: ["webhook_endpoint"], - type: "string", - }, - secret: { - description: - "The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.", - maxLength: 5000, - type: "string", - }, - status: { - description: - "The status of the webhook. It can be `enabled` or `disabled`.", - maxLength: 5000, - type: "string", - }, - url: { - description: "The URL of the webhook endpoint.", - maxLength: 5000, - type: "string", - }, - }, - required: [ - "created", - "enabled_events", - "id", - "livemode", - "metadata", - "object", - "status", - "url", - ], - title: "NotificationWebhookEndpoint", - "x-expandableFields": [], - "x-resourceId": "webhook_endpoint", - }, + schema: "#/definitions/create_webhook_endpoint_response_body_success", }, { success: false, name: "Error", matches: ({ statusCode }) => statusCode < 200 || statusCode >= 300, - schema: { - type: "object", - description: "An error response from the Stripe API", - properties: { - error: { - type: "object", - additionalProperties: true, - }, - }, - required: ["error"], - }, + schema: "#/definitions/error_response_body", }, ], }; From ba4b4fa45be18f2d2526f3a8c3f656d16acca364 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 11:27:11 +0000 Subject: [PATCH 110/113] =?UTF-8?q?Don=E2=80=99t=20generate=20a=20schema?= =?UTF-8?q?=20json=20file=20when=20creating=20the=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/integrations/src/trigger/sdk/generateService.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index a773e6a4f2b..c5c3e75ee62 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -328,11 +328,11 @@ async function createFunctionsAndTypesFiles( }); //uncomment to write intermediate schema to disk - await fs.mkdir(basePath, { recursive: true }); - await fs.writeFile( - `${basePath}/schema-optimized.json`, - JSON.stringify(combinedSchema, null, 2) - ); + // await fs.mkdir(basePath, { recursive: true }); + // await fs.writeFile( + // `${basePath}/schema-optimized.json`, + // JSON.stringify(combinedSchema, null, 2) + // ); let typesFileText = `import { z } from "zod";\n`; From 746e7680050176b2268f8f3684a7f68f66ae5063 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 16:50:18 +0000 Subject: [PATCH 111/113] =?UTF-8?q?If=20there=E2=80=99s=20no=20input=20or?= =?UTF-8?q?=20output=20then=20don=E2=80=99t=20include=20that=20in=20the=20?= =?UTF-8?q?generated=20SDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/integrations/src/trigger/sdk/generateService.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/integrations/src/trigger/sdk/generateService.ts b/apps/integrations/src/trigger/sdk/generateService.ts index c5c3e75ee62..2ec2ae1e4b5 100644 --- a/apps/integrations/src/trigger/sdk/generateService.ts +++ b/apps/integrations/src/trigger/sdk/generateService.ts @@ -157,10 +157,14 @@ async function generateFunctionData(service: Service) { const title = TitleCaseWithSpaces(action.name); const name = action.name; const friendlyName = toFriendlyTypeName(name); - const inputName = action.spec.input ? `${friendlyName}Input` : undefined; - const outputName = action.spec.output - ? `${friendlyName}Output` - : undefined; + const hasInput = + action.spec.input.body !== undefined || + action.spec.input.parameters !== undefined; + const inputName = hasInput ? `${friendlyName}Input` : undefined; + const hasOutput = + action.spec.output.responses.find((r) => r.success)?.schema !== + undefined; + const outputName = hasOutput ? `${friendlyName}Output` : undefined; const functionCode = ` ${action.description ? `/** ${action.description} */` : ""} From e7b9fffa6edf027b160869b0e556e4622dcd38cc Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 14 Mar 2023 16:52:34 +0000 Subject: [PATCH 112/113] SendGrid schemas --- .../integrations/sendgrid/common/schemas.ts | 767 ++++++++++++++---- .../integrations/sendgrid/endpoints/specs.ts | 453 +---------- .../src/integrations/sendgrid/index.ts | 2 + 3 files changed, 605 insertions(+), 617 deletions(-) diff --git a/apps/integrations/src/integrations/sendgrid/common/schemas.ts b/apps/integrations/src/integrations/sendgrid/common/schemas.ts index b0d0f2e0a25..198d17efae7 100644 --- a/apps/integrations/src/integrations/sendgrid/common/schemas.ts +++ b/apps/integrations/src/integrations/sendgrid/common/schemas.ts @@ -3,189 +3,618 @@ import { makeObjectSchema, makeStringSchema, } from "core/schemas/makeSchema"; -import { JSONSchema } from "core/schemas/types"; +import { IntegrationSchema } from "core/schemas/types"; -export const ErrorSchema = makeObjectSchema("Error", { - requiredProperties: { - errors: makeArraySchema( - "Errors", - makeObjectSchema("Error", { - requiredProperties: { - message: makeStringSchema("Message"), - }, - optionalProperties: { - field: makeStringSchema("Field"), - help: makeStringSchema("Help"), - error_id: makeStringSchema("Error ID"), - parameter: makeStringSchema("Parameter"), - }, - }) - ), - }, -}); - -export const fromEmailObjectSchema: JSONSchema = { - title: "From Email Object", - type: "object", - properties: { - email: { - type: "string", - format: "email", - description: - "The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account.", - }, - name: { - type: "string", - description: "A name or title associated with the sending email address.", - }, - }, - required: ["email"], - example: { - email: "jane_doe@example.com", - name: "Jane Doe", - }, -}; - -export const ToEmailArraySchema: JSONSchema = { - title: "To Email Array", - type: "array", - items: { - type: "object", - properties: { - email: { - type: "string", - format: "email", - description: "The intended recipient's email address.", - }, - name: { - type: "string", - description: "The intended recipient's name.", +export const spec: IntegrationSchema = { + definitions: { + mail_send_request_body: { + type: "object", + properties: { + personalizations: { + type: "array", + description: + "An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.", + uniqueItems: false, + maxItems: 1000, + items: { + type: "object", + properties: { + from: { + $ref: "#/definitions/from_email_object_schema", + }, + to: { + $ref: "#/definitions/to_email_array", + }, + cc: { + type: "array", + description: + "An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.", + maxItems: 1000, + items: { + $ref: "#/definitions/cc_bcc_email_object", + }, + }, + bcc: { + type: "array", + description: + "An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.", + maxItems: 1000, + items: { + $ref: "#/definitions/cc_bcc_email_object", + }, + }, + subject: { + type: "string", + description: + "The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).", + minLength: 1, + }, + headers: { + type: "object", + description: + "A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`", + }, + substitutions: { + type: "object", + description: + 'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `template_id` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitution_tag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.', + maxProperties: 10000, + }, + dynamic_template_data: { + type: "object", + description: + 'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `template_id` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".', + }, + custom_args: { + type: "object", + description: + "Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.", + maxProperties: 10000, + }, + send_at: { + type: "integer", + description: + "A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden.", + }, + }, + required: ["to"], + }, + }, + from: { + $ref: "#/definitions/from_email_object_schema", + }, + reply_to: { + $ref: "#/definitions/reply_to_email_object", + }, + reply_to_list: { + type: "array", + description: + "An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use “reply_to” field or “reply_to_list” but not both.", + uniqueItems: true, + maxItems: 1000, + items: { + type: "object", + properties: { + email: { + type: "string", + description: + "The email address where any replies or bounces will be returned.", + format: "email", + }, + name: { + type: "string", + description: + "A name or title associated with the `reply_to_list` email address.", + }, + }, + required: ["email"], + }, + }, + subject: { + type: "string", + description: + "The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.", + minLength: 1, + }, + content: { + type: "array", + description: + "An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.", + items: { + type: "object", + properties: { + type: { + type: "string", + description: + "The MIME type of the content you are including in your email (e.g., `“text/plain”` or `“text/html”`).", + minLength: 1, + }, + value: { + type: "string", + description: + "The actual content of the specified MIME type that you are including in your email.", + minLength: 1, + }, + }, + required: ["type", "value"], + }, + }, + attachments: { + type: "array", + description: + "An array of objects where you can specify any attachments you want to include.", + items: { + type: "object", + properties: { + content: { + type: "string", + description: "The Base64 encoded content of the attachment.", + minLength: 1, + }, + type: { + type: "string", + description: + "The MIME type of the content you are attaching (e.g., `“text/plain”` or `“text/html”`).", + minLength: 1, + }, + filename: { + type: "string", + description: "The attachment's filename.", + }, + disposition: { + type: "string", + default: "attachment", + description: + "The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `“inline”` results in the attached file are displayed automatically within the message while `“attachment”` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.", + enum: ["inline", "attachment"], + }, + content_id: { + type: "string", + description: + "The attachment's content ID. This is used when the disposition is set to `“inline”` and the attachment is an image, allowing the file to be displayed within the body of your email.", + }, + }, + required: ["content", "filename"], + }, + }, + template_id: { + type: "string", + description: + "An email template ID. A template that contains a subject and content — either text or html — will override any subject and content values specified at the personalizations or message level.", + }, + headers: { + description: + "An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.", + type: "object", + }, + categories: { + type: "array", + description: + "An array of category names for this message. Each category name may not exceed 255 characters. ", + uniqueItems: true, + maxItems: 10, + items: { + type: "string", + maxLength: 255, + }, + }, + custom_args: { + description: + "Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes.", + type: "string", + }, + send_at: { + type: "integer", + description: + "A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `send_at` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times — for example, scheduling at 10:53 — can result in lower deferral rates due to the reduced traffic during off-peak times.", + }, + batch_id: { + type: "string", + description: + "An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/).", + }, + asm: { + type: "object", + description: + "An object allowing you to specify how to handle unsubscribes.", + properties: { + group_id: { + type: "integer", + description: + "The unsubscribe group to associate with this email.", + }, + groups_to_display: { + type: "array", + description: + "An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.", + maxItems: 25, + items: { + type: "integer", + }, + }, + }, + required: ["group_id"], + }, + ip_pool_name: { + type: "string", + description: + "The IP Pool that you would like to send this email from.", + minLength: 2, + maxLength: 64, + }, + mail_settings: { + type: "object", + description: + "A collection of different mail settings that you can use to specify how you would like this email to be handled.", + properties: { + bypass_list_management: { + type: "object", + description: + "Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + }, + }, + bypass_spam_management: { + type: "object", + description: + "Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + }, + }, + bypass_bounce_management: { + type: "object", + description: + "Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + }, + }, + bypass_unsubscribe_management: { + type: "object", + description: + "Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + }, + }, + footer: { + type: "object", + description: + "The default footer that you would like included on every email.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + text: { + type: "string", + description: "The plain text content of your footer.", + }, + html: { + type: "string", + description: "The HTML content of your footer.", + }, + }, + }, + sandbox_mode: { + type: "object", + description: + "Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + }, + }, + }, + }, + tracking_settings: { + type: "object", + description: + "Settings to determine how you would like to track the metrics of how your recipients interact with your email.", + properties: { + click_tracking: { + type: "object", + description: + "Allows you to track if a recipient clicked a link in your email.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + enable_text: { + type: "boolean", + description: + "Indicates if this setting should be included in the `text/plain` portion of your email.", + }, + }, + }, + open_tracking: { + type: "object", + description: + "Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + substitution_tag: { + type: "string", + description: + "Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel.", + }, + }, + }, + subscription_tracking: { + type: "object", + description: + "Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitution_tag`.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + text: { + type: "string", + description: + "Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>", + }, + html: { + type: "string", + description: + "HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>", + }, + substitution_tag: { + type: "string", + description: + "A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag’s location with no additional formatting.", + }, + }, + }, + ganalytics: { + type: "object", + description: + "Allows you to enable tracking provided by Google Analytics.", + properties: { + enable: { + type: "boolean", + description: "Indicates if this setting is enabled.", + }, + utm_source: { + type: "string", + description: + "Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)", + }, + utm_medium: { + type: "string", + description: "Name of the marketing medium. (e.g. Email)", + }, + utm_term: { + type: "string", + description: "Used to identify any paid keywords.", + }, + utm_content: { + type: "string", + description: + "Used to differentiate your campaign from advertisements.", + }, + utm_campaign: { + type: "string", + description: "The name of the campaign.", + }, + }, + }, + }, + }, }, + required: ["personalizations", "from", "subject", "content"], }, - required: ["email"], - }, - example: [ - { - email: "john_doe@example.com", - name: "John Doe", - }, - ], -}; - -export const CCBCCEmailObjectSchema: JSONSchema = { - title: "CC BCC Email Object", - type: "object", - properties: { - email: { - type: "string", - format: "email", - description: "The intended recipient's email address.", - }, - name: { - type: "string", - description: "The intended recipient's name.", - }, - }, - required: ["email"], - example: { - email: "jane_doe@example.com", - name: "Jane Doe", - }, -}; - -export const ReplyToEmailObjectSchema: JSONSchema = { - title: "Reply_to Email Object", - type: "object", - properties: { - email: { - type: "string", - format: "email", - description: - "The email address where any replies or bounces will be returned.", - }, - name: { - type: "string", - description: - "A name or title associated with the `reply_to` email address.", + marketing_contacts_request_body: { + type: "object", + properties: { + list_ids: { + type: "array", + description: + "An array of List ID strings that this contact will be added to.", + items: { + type: "string", + format: "uuid", + }, + }, + contacts: { + type: "array", + description: + "One or more contacts objects that you intend to upsert. The available fields for a contact, including the required `email` field are described below.", + minItems: 1, + maxItems: 30000, + items: { + $ref: "#/definitions/contact_request", + }, + }, + }, + required: ["contacts"], }, - }, - required: ["email"], - example: { - email: "jane_doe@example.com", - name: "Jane Doe", - }, -}; - -export const ContactRequestSchema: JSONSchema = { - title: "contact-request", - type: "object", - properties: { - address_line_1: { - type: "string", - description: "The first line of the address.", - maxLength: 100, + marketing_contacts_response_body: { + type: "object", + properties: { + job_id: { + type: "string", + description: + 'Indicates that the contacts are queued for processing. Check the job status with the "Import Contacts Status" endpoint.', + }, + }, }, - address_line_2: { - type: "string", - description: "An optional second line for the address.", - maxLength: 100, + error_response_body: makeObjectSchema("Error", { + requiredProperties: { + errors: makeArraySchema( + "Errors", + makeObjectSchema("Error", { + requiredProperties: { + message: makeStringSchema("Message"), + }, + optionalProperties: { + field: makeStringSchema("Field"), + help: makeStringSchema("Help"), + error_id: makeStringSchema("Error ID"), + parameter: makeStringSchema("Parameter"), + }, + }) + ), + }, + }), + from_email_object_schema: { + title: "From Email Object", + type: "object", + properties: { + email: { + type: "string", + format: "email", + description: + "The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account.", + }, + name: { + type: "string", + description: + "A name or title associated with the sending email address.", + }, + }, + required: ["email"], }, - alternate_emails: { + to_email_array: { + title: "To Email Array", type: "array", - description: "Additional emails associated with the contact.", - minItems: 0, - maxItems: 5, items: { - type: "string", - maxLength: 254, + type: "object", + properties: { + email: { + type: "string", + format: "email", + description: "The intended recipient's email address.", + }, + name: { + type: "string", + description: "The intended recipient's name.", + }, + }, + required: ["email"], }, }, - city: { - type: "string", - description: "The contact's city.", - maxLength: 60, - }, - country: { - type: "string", - description: - "The contact's country. Can be a full name or an abbreviation.", - maxLength: 50, - }, - email: { - type: "string", - description: - "The contact's primary email. This is required to be a valid email.", - maxLength: 254, - }, - first_name: { - type: "string", - description: "The contact's personal name.", - maxLength: 50, - }, - last_name: { - type: "string", - description: "The contact's family name.", - maxLength: 50, - }, - postal_code: { - type: "string", - description: "The contact's ZIP code or other postal code.", + cc_bcc_email_object: { + title: "CC BCC Email Object", + type: "object", + properties: { + email: { + type: "string", + format: "email", + description: "The intended recipient's email address.", + }, + name: { + type: "string", + description: "The intended recipient's name.", + }, + }, + required: ["email"], }, - state_province_region: { - type: "string", - description: "The contact's state, province, or region.", - maxLength: 50, + reply_to_email_object: { + title: "Reply_to Email Object", + type: "object", + properties: { + email: { + type: "string", + format: "email", + description: + "The email address where any replies or bounces will be returned.", + }, + name: { + type: "string", + description: + "A name or title associated with the `reply_to` email address.", + }, + }, + required: ["email"], }, - custom_fields: { - title: "custom-fields-by-id", + contact_request: { + title: "contact-request", type: "object", - additionalProperties: true, - example: { - w1: "2002-10-02T15:00:00Z", - w33: 9.5, - e2: "Coffee is a beverage that puts one to sleep when not drank.", + properties: { + address_line_1: { + type: "string", + description: "The first line of the address.", + maxLength: 100, + }, + address_line_2: { + type: "string", + description: "An optional second line for the address.", + maxLength: 100, + }, + alternate_emails: { + type: "array", + description: "Additional emails associated with the contact.", + minItems: 0, + maxItems: 5, + items: { + type: "string", + maxLength: 254, + }, + }, + city: { + type: "string", + description: "The contact's city.", + maxLength: 60, + }, + country: { + type: "string", + description: + "The contact's country. Can be a full name or an abbreviation.", + maxLength: 50, + }, + email: { + type: "string", + description: + "The contact's primary email. This is required to be a valid email.", + maxLength: 254, + }, + first_name: { + type: "string", + description: "The contact's personal name.", + maxLength: 50, + }, + last_name: { + type: "string", + description: "The contact's family name.", + maxLength: 50, + }, + postal_code: { + type: "string", + description: "The contact's ZIP code or other postal code.", + }, + state_province_region: { + type: "string", + description: "The contact's state, province, or region.", + maxLength: 50, + }, + custom_fields: { + title: "custom-fields-by-id", + type: "object", + additionalProperties: true, + }, }, + required: ["email"], }, }, - required: ["email"], }; diff --git a/apps/integrations/src/integrations/sendgrid/endpoints/specs.ts b/apps/integrations/src/integrations/sendgrid/endpoints/specs.ts index 0b9eaa7d56e..40753b40e2e 100644 --- a/apps/integrations/src/integrations/sendgrid/endpoints/specs.ts +++ b/apps/integrations/src/integrations/sendgrid/endpoints/specs.ts @@ -1,12 +1,4 @@ import { EndpointSpec, EndpointSpecResponse } from "core/endpoint/types"; -import { - CCBCCEmailObjectSchema, - ContactRequestSchema, - ErrorSchema, - fromEmailObjectSchema, - ReplyToEmailObjectSchema, - ToEmailArraySchema, -} from "../common/schemas"; const defaultResponses: EndpointSpecResponse[] = [ { @@ -15,14 +7,14 @@ const defaultResponses: EndpointSpecResponse[] = [ success: false, name: "Error", description: "error response", - schema: ErrorSchema, + schema: "#/definitions/error_response_body", }, { matches: ({ statusCode }) => statusCode < 200 || statusCode >= 300, success: false, name: "Error", description: "No body error response", - schema: {}, + schema: undefined, }, ]; @@ -50,411 +42,7 @@ export const mailSend: EndpointSpec = { Accept: "application/json", }, body: { - schema: { - type: "object", - properties: { - personalizations: { - type: "array", - description: - "An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.", - uniqueItems: false, - maxItems: 1000, - items: { - type: "object", - properties: { - from: fromEmailObjectSchema, - to: ToEmailArraySchema, - cc: { - type: "array", - description: - "An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.", - maxItems: 1000, - items: CCBCCEmailObjectSchema, - }, - bcc: { - type: "array", - description: - "An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.", - maxItems: 1000, - items: CCBCCEmailObjectSchema, - }, - subject: { - type: "string", - description: - "The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).", - minLength: 1, - }, - headers: { - type: "object", - description: - "A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`", - }, - substitutions: { - type: "object", - description: - 'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `template_id` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitution_tag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.', - maxProperties: 10000, - }, - dynamic_template_data: { - type: "object", - description: - 'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `template_id` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".', - }, - custom_args: { - type: "object", - description: - "Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.", - maxProperties: 10000, - }, - send_at: { - type: "integer", - description: - "A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden.", - }, - }, - required: ["to"], - }, - }, - from: fromEmailObjectSchema, - reply_to: ReplyToEmailObjectSchema, - reply_to_list: { - type: "array", - description: - "An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use “reply_to” field or “reply_to_list” but not both.", - uniqueItems: true, - maxItems: 1000, - items: { - type: "object", - properties: { - email: { - type: "string", - description: - "The email address where any replies or bounces will be returned.", - format: "email", - }, - name: { - type: "string", - description: - "A name or title associated with the `reply_to_list` email address.", - }, - }, - required: ["email"], - }, - }, - subject: { - type: "string", - description: - "The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.", - minLength: 1, - }, - content: { - type: "array", - description: - "An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.", - items: { - type: "object", - properties: { - type: { - type: "string", - description: - "The MIME type of the content you are including in your email (e.g., `“text/plain”` or `“text/html”`).", - minLength: 1, - }, - value: { - type: "string", - description: - "The actual content of the specified MIME type that you are including in your email.", - minLength: 1, - }, - }, - required: ["type", "value"], - }, - }, - attachments: { - type: "array", - description: - "An array of objects where you can specify any attachments you want to include.", - items: { - type: "object", - properties: { - content: { - type: "string", - description: "The Base64 encoded content of the attachment.", - minLength: 1, - }, - type: { - type: "string", - description: - "The MIME type of the content you are attaching (e.g., `“text/plain”` or `“text/html”`).", - minLength: 1, - }, - filename: { - type: "string", - description: "The attachment's filename.", - }, - disposition: { - type: "string", - default: "attachment", - description: - "The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `“inline”` results in the attached file are displayed automatically within the message while `“attachment”` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.", - enum: ["inline", "attachment"], - }, - content_id: { - type: "string", - description: - "The attachment's content ID. This is used when the disposition is set to `“inline”` and the attachment is an image, allowing the file to be displayed within the body of your email.", - }, - }, - required: ["content", "filename"], - }, - }, - template_id: { - type: "string", - description: - "An email template ID. A template that contains a subject and content — either text or html — will override any subject and content values specified at the personalizations or message level.", - }, - headers: { - description: - "An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.", - type: "object", - }, - categories: { - type: "array", - description: - "An array of category names for this message. Each category name may not exceed 255 characters. ", - uniqueItems: true, - maxItems: 10, - items: { - type: "string", - maxLength: 255, - }, - }, - custom_args: { - description: - "Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes.", - type: "string", - }, - send_at: { - type: "integer", - description: - "A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `send_at` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times — for example, scheduling at 10:53 — can result in lower deferral rates due to the reduced traffic during off-peak times.", - }, - batch_id: { - type: "string", - description: - "An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/).", - }, - asm: { - type: "object", - description: - "An object allowing you to specify how to handle unsubscribes.", - properties: { - group_id: { - type: "integer", - description: - "The unsubscribe group to associate with this email.", - }, - groups_to_display: { - type: "array", - description: - "An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.", - maxItems: 25, - items: { - type: "integer", - }, - }, - }, - required: ["group_id"], - }, - ip_pool_name: { - type: "string", - description: - "The IP Pool that you would like to send this email from.", - minLength: 2, - maxLength: 64, - }, - mail_settings: { - type: "object", - description: - "A collection of different mail settings that you can use to specify how you would like this email to be handled.", - properties: { - bypass_list_management: { - type: "object", - description: - "Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - }, - }, - bypass_spam_management: { - type: "object", - description: - "Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - }, - }, - bypass_bounce_management: { - type: "object", - description: - "Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - }, - }, - bypass_unsubscribe_management: { - type: "object", - description: - "Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - }, - }, - footer: { - type: "object", - description: - "The default footer that you would like included on every email.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - text: { - type: "string", - description: "The plain text content of your footer.", - }, - html: { - type: "string", - description: "The HTML content of your footer.", - }, - }, - }, - sandbox_mode: { - type: "object", - description: - "Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - }, - }, - }, - }, - tracking_settings: { - type: "object", - description: - "Settings to determine how you would like to track the metrics of how your recipients interact with your email.", - properties: { - click_tracking: { - type: "object", - description: - "Allows you to track if a recipient clicked a link in your email.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - enable_text: { - type: "boolean", - description: - "Indicates if this setting should be included in the `text/plain` portion of your email.", - }, - }, - }, - open_tracking: { - type: "object", - description: - "Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - substitution_tag: { - type: "string", - description: - "Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel.", - }, - }, - }, - subscription_tracking: { - type: "object", - description: - "Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitution_tag`.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - text: { - type: "string", - description: - "Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>", - }, - html: { - type: "string", - description: - "HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>", - }, - substitution_tag: { - type: "string", - description: - "A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag’s location with no additional formatting.", - }, - }, - }, - ganalytics: { - type: "object", - description: - "Allows you to enable tracking provided by Google Analytics.", - properties: { - enable: { - type: "boolean", - description: "Indicates if this setting is enabled.", - }, - utm_source: { - type: "string", - description: - "Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)", - }, - utm_medium: { - type: "string", - description: "Name of the marketing medium. (e.g. Email)", - }, - utm_term: { - type: "string", - description: "Used to identify any paid keywords.", - }, - utm_content: { - type: "string", - description: - "Used to differentiate your campaign from advertisements.", - }, - utm_campaign: { - type: "string", - description: "The name of the campaign.", - }, - }, - }, - }, - }, - }, - required: ["personalizations", "from", "subject", "content"], - }, + schema: "#/definitions/mail_send_request_body", }, }, responses: [ @@ -494,29 +82,7 @@ export const marketingContacts: EndpointSpec = { Accept: "application/json", }, body: { - schema: { - type: "object", - properties: { - list_ids: { - type: "array", - description: - "An array of List ID strings that this contact will be added to.", - items: { - type: "string", - format: "uuid", - }, - }, - contacts: { - type: "array", - description: - "One or more contacts objects that you intend to upsert. The available fields for a contact, including the required `email` field are described below.", - minItems: 1, - maxItems: 30000, - items: ContactRequestSchema, - }, - }, - required: ["contacts"], - }, + schema: "#/definitions/marketing_contacts_request_body", }, }, responses: [ @@ -525,16 +91,7 @@ export const marketingContacts: EndpointSpec = { success: true, name: "Success", description: "Successful response", - schema: { - type: "object", - properties: { - job_id: { - type: "string", - description: - 'Indicates that the contacts are queued for processing. Check the job status with the "Import Contacts Status" endpoint.', - }, - }, - }, + schema: "#/definitions/marketing_contacts_response_body", }, ...defaultResponses, ], diff --git a/apps/integrations/src/integrations/sendgrid/index.ts b/apps/integrations/src/integrations/sendgrid/index.ts index c8d0d0c0f08..b61b8a33a07 100644 --- a/apps/integrations/src/integrations/sendgrid/index.ts +++ b/apps/integrations/src/integrations/sendgrid/index.ts @@ -1,6 +1,7 @@ import { Service } from "core/service/types"; import { authentication } from "./authentication"; import actions from "./actions/actions"; +import { spec } from "./common/schemas"; export const sendgrid: Service = { name: "SendGrid", @@ -8,6 +9,7 @@ export const sendgrid: Service = { version: "0.1.21", baseUrl: "https://api.sendgrid.com", live: true, + schema: spec, authentication, actions, retryableStatusCodes: [408, 429, 500, 502, 503, 504], From 48dc45a037332255e93553bc363c445acc4a5750 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 15 Mar 2023 18:35:32 +0000 Subject: [PATCH 113/113] Notion now uses $refs --- .../notion/endpoints/schemas/params.ts | 24 +--- .../integrations/notion/endpoints/specs.ts | 79 +++++------- .../src/integrations/notion/index.ts | 2 + .../src/integrations/notion/schemas/spec.ts | 115 ++++++++++++++++++ 4 files changed, 155 insertions(+), 65 deletions(-) create mode 100644 apps/integrations/src/integrations/notion/schemas/spec.ts diff --git a/apps/integrations/src/integrations/notion/endpoints/schemas/params.ts b/apps/integrations/src/integrations/notion/endpoints/schemas/params.ts index e5e21f89b37..90f75dffda3 100644 --- a/apps/integrations/src/integrations/notion/endpoints/schemas/params.ts +++ b/apps/integrations/src/integrations/notion/endpoints/schemas/params.ts @@ -5,9 +5,7 @@ export const VersionHeaderParam: EndpointSpecParameter = { in: "header", description: "The Notion API is versioned. Our API versions are named for the date the version is released, for example, 2022-06-28", - schema: { - type: "string", - }, + schema: "#/definitions/version_header", required: true, }; @@ -16,9 +14,7 @@ export const StartCursorParam: EndpointSpecParameter = { in: "query", description: "The cursor to start from. If not provided, the default is to start from the beginning of the list.", - schema: { - type: "string", - }, + schema: "#/definitions/start_cursor_query", required: false, }; @@ -26,9 +22,7 @@ export const PageSizeParam: EndpointSpecParameter = { name: "page_size", in: "query", description: "The number of results to return. The maximum is 100.", - schema: { - type: "integer", - }, + schema: "#/definitions/page_size_query", required: false, }; @@ -36,9 +30,7 @@ export const PageIdParam: EndpointSpecParameter = { name: "page_id", in: "path", description: "ID of the page", - schema: { - type: "string", - }, + schema: "#/definitions/page_id_path", required: true, }; @@ -46,9 +38,7 @@ export const BlockIdParam: EndpointSpecParameter = { name: "block_id", in: "path", description: "ID of the block", - schema: { - type: "string", - }, + schema: "#/definitions/block_id_path", required: true, }; @@ -56,8 +46,6 @@ export const DatabaseIdParam: EndpointSpecParameter = { name: "database_id", in: "path", description: "ID of the database", - schema: { - type: "string", - }, + schema: "#/definitions/database_id_path", required: true, }; diff --git a/apps/integrations/src/integrations/notion/endpoints/specs.ts b/apps/integrations/src/integrations/notion/endpoints/specs.ts index 787e29cb4f9..4bdcac749df 100644 --- a/apps/integrations/src/integrations/notion/endpoints/specs.ts +++ b/apps/integrations/src/integrations/notion/endpoints/specs.ts @@ -56,7 +56,7 @@ const errorResponse: EndpointSpecResponse = { success: false, name: "Error", description: "Error response", - schema: {}, + schema: undefined, }; export const getUser: EndpointSpec = { @@ -82,9 +82,7 @@ export const getUser: EndpointSpec = { name: "user_id", in: "path", description: "ID of the user you would like info about", - schema: { - type: "string", - }, + schema: "#/definitions/user_id_path", required: true, }, VersionHeaderParam, @@ -96,7 +94,7 @@ export const getUser: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: GetUserResponse, + schema: "#/definitions/get_user_response", }, errorResponse, ], @@ -128,7 +126,7 @@ export const listUsers: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: ListUsersResponse, + schema: "#/definitions/list_users_response", }, errorResponse, ], @@ -160,7 +158,7 @@ export const getBotInfo: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: GetSelfResponse, + schema: "#/definitions/get_bot_info_response", }, errorResponse, ], @@ -191,13 +189,7 @@ export const getPage: EndpointSpec = { name: "filter_properties", in: "query", description: "The properties to filter by", - schema: { - type: "array", - items: { - description: "The property to filter by", - type: "string", - }, - }, + schema: "#/definitions/filter_properties_path", required: false, }, ], @@ -208,7 +200,7 @@ export const getPage: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: GetPageResponse, + schema: "#/definitions/get_page_response", }, errorResponse, ], @@ -239,7 +231,7 @@ export const createPage: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: CreatePageParameters, + schema: "#/definitions/create_page_request_body", }, }, responses: [ @@ -248,7 +240,7 @@ export const createPage: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: CreatePageResponse, + schema: "#/definitions/create_page_response", }, errorResponse, ], @@ -279,7 +271,7 @@ export const updatePage: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: UpdatePageBodyParameters, + schema: "#/definitions/update_page_request_body", }, }, responses: [ @@ -288,7 +280,7 @@ export const updatePage: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: UpdatePageResponse, + schema: "#/definitions/update_page_response", }, errorResponse, ], @@ -320,7 +312,7 @@ export const getBlock: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: GetBlockResponse, + schema: "#/definitions/get_block_response", }, errorResponse, ], @@ -351,7 +343,7 @@ export const updateBlock: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: UpdateBlockBodyParameters, + schema: "#/definitions/update_block_request_body", }, }, responses: [ @@ -360,7 +352,7 @@ export const updateBlock: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: UpdateBlockResponse, + schema: "#/definitions/update_block_response", }, errorResponse, ], @@ -397,7 +389,7 @@ export const getBlockChildren: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: ListBlockChildrenResponse, + schema: "#/definitions/get_block_children_response", }, errorResponse, ], @@ -427,7 +419,7 @@ export const appendBlockChildren: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: AppendBlockChildrenBodyParameters, + schema: "#/definitions/append_block_children_request_body", }, }, responses: [ @@ -436,7 +428,7 @@ export const appendBlockChildren: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: AppendBlockChildrenResponse, + schema: "#/definitions/append_block_children_response", }, errorResponse, ], @@ -468,7 +460,7 @@ export const deleteBlock: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: DeleteBlockResponse, + schema: "#/definitions/delete_block_response", }, errorResponse, ], @@ -500,7 +492,7 @@ export const getDatabase: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: GetDatabaseResponse, + schema: "#/definitions/get_database_response", }, errorResponse, ], @@ -532,12 +524,7 @@ export const queryDatabase: EndpointSpec = { in: "query", description: "The list of database properties you want to receive back in the responses – you need to provide ids", - schema: { - type: "array", - items: { - type: "string", - }, - }, + schema: "#/definitions/filter_properties_query", }, ], request: { @@ -545,7 +532,7 @@ export const queryDatabase: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: QueryDatabaseBodyParameters, + schema: "#/definitions/query_database_request_body", }, }, responses: [ @@ -554,7 +541,7 @@ export const queryDatabase: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: QueryDatabaseResponse, + schema: "#/definitions/query_database_response", }, errorResponse, ], @@ -584,7 +571,7 @@ export const createDatabase: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: CreateDatabaseBodyParameters, + schema: "#/definitions/create_database_request_body", }, }, responses: [ @@ -593,7 +580,7 @@ export const createDatabase: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: CreateDatabaseResponse, + schema: "#/definitions/create_database_response", }, errorResponse, ], @@ -623,7 +610,7 @@ export const updateDatabase: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: UpdateDatabaseBodyParameters, + schema: "#/definitions/update_database_request_body", }, }, responses: [ @@ -632,7 +619,7 @@ export const updateDatabase: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: UpdateDatabaseResponse, + schema: "#/definitions/update_database_response", }, errorResponse, ], @@ -661,9 +648,7 @@ export const getComments: EndpointSpec = { name: "block_id", in: "query", description: "ID of the block", - schema: { - type: "string", - }, + schema: "#/definitions/block_id_query", required: true, }, StartCursorParam, @@ -677,7 +662,7 @@ export const getComments: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: ListCommentsResponse, + schema: "#/definitions/get_comments_response", }, errorResponse, ], @@ -707,7 +692,7 @@ export const createComment: EndpointSpec = { "Content-Type": "application/json", }, body: { - schema: CreateCommentBodyParameters, + schema: "#/definitions/create_comment_request_body", }, }, responses: [ @@ -716,7 +701,7 @@ export const createComment: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: CreateCommentResponse, + schema: "#/definitions/create_comment_response", }, errorResponse, ], @@ -743,7 +728,7 @@ export const search: EndpointSpec = { parameters: [VersionHeaderParam], request: { body: { - schema: SearchParameters, + schema: "#/definitions/search_request_body", }, }, responses: [ @@ -752,7 +737,7 @@ export const search: EndpointSpec = { success: true, name: "Success", description: "Typical success response", - schema: SearchResponse, + schema: "#/definitions/search_response", }, errorResponse, ], diff --git a/apps/integrations/src/integrations/notion/index.ts b/apps/integrations/src/integrations/notion/index.ts index 51818fec952..f2a2f928ad3 100644 --- a/apps/integrations/src/integrations/notion/index.ts +++ b/apps/integrations/src/integrations/notion/index.ts @@ -1,6 +1,7 @@ import { Service } from "core/service/types"; import { authentication } from "./authentication"; import actions from "./actions/actions"; +import { spec } from "./schemas/spec"; export const notion: Service = { name: "Notion", @@ -8,6 +9,7 @@ export const notion: Service = { version: "0.1.22", baseUrl: "https://api.notion.com", live: true, + schema: spec, authentication, actions, retryableStatusCodes: [408, 429, 500, 502, 503, 504], diff --git a/apps/integrations/src/integrations/notion/schemas/spec.ts b/apps/integrations/src/integrations/notion/schemas/spec.ts new file mode 100644 index 00000000000..e790a790ba4 --- /dev/null +++ b/apps/integrations/src/integrations/notion/schemas/spec.ts @@ -0,0 +1,115 @@ +import { IntegrationSchema } from "core/schemas/types"; +import { + AppendBlockChildrenBodyParameters, + AppendBlockChildrenResponse, +} from "../endpoints/schemas/endpoints/appendBlockChildren"; +import { + CreateCommentBodyParameters, + CreateCommentResponse, +} from "../endpoints/schemas/endpoints/createComment"; +import { + CreateDatabaseBodyParameters, + CreateDatabaseResponse, +} from "../endpoints/schemas/endpoints/createDatabase"; +import { + CreatePageParameters, + CreatePageResponse, +} from "../endpoints/schemas/endpoints/createPage"; +import { DeleteBlockResponse } from "../endpoints/schemas/endpoints/deleteBlock"; +import { GetBlockResponse } from "../endpoints/schemas/endpoints/getBlock"; +import { GetDatabaseResponse } from "../endpoints/schemas/endpoints/getDatabase"; +import { GetPageResponse } from "../endpoints/schemas/endpoints/getPage"; +import { GetUserResponse } from "../endpoints/schemas/endpoints/getUser"; +import { ListBlockChildrenResponse } from "../endpoints/schemas/endpoints/listBlockChildren"; +import { ListCommentsResponse } from "../endpoints/schemas/endpoints/listComments"; +import { ListUsersResponse } from "../endpoints/schemas/endpoints/listUsers"; +import { GetSelfResponse } from "../endpoints/schemas/endpoints/me"; +import { + QueryDatabaseBodyParameters, + QueryDatabaseResponse, +} from "../endpoints/schemas/endpoints/queryDatabase"; +import { + SearchParameters, + SearchResponse, +} from "../endpoints/schemas/endpoints/search"; +import { + UpdateBlockBodyParameters, + UpdateBlockResponse, +} from "../endpoints/schemas/endpoints/updateBlock"; +import { + UpdateDatabaseBodyParameters, + UpdateDatabaseResponse, +} from "../endpoints/schemas/endpoints/updateDatabase"; +import { + UpdatePageBodyParameters, + UpdatePageResponse, +} from "../endpoints/schemas/endpoints/updatePage"; + +export const spec: IntegrationSchema = { + definitions: { + version_header: { + type: "string", + }, + start_cursor_query: { + type: "string", + }, + page_size_query: { + type: "integer", + }, + user_id_path: { + type: "string", + }, + page_id_path: { + type: "string", + }, + block_id_path: { + type: "string", + }, + database_id_path: { + type: "string", + }, + filter_properties_path: { + type: "array", + items: { + description: "The property to filter by", + type: "string", + }, + }, + filter_properties_query: { + type: "array", + items: { + type: "string", + }, + }, + block_id_query: { + type: "string", + }, + get_user_response: GetUserResponse, + list_users_response: ListUsersResponse, + get_bot_info_response: GetSelfResponse, + get_page_response: GetPageResponse, + create_page_request_body: CreatePageParameters, + create_page_response: CreatePageResponse, + update_page_request_body: UpdatePageBodyParameters, + update_page_response: UpdatePageResponse, + get_block_response: GetBlockResponse, + update_block_request_body: UpdateBlockBodyParameters, + update_block_response: UpdateBlockResponse, + get_block_children_response: ListBlockChildrenResponse, + append_block_children_request_body: AppendBlockChildrenBodyParameters, + append_block_children_response: AppendBlockChildrenResponse, + delete_block_response: DeleteBlockResponse, + get_database_response: GetDatabaseResponse, + query_database_request_body: QueryDatabaseBodyParameters, + query_database_response: QueryDatabaseResponse, + create_database_request_body: CreateDatabaseBodyParameters, + create_database_response: CreateDatabaseResponse, + update_database_request_body: UpdateDatabaseBodyParameters, + update_database_response: UpdateDatabaseResponse, + get_comments_response: ListCommentsResponse, + create_comment_request_body: CreateCommentBodyParameters, + create_comment_response: CreateCommentResponse, + search_request_body: SearchParameters, + search_response: SearchResponse, + }, +};